{
  "id": "YWQxaMjqJ23lyXps",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Festival Social Media Automation with Gemini AI for X/Twitter & Facebook",
  "tags": [
    {
      "id": "VwtLS6Wfn3QdKdqW",
      "name": "Production",
      "createdAt": "2025-07-08T10:23:28.983Z",
      "updatedAt": "2025-07-08T10:23:28.983Z"
    }
  ],
  "nodes": [
    {
      "id": "128caabc-f62d-44cf-94cd-666bc1c0dac9",
      "name": "Get Today's Date",
      "type": "n8n-nodes-base.code",
      "position": [
        -660,
        60
      ],
      "parameters": {
        "jsCode": "const today = new Date();\nconst day = String(today.getDate()).padStart(2, '0');\nconst month = String(today.getMonth() + 1).padStart(2, '0');\nconst year = today.getFullYear();\n\nconst formattedDate = `${day}/${month}/${year}`;\n\nreturn {\n    date: formattedDate,\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "48c2a952-a21d-42a1-97dc-4d1cb49302c3",
      "name": "Fetch Data of Matched Date",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -300,
        60
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.date }}",
              "lookupColumn": "Date"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zVvFDvCRSDbeKVTV4vLj3txSrCptaVFlVkulve7gi5s/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1zVvFDvCRSDbeKVTV4vLj3txSrCptaVFlVkulve7gi5s",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zVvFDvCRSDbeKVTV4vLj3txSrCptaVFlVkulve7gi5s/edit?usp=drivesdk",
          "cachedResultName": "n8n-test"
        },
        "combineFilters": "OR"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "29394c0c-679d-4434-8eac-20900c6ea5c7",
      "name": "Structured Posts",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        820,
        260
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"X\": {\n    \"text\": \"...\",\n    \"hashtags\": \"#.. #.. #..\",\n    \"call_to_action\": \"...\"\n  },\n  \"Instagram\": {\n    \"text\": \"...\",\n    \"hashtags\": \"#.. #.. #..\",\n    \"call_to_action\": \"...\"\n  },\n    \"Facebook\": {\n    \"text\": \"...\",\n    \"hashtags\": \"#.. #.. #..\",\n    \"call_to_action\": \"...\"\n  },\n    \"Linkedin\": {\n    \"text\": \"...\",\n    \"hashtags\": \"#.. #.. #..\",\n    \"call_to_action\": \"...\"\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "d9bfd0cd-863b-41f8-90ee-2bb28c2ed34f",
      "name": "Generate Posts",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        620,
        60
      ],
      "parameters": {
        "text": "=You are a specialized social media post generator. Your task is to create a complete social media post based on the provided content generation instructions for a specific platform.\n\n**Input Content Generation Instruction:**\n\nX(Twitter) Prompt: {{ $json.output.post_gen_prompt.x_prompt }}\n\nInstagram Prompt: {{ $json.output.post_gen_prompt.instagram_prompt }}\n\nFacebook Prompt: {{ $json.output.post_gen_prompt.facebook_prompt }}\n\nLinkedin Prompt: {{ $json.output.post_gen_prompt.linkedin_prompt }}\n\n\n**Your Task:**\nGenerate Social media post for all of this platforms in English Language.\nFor Every Platform there should be Text, call to action and hastags\n",
        "batching": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "0430b802-3217-4006-aee9-9c74a5b8bb40",
      "name": "Everyday Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1000,
        60
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a19b978f-f9be-4cec-adac-48a41facd293",
      "name": "Post to X",
      "type": "n8n-nodes-base.twitter",
      "onError": "continueRegularOutput",
      "position": [
        1220,
        40
      ],
      "parameters": {
        "text": "={{ $json.output[0].X.text }}\n\n{{ $json.output[0].X.call_to_action }}\n\n{{ $json.output[0].X.hashtags }}",
        "additionalFields": {
          "attachments": "={{ $json.data[0].id }}"
        }
      },
      "credentials": {
        "twitterOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e28110d8-e3bd-40d3-9c5b-95ff0ccbfb25",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        780,
        860
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "output"
            },
            {
              "fieldToAggregate": "data"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5142f07c-f808-4b36-b20c-1961c2fe5b67",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        360,
        860
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "47d7e98d-bb29-4a4c-a5fc-188e4cb93e79",
      "name": "Generate Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -940,
        520
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-preview-image-generation:generateContent",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"contents\": [\n    {\n      \"parts\": [\n        {\n          \"text\": {{ JSON.stringify($json.output.image_gen_prompt) }}\n        }\n      ]\n    }\n  ],\n  \"generationConfig\": {\n    \"responseModalities\": [\n      \"TEXT\",\n      \"IMAGE\"\n    ]\n  }\n}",
        "sendBody": true,
        "sendQuery": true,
        "specifyBody": "json",
        "queryParameters": {
          "parameters": [
            {
              "name": "=key",
              "value": "YOUR_GEMINI_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f09732a4-c30d-4ab9-8a3c-3336fc2c407a",
      "name": "Prompt Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        80,
        60
      ],
      "parameters": {
        "text": "=You are an AI assistant that generates prompts for other AI models. Based on the provided festival information, create two distinct prompts: one for image generation AI and one for social media content creation AI.\n**Input Festival Data:**\n- Festival Name: {{ $json[\"Name of the Festival\"] }}\n- Date: {{ $json[\"Date\"] }}\n- Description: {{ $json[\"Description\"] }}\n\n\n## Your Tasks:\n\n### Task 1: Generate Image Generation Prompt\nCreate a detailed prompt for an image generation AI to produce a vibrant, culturally appropriate social media graphic for the festival.\n\n**Include in your prompt:**\n- Festival name and visual elements from descriptions\n- Cultural symbols, colors, and motifs\n- Terms like \"vibrant celebration,\" \"cultural authenticity,\" \"modern aesthetic with traditional elements\"\n- Diverse people celebrating (when appropriate)\n- Social media optimized composition\n\n### Task 2: Generate Social Media Content Prompt\nCreate a comprehensive prompt for a social media content creation AI that will generate posts for multiple platforms for this **FESTIVAL**.\n\n## Tip: Include Festival informations for better results\n\n**Your social media prompt should include:**\n- Clear role definition for the AI\n- All input variables exactly as provided\n- Platform-specific guidelines for X, Instagram, Facebook, LinkedIn\n- Character limits, hashtag requirements, emoji guidelines\n- Language blending instructions (English + cultural terms)\n- Engagement strategies for each platform\n- Cultural sensitivity requirements\n- Max 280 characters limit including all the fields(text, call_to_action, hashtags)\n\n\n## Guidelines:\n- Keep prompts clear and actionable\n- Ensure cultural sensitivity for worldwide festivals\n- Preserve all placeholder variables exactly as shown\n- Make prompts work for any festival, not just specific cultures\n- Focus on authenticity and engagement",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "dcd28beb-ebe3-4b95-a833-d8390c02e502",
      "name": "Convert base64 to Image",
      "type": "n8n-nodes-base.code",
      "position": [
        -500,
        520
      ],
      "parameters": {
        "jsCode": "// Loop through incoming items\nreturn items.map(item => {\n  const part = item.json.candidates[0]?.content?.parts.find(p => p.inlineData);\n  if (!part || !part.inlineData) return item;\n\n  const base64 = part.inlineData.data;\n  return {\n    json: {}, // optionally pass through other json fields\n    binary: {\n      data: {\n        data: base64,\n        mimeType: part.inlineData.mimeType || 'image/png',\n        fileName: 'gemini_image.png',\n        fileExtension: part.inlineData.mimeType?.split('/')[1] || 'png'\n      }\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "6e095fa6-4139-48e4-aa79-7413d5f6aab6",
      "name": "Get Media ID for X",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        840
      ],
      "parameters": {
        "url": "https://api.x.com/2/media/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "media_category",
              "value": "tweet_image"
            },
            {
              "name": "media",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "oAuth2Api",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer {YOUR_X_BEARER_TOKEN}"
            }
          ]
        }
      },
      "credentials": {
        "oAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "652510ac-1f1e-412c-bb0d-a4c250eca676",
      "name": "Post on X via HTTP if other fails",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        1220,
        460
      ],
      "parameters": {
        "url": "https://api.twitter.com/2/tweets",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"text\": \"{{ $json.output[0].X.text }}\",\n  \"media\": {\n    \"media_ids\": [\"{{ $json.data[0].id }}\"]\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer {YOUR_X_BEARER_TOKEN}"
            }
          ]
        }
      },
      "credentials": {
        "oAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5dc0449a-9d79-42af-b679-c591382b7dc3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -160
      ],
      "parameters": {
        "width": 340,
        "height": 420,
        "content": "## \ud83d\udd50  Everyday Trigger\n\n**Purpose:** Initiates the entire workflow automatically\n**Schedule:** Runs daily at 8:00 AM\n**Function:** Acts as the starting point for the automated festival social media posting system\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ad9d8210-f185-4b8f-9e73-0a628f3ca0fe",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 420,
        "content": "## \ud83d\udcc5 Get Today's Date\n\n**Purpose:** Generates current date in DD/MM/YYYY format\n**Function:** Creates a formatted date string to match against the Google Sheets data\n**Output:** Returns today's date as a standardized string\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cdeea9ae-3254-4d37-b761-6631f11356aa",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        -160
      ],
      "parameters": {
        "color": 2,
        "width": 380,
        "height": 420,
        "content": "## \ud83d\udcca Fetch Data of Matched Date\n\n**Purpose:** Retrieves festival data from Google Sheets based on today's date\n**Data Source:** Google Sheets document containing festival calendar\n**Filter:** Matches the \"Date\" column with today's date\n**Returns:** Festival name, date, and description\n"
      },
      "typeVersion": 1
    },
    {
      "id": "19249584-4455-49c2-979e-cb7aea76635b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        -160
      ],
      "parameters": {
        "color": 6,
        "width": 500,
        "height": 740,
        "content": "## \ud83c\udfaf Prompt Generator\n\n**Purpose:** Creates specialized prompts for both image and social media content generation\n**Input:** Festival data (name, date, description)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n**Output:** Two distinct prompts:\n\n- Image generation prompt for visual content\n- Social media content prompts for all platforms\n**Function:** Transforms raw festival data into actionable AI instructions\n**Note:** This is the intelligence layer that contextualizes content creation"
      },
      "typeVersion": 1
    },
    {
      "id": "396c66a9-0a15-404e-b82b-87c96bfd3537",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -160
      ],
      "parameters": {
        "color": 3,
        "width": 540,
        "height": 740,
        "content": "## \ud83d\udcdd Generate Posts\n\n**Purpose:** Creates platform-specific social media content\n**Input:** Social media prompts from Prompt Generator\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n**Output:** Structured posts for X, Instagram, Facebook, and LinkedIn\n**Content:** Each post includes text, call-to-action, and hashtags\n**Function:** Generates tailored content optimized for each platform's requirements"
      },
      "typeVersion": 1
    },
    {
      "id": "a148d605-9332-4e51-8dab-0ce1fe978831",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        280
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 420,
        "content": "## \ud83c\udfa8 Generate Image\n\n**Purpose:** Creates festival-themed social media graphics using AI\n**API:** Google Gemini 2.0 Flash Preview Image Generation\n**Input:** Image generation prompt from Prompt Generator\n**Output:** Base64 encoded image data\n**Function:** Generates visually appealing graphics that match the festival theme"
      },
      "typeVersion": 1
    },
    {
      "id": "0bc5ea2a-6efb-4678-8873-b42f7b360a9b",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        280
      ],
      "parameters": {
        "color": 4,
        "width": 400,
        "height": 420,
        "content": "## \ud83d\uddbc\ufe0f Convert base64 to Image\n\n**Purpose:** Transforms base64 image data into binary format\n**Function:** Converts the AI-generated image from base64 string to binary data\n**Output:** Binary image file ready for social media platforms\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5f31d419-72e6-4529-b902-71007da46297",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        600
      ],
      "parameters": {
        "width": 400,
        "height": 420,
        "content": "## \ud83d\udcf1 Get Media ID for X\n\n**Purpose:** Uploads image to X (Twitter) and retrieves media ID\n**API:** X Media Upload API\n**Function:** Prepares the image for posting by getting a platform-specific media identifier\n**Output:** Media ID required for posting images on X\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8a106fa0-0563-4fbd-88af-ed5f4b45f3b5",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        600
      ],
      "parameters": {
        "color": 7,
        "width": 440,
        "height": 420,
        "content": "## \ud83d\udd17 Merge\n\n**Purpose:** Combines generated posts with media data\n**Function:** Merges the social media content with the uploaded image information\n**Output:** Unified data structure containing both content and media references\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fd620e0e-93f7-45f2-96a4-5e5b034bf1b1",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        600
      ],
      "parameters": {
        "color": 2,
        "width": 380,
        "height": 420,
        "content": "## \ud83d\udcca Aggregate\n\n**Purpose:** Consolidates all data for final posting operations\n**Function:** Combines output and data fields into a single, comprehensive dataset\n**Output:** Complete package ready for social media posting\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0de87223-7756-4cd1-a03a-368082debec0",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        -160
      ],
      "parameters": {
        "color": 6,
        "width": 380,
        "height": 360,
        "content": "## \ud83d\udc26 Post to X\n\n**Purpose:** Publishes content to X (Twitter) platform\n**Content:** X-specific text, call-to-action, and hashtags\n**Media:** Includes the generated festival image\n**Function:** Automated posting with proper image attachment\n**Error Handling:** Continues workflow even if posting fails"
      },
      "typeVersion": 1
    },
    {
      "id": "ab3bd185-4e37-4189-8fe7-c62b1b24de3b",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        220
      ],
      "parameters": {
        "color": 4,
        "width": 380,
        "height": 420,
        "content": "## \ud83d\udc26 Post on X via HTTP if other fails\n\n**Purpose:** Backup method for posting to X using direct HTTP requests\n**Function:** Alternative posting method if the standard X node fails\n**API:** Twitter API v2\n**Note:** Redundancy ensures posts are published even if primary method fails"
      },
      "typeVersion": 1
    },
    {
      "id": "632e0815-6668-4684-8a91-3e696a0d960d",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        660
      ],
      "parameters": {
        "color": 5,
        "width": 380,
        "height": 360,
        "content": "## \ud83d\udcd8 Facebook Graph API\n\n**Purpose:** Posts content to Facebook page\n**Content:** Facebook-specific text, call-to-action, and hashtags\n**Media:** Includes the generated festival image\n**Function:** Automated Facebook posting with image attachment\n**API:** Facebook Graph API v22.0"
      },
      "typeVersion": 1
    },
    {
      "id": "fbe48aa1-3675-411a-a2fa-29a96263792a",
      "name": "Post to Facebook",
      "type": "n8n-nodes-base.facebookGraphApi",
      "onError": "continueRegularOutput",
      "position": [
        1220,
        880
      ],
      "parameters": {
        "edge": "photos",
        "node": "page_id",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "message",
                "value": "={{ $json.output[0].Facebook.text }}\n\n{{ $json.output[0].Facebook.call_to_action }}\n\n{{ $json.output[0].Facebook.hashtags }}"
              }
            ]
          }
        },
        "sendBinaryData": true,
        "graphApiVersion": "v22.0",
        "httpRequestMethod": "POST",
        "binaryPropertyName": "data"
      },
      "credentials": {
        "facebookGraphApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7601ea8c-9f4a-4ab7-b8ea-ad8a15f663f5",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1560,
        -160
      ],
      "parameters": {
        "color": 3,
        "width": 380,
        "height": 860,
        "content": "## \ud83c\udfaf Workflow Summary\n\n**Overall Purpose:** Fully automated daily festival social media posting system\n\n**Key Features:**\n\n- Daily automated execution at 8 AM\n- Date-based festival data retrieval\n- AI-powered content and image generation\n- Multi-platform posting (X, Facebook)\n- Error handling and backup methods\n- Platform-specific content optimization\n\n\n**Data Flow:**\n\n1. Trigger \u2192 Get Date \u2192 Fetch Festival Data\n2. Generate AI Prompts \u2192 Create Image & Content\n3. Process Media \u2192 Merge Data \u2192 Post to Platforms\n\n\n**Benefits:**\n\n- Consistent daily posting schedule\n- Culturally appropriate content\n- Platform-optimized posts\n- Fully automated operation\n- Backup posting methods"
      },
      "typeVersion": 1
    },
    {
      "id": "5f6da5ba-a4a3-4e0a-b471-831f6e5e9769",
      "name": "Prompt generator model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        40,
        260
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "74db8a34-2c56-4435-9c8e-f028b8574d7d",
      "name": "Structured prompts",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        280,
        260
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"image_gen_prompt\": \"...\",\n  \"post_gen_prompt\": {\n    \"x_prompt\": \"...\",\n    \"instagram_prompt\": \"...\",\n    \"facebook_prompt\": \"...\",\n    \"linkedin_prompt\": \"...\"\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "9dca6be8-7585-4b8b-8a45-bd07defd9888",
      "name": "Post Generator Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        600,
        260
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "timezone": "Asia/Kolkata",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "41a07692-9cbd-4e80-91cf-e01161476e5a",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Post to X",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Facebook",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post on X via HTTP if other fails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image": {
      "main": [
        [
          {
            "node": "Convert base64 to Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Posts": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Everyday Trigger": {
      "main": [
        [
          {
            "node": "Get Today's Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Today's Date": {
      "main": [
        [
          {
            "node": "Fetch Data of Matched Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt Generator": {
      "main": [
        [
          {
            "node": "Generate Posts",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Posts": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Posts",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Get Media ID for X": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured prompts": {
      "ai_outputParser": [
        [
          {
            "node": "Prompt Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Post Generator Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Posts",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Prompt generator model": {
      "ai_languageModel": [
        [
          {
            "node": "Prompt Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Convert base64 to Image": {
      "main": [
        [
          {
            "node": "Get Media ID for X",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Data of Matched Date": {
      "main": [
        [
          {
            "node": "Prompt Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}