{
  "id": "PpO4oQ8ENmX2Dna9",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Social Media Marketing Agent",
  "tags": [
    {
      "id": "NF6O13GXBYdpASSw",
      "name": "facebook",
      "createdAt": "2026-03-04T16:00:32.672Z",
      "updatedAt": "2026-03-04T16:00:32.672Z"
    },
    {
      "id": "icDUGQ9K6fU4qE7D",
      "name": "instagram",
      "createdAt": "2026-03-04T16:00:26.608Z",
      "updatedAt": "2026-03-04T16:00:26.608Z"
    }
  ],
  "nodes": [
    {
      "id": "501934d7-4748-4de3-ab77-6f819683de43",
      "name": "Product vs Pitch Router",
      "type": "n8n-nodes-base.if",
      "position": [
        608,
        -160
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1f61627a-c642-421c-9543-57ed38021cc1",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.isCustomPitchSlot }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "a49fecfc-b7c2-4ae2-8ba3-d987b1b3de06",
      "name": "Fetch All Agents",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1040,
        -112
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 961906395,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gr8u-Bx58-NCbdtArGSL6ytg6IzJeTrFuWNoHCwRJvs/edit#gid=961906395",
          "cachedResultName": "pixril_agents.csv"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1gr8u-Bx58-NCbdtArGSL6ytg6IzJeTrFuWNoHCwRJvs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gr8u-Bx58-NCbdtArGSL6ytg6IzJeTrFuWNoHCwRJvs/edit?usp=drivesdk",
          "cachedResultName": "pixril_agents"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "2fdb7c87-d6b2-46dd-9efc-9138fed18668",
      "name": "Smart Product Selector",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        -112
      ],
      "parameters": {
        "jsCode": "// 1. Get all the products we just fetched from Google Sheets\nconst products = $input.all().map(item => item.json);\n\n// 2. Sort them based on our priority rules\nconst sortedProducts = products.sort((a, b) => {\n  // Rule A: The product with the lowest \"Times Posted\" wins\n  const countDiff = a[\"Times Posted\"] - b[\"Times Posted\"];\n  if (countDiff !== 0) return countDiff; \n  \n  // Rule B (Tie-Breaker): If they have the same post count (e.g., both are 0),\n  // sort them alphabetically by Agent Name so it rotates cleanly\n  return a[\"Agent Name\"].localeCompare(b[\"Agent Name\"]);\n});\n\n// 3. Select the absolute winner (the first one in our newly sorted list)\nconst selectedProduct = sortedProducts[0];\n\n// 4. Output the winner and pass along the row number so we can update the sheet later\nreturn {\n  selectedProduct: selectedProduct,\n  rowIndexToUpdate: selectedProduct.row_number,\n  isPitch: false // We set this to false because this branch is strictly for products\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "296604b0-f7f4-46f0-a217-8547678a3e17",
      "name": "Generate Custom Pitch",
      "type": "n8n-nodes-base.code",
      "position": [
        1168,
        -272
      ],
      "parameters": {
        "jsCode": "// A list of different custom agency pitches with a clean, professional tone\nconst pitches = [\n  `CUSTOM AI AGENTS FOR YOUR BUSINESS\\n\\nNot finding the perfect automation template?\\nWe build custom N8N workflows tailored to YOUR exact needs:\\n- WhatsApp Bots\\n- Instagram Automation\\n- Data Pipelines\\n- AI Integrations\\n\\nLet's talk: user@example.com`,\n  \n  `NEED A CUSTOM AUTOMATION?\\n\\nOur AI agents can:\\n- Handle customer support 24/7\\n- Automate lead generation\\n- Sync data across platforms\\n- Generate content on demand\\n\\nReady to scale? DM us or email user@example.com`,\n  \n  `STRUGGLING WITH MANUAL TASKS?\\n\\nPixril builds AI agents that:\\n- Save you 10+ hours per week\\n- Cost a fraction of traditional development\\n- Deploy in days, not months\\n\\nLet's automate your workflow: user@example.com`\n];\n\n// Rotate the pitch based on today's date\nconst pitchIndex = new Date().getDate() % pitches.length;\n\n// Output the exact same data structure as the Product Sorter\nreturn {\n  selectedProduct: {\n    \"Agent Name\": \"Custom Agency Pitch\",\n    \"Base Description\": pitches[pitchIndex],\n    \"Etsy Link\": \"https://pixril.com\",\n    \"Drive Image ID\": \"\", // We will handle this in the next step\n    \"Times Posted\": -1 // -1 tells our final step NOT to update the Google Sheet\n  },\n  rowIndexToUpdate: -1, \n  isPitch: true\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "14e5762a-6a56-4b48-a350-86a7780ed3e7",
      "name": "Image URL Converter",
      "type": "n8n-nodes-base.code",
      "position": [
        1488,
        -208
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const product = $json.selectedProduct;\nlet imageUrl = \"\";\n\nif (product[\"Drive Image ID\"] && product[\"Drive Image ID\"] !== \"\") {\n  // This uses the exact format from your screenshot!\n  imageUrl = `https://lh3.googleusercontent.com/d/${product[\"Drive Image ID\"]}`;\n} else {\n  const fallbackDriveId = \"REPLACE_WITH_YOUR_PIXRIL_LOGO_DRIVE_ID\";\n  imageUrl = `https://lh3.googleusercontent.com/d/${fallbackDriveId}`;\n}\n\nreturn {\n  ...$json,\n  imageUrl: imageUrl\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "ca76bed7-0c8b-4e46-b4b5-6460cd7c231e",
      "name": "AI Copywriter",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1760,
        -208
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "content": "=You are a professional B2B social media copywriter for Pixril, an AI automation agency.\n\nREWRITE this product description for maximum engagement on Threads and Facebook.\n\nProduct: {{ $json.selectedProduct[\"Agent Name\"] }}\nOriginal: {{ $json.selectedProduct[\"Base Description\"] }}\n\nGuidelines:\n1. Keep under 480 characters (Threads limit).\n2. STRICT RULE: DO NOT USE ANY EMOJIS. Maintain a clean, professional, and authoritative tone.\n3. Lead with the BENEFIT, not the feature.\n4. MUST include this exact link at the end: {{ $json.selectedProduct[\"Etsy Link\"] }}\n5. Maintain accurate \"Time Saved\" and \"Cost Saved\" statistics.\n6. Sound authentic\u2014avoid robotic marketing speak.\n\nRespond ONLY with the rewritten copy. No preamble."
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2d240834-05d2-45e7-8b97-428956efe369",
      "name": "Approval Gate",
      "type": "n8n-nodes-base.wait",
      "position": [
        2112,
        -208
      ],
      "parameters": {
        "resume": "form",
        "options": {},
        "formTitle": "Pixril Post Approval",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Product Name",
              "defaultValue": "={{ $('Image URL Converter').item.json.selectedProduct['Agent Name'] }}",
              "requiredField": true
            },
            {
              "fieldLabel": "Image URL",
              "defaultValue": "={{ $('Image URL Converter').item.json.imageUrl }}",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "AI Generated Copy",
              "defaultValue": "={{ $json.output[0].content[0].text }}",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Decision",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Approve"
                  },
                  {
                    "option": "Reject"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "formDescription": "Review the AI-generated copy and image below. Select Approve to dispatch to Meta."
      },
      "typeVersion": 1.1
    },
    {
      "id": "832e0333-f0fc-477a-a0a3-7ad7048db69e",
      "name": "Check Approval",
      "type": "n8n-nodes-base.if",
      "position": [
        2336,
        -208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "96b676bc-a156-4504-9c0a-298b1728ad74",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.Decision }}",
              "rightValue": "Approve"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "f7a4502d-9a6e-478c-8d68-27274a193b38",
      "name": "Build Payloads",
      "type": "n8n-nodes-base.code",
      "position": [
        2560,
        -208
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// 1. Grab the approved text and image from the form\nconst approvedCopy = $json[\"AI Generated Copy\"];\nlet imageUrl = $json[\"Image URL\"];\n\n// 2. Reach back to the Image URL Converter (which safely runs on BOTH branches)\nconst rowIndex = $node[\"Image URL Converter\"].json.rowIndexToUpdate;\nconst isPitch = $node[\"Image URL Converter\"].json.isPitch;\n\n// 3. If this is a pitch, we want absolutely no image attached\nif (isPitch === true) {\n  imageUrl = \"\"; \n}\n\n// 4. Facebook Payload\nconst facebookPayload = {\n  message: approvedCopy,\n  url: imageUrl \n};\n\n// 5. Threads Payload (preparing for tomorrow!)\nconst threadsPayload = {\n  media_type: isPitch ? \"TEXT\" : \"IMAGE\",\n  text: approvedCopy,\n  image_url: imageUrl\n};\n\nreturn {\n  facebook: facebookPayload,\n  threads: threadsPayload,\n  rowIndex: rowIndex,\n  isPitch: isPitch\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "96df90a9-6ccc-401c-ab12-746c0c411a36",
      "name": "Is this a Product?",
      "type": "n8n-nodes-base.if",
      "position": [
        3680,
        -112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3453c514-2d75-45c1-b62c-07b31d04ddb0",
              "operator": {
                "type": "boolean",
                "operation": "false",
                "singleValue": true
              },
              "leftValue": "={{ $node[\"Build Payloads\"].json.isPitch }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "3b861e77-e251-40a0-b2cf-2b9d91218f4a",
      "name": "Increment Post Count",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3904,
        -112
      ],
      "parameters": {
        "columns": {
          "value": {
            "row_number": "={{ $node[\"Build Payloads\"].json.rowIndex }}",
            "Times Posted": "={{ $node[\"Smart Product Selector\"].json.selectedProduct[\"Times Posted\"] + 1 }}"
          },
          "schema": [
            {
              "id": "Agent Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Agent Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Base Description",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Base Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Etsy Link",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Etsy Link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Drive Image ID",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Drive Image ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Times Posted",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Times Posted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 961906395,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gr8u-Bx58-NCbdtArGSL6ytg6IzJeTrFuWNoHCwRJvs/edit#gid=961906395",
          "cachedResultName": "pixril_agents.csv"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1gr8u-Bx58-NCbdtArGSL6ytg6IzJeTrFuWNoHCwRJvs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gr8u-Bx58-NCbdtArGSL6ytg6IzJeTrFuWNoHCwRJvs/edit?usp=drivesdk",
          "cachedResultName": "pixril_agents"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e2e73794-365f-47fe-9579-b34a2caf168a",
      "name": "Post to Facebook",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        3056,
        -112
      ],
      "parameters": {
        "edge": "photos",
        "node": "785083878011217",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "url",
                "value": "={{ $node[\"Build Payloads\"].json.facebook.url }}"
              },
              {
                "name": "message",
                "value": "={{ $node[\"Build Payloads\"].json.facebook.message }}"
              }
            ]
          }
        },
        "graphApiVersion": "v23.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bd9c506c-7bc1-4127-a4f4-611f999290e2",
      "name": "IG - Create Container",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        3232,
        -112
      ],
      "parameters": {
        "edge": "media",
        "node": "17841472322424687",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "image_url",
                "value": "={{ $node[\"Build Payloads\"].json.facebook.url }}"
              },
              {
                "name": "caption",
                "value": "={{ $node[\"Build Payloads\"].json.facebook.message }}"
              }
            ]
          }
        },
        "graphApiVersion": "v23.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "576daa7b-f5ce-48e0-bff0-908275f089a9",
      "name": "IG - Publish Post",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        3456,
        -112
      ],
      "parameters": {
        "edge": "media_publish",
        "node": "17841472322424687",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "creation_id",
                "value": "={{ $json.id }}"
              }
            ]
          }
        },
        "graphApiVersion": "v23.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "54f5df14-e973-4a36-aff9-c6e948f49955",
      "name": "Is this a Pitch?",
      "type": "n8n-nodes-base.if",
      "position": [
        2848,
        -208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c7f57c0a-acb9-4a17-aaef-432ff8f73946",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.isPitch }}",
              "rightValue": false
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "18b0d56f-3a74-4e56-98a7-26a63c51edd4",
      "name": "FB - Post Pitch",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        3456,
        -272
      ],
      "parameters": {
        "edge": "feed",
        "node": "785083878011217",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "message",
                "value": "={{ $node[\"Build Payloads\"].json.facebook.message }}"
              }
            ]
          }
        },
        "graphApiVersion": "v23.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ad1d333d-7446-41f5-8a1d-6c6f3e067529",
      "name": "Pixril Dispatcher",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        144,
        -160
      ],
      "parameters": {
        "options": {},
        "formTitle": "PIXRIL Marketing Agent",
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "Post Type",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Product"
                  },
                  {
                    "option": "Custom Pitch"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "formDescription": "Select the type of AI Agent campaign you want to dispatch to the PIXRIL social channels right now."
      },
      "typeVersion": 2.5
    },
    {
      "id": "50063b2d-f520-4096-843a-893a6f8c4413",
      "name": "Manual Dispatcher",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        -160
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const userChoice = $json[\"Post Type\"];\n\n// We check what you selected in the dropdown\nif (userChoice === \"Custom Pitch\") {\n  return { isCustomPitchSlot: true };\n} else {\n  return { isCustomPitchSlot: false };\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "a96d6737-7d40-4b6f-8e82-336db7e59c52",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -960
      ],
      "parameters": {
        "width": 672,
        "height": 448,
        "content": "## How it works\nThis workflow is a semi-autonomous social media manager. It triggers targeted marketing campaigns on-demand via a web form.\n\n1. **Dispatch:** Choose to promote a specific product or broadcast a custom agency pitch.\n2. **Smart Selection:** Automatically pulls the least-promoted product from Google Sheets to ensure balanced marketing.\n3. **Content Creation:** OpenAI drafts professional, platform-specific copy.\n4. **Human Review:** The workflow pauses, sending an approval form so you can review the AI's copy before publishing.\n5. **Omnichannel Publishing:** Posts pitches to Facebook (text) and products to FB/Instagram (media), then updates your tracking sheet.\n\n## Setup steps\n1. **Google Sheets:** Connect your credentials to the Sheets nodes and add your Document ID.\n2. **OpenAI Key:** Add your API key to the \"AI Copywriter\" node.\n3. **Meta API:** Connect your Facebook Graph API credentials to the FB/IG nodes and verify your Page ID.\n4. **Run:** Click \"Execute Workflow,\" open the Form Trigger's Test URL, and select your campaign!"
      },
      "typeVersion": 1
    },
    {
      "id": "48fc6987-e2f6-4b85-8f3f-18beb0bf6ce2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -336
      ],
      "parameters": {
        "color": 7,
        "width": 768,
        "height": 384,
        "content": "## 1. The Dispatcher\nTriggers the workflow via an interactive web form. Routes the execution based on your selection: a specific product promo or a custom agency pitch."
      },
      "typeVersion": 1
    },
    {
      "id": "32d4191f-ff50-41f1-91a1-2eb1711d7602",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -400
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 448,
        "content": "## 2. Data & Selection\n**Product Route:** Pulls inventory from Google Sheets and intelligently selects the least-promoted item.\n**Pitch Route:** Generates a rotating, professional agency pitch."
      },
      "typeVersion": 1
    },
    {
      "id": "009f9a54-d003-4127-88c9-cfc755cb0cbd",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        -352
      ],
      "parameters": {
        "color": 7,
        "width": 1008,
        "height": 400,
        "content": "## 3. AI Writing & Human Review\nOpenAI drafts professional, platform-specific copy. The workflow pauses and generates a web form for you to review and approve the content before publishing."
      },
      "typeVersion": 1
    },
    {
      "id": "af301cf1-9e71-41a3-8b37-857316056865",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2784,
        -400
      ],
      "parameters": {
        "color": 7,
        "width": 1312,
        "height": 448,
        "content": "## 4. Meta Publishing & Tracking\nRoutes approved content to Meta. Pitches are posted to Facebook as text-only. Products are posted to FB/IG with media, and the Google Sheet is incremented."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "timezone": "Asia/Karachi",
    "binaryMode": "separate",
    "callerPolicy": "workflowsFromSameOwner",
    "timeSavedMode": "fixed",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "54dc8fc8-db38-4ac1-a8f6-3763f7a298c2",
  "connections": {
    "AI Copywriter": {
      "main": [
        [
          {
            "node": "Approval Gate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Approval Gate": {
      "main": [
        [
          {
            "node": "Check Approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Payloads": {
      "main": [
        [
          {
            "node": "Is this a Pitch?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Approval": {
      "main": [
        [
          {
            "node": "Build Payloads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch All Agents": {
      "main": [
        [
          {
            "node": "Smart Product Selector",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is this a Pitch?": {
      "main": [
        [
          {
            "node": "FB - Post Pitch",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Post to Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Facebook": {
      "main": [
        [
          {
            "node": "IG - Create Container",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IG - Publish Post": {
      "main": [
        [
          {
            "node": "Is this a Product?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Dispatcher": {
      "main": [
        [
          {
            "node": "Product vs Pitch Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pixril Dispatcher": {
      "main": [
        [
          {
            "node": "Manual Dispatcher",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is this a Product?": {
      "main": [
        [
          {
            "node": "Increment Post Count",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image URL Converter": {
      "main": [
        [
          {
            "node": "AI Copywriter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Custom Pitch": {
      "main": [
        [
          {
            "node": "Image URL Converter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IG - Create Container": {
      "main": [
        [
          {
            "node": "IG - Publish Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Smart Product Selector": {
      "main": [
        [
          {
            "node": "Image URL Converter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product vs Pitch Router": {
      "main": [
        [
          {
            "node": "Generate Custom Pitch",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fetch All Agents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}