{
  "name": "Telegram Content Pipeline",
  "nodes": [
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "3f3051c4-9b57-4f91-a593-4941c17fa8df",
      "name": "Telegram Trigger",
      "webhookId": "214822a8-16aa-47b6-af2c-3fefb8930178",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.message.voice.file_id }}",
                    "rightValue": "",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "voice"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "af16bc8d-ae92-40c9-9299-4a1f689653c8",
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": "",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "text"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "046f26e2-4d32-42e7-ad72-d6792b55829d",
                    "leftValue": "={{ $json.message.photo[0].file_id }}",
                    "rightValue": "",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "photo"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        220,
        0
      ],
      "id": "ce50785b-fc76-4fe5-81a0-adaff3309e2b",
      "name": "Switch"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "10db5b9e-4247-42b6-8e34-11254a0e9e72",
              "name": "text",
              "value": "={{ $json.message.text }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        440,
        100
      ],
      "id": "85db9e70-afc6-4e04-bed1-f2fff738094f",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "resource": "file",
        "fileId": "={{ $json.message.voice.file_id }}"
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        440,
        -100
      ],
      "id": "69e0b954-0283-45c2-8025-fbb84d674321",
      "name": "Telegram",
      "webhookId": "0cfb6668-48f9-41ca-82d7-5bae2cff9174",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "resource": "audio",
        "operation": "transcribe",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        660,
        -100
      ],
      "id": "57b43957-a363-4f5a-8143-31867d5f76b2",
      "name": "OpenAI",
      "credentials": {
        "openAiApi": {
          "id": "6LnEKBlR3JCiWGdk",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "=You are a helpful assistant.\n\nYou have access to the Google Sheets Tool, which allows you to read, create and delete new rows, and update rows in the Google Sheet.\n\nYou must always follow these Rules:\n- Return the full generated post text to the user **before** storing it in Google Sheets.\n- Never assume the user can retrieve the text from Google Sheets. Always send the post in response.\n- If the user asks to save the post, confirm that the text has been shown before saving.\n- Every time you generate a new post, also create a unique Post ID.\n\nThe Post ID should be a short identifier, such as a combination of the topic and a number (e.g., \"vegan001\"). The postID must NOT contain any special characters or spaces like \"_\". FOR EXAMPLE NEVER USE THIS AS POST ID: \"vegan_001\" but \"vegan001\" without any special characters.\n\nWhen saving or updating a post, always use this Post ID to reference the correct row in Google Sheets.\n\nEvery time you generate a new social media post, store the full post text in memory as \"last_generated_post\".\n\nWhen the user asks for the post again, retrieve \"last_generated_post\" and return the full text.\n\nNever assume the user has access to the Google Sheet. Always provide the full post text when asked.\n\nWhenever you generate a post, ALWAYS  return the full text as part of the response.  \n\nNever just say \"saved to Google Sheets\"—always include the full post text in your reply.  \n\nThis ensures that other tools can use the text for further processing.\n\n\nIf the user says \"generate image\", always include the last generated post text in the response.\nNever assume that the system remembers previous messages—always send all necessary information.\n\nAfter generating a post, always ask the user where they want to publish it. The user should provide a list of platforms (e.g., \"Twitter, LinkedIn\"). You then save the list to the sheet.\n\nAfter the user told you what platforms to publish to, ask him if he wants to publish the post.\n\nIf the user types \"publish post {post_id}\", do ONLY tell him that the post was transmitted to the corresponding social media platform that are named in the google sheet next to that post.\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        1100,
        -100
      ],
      "id": "12765061-0dba-4406-9ac1-402e845b20a8",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": "claude-3-5-sonnet-20241022",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.2,
      "position": [
        940,
        200
      ],
      "id": "46f2f8df-bd37-4711-b0e1-03fbd705c451",
      "name": "Anthropic Chat Model",
      "credentials": {
        "anthropicApi": {
          "id": "V3fqS2iW92jDHAR8",
          "name": "Anthropic account"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "text": "={{ $('AI Agent').item.json.output }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        2940,
        -40
      ],
      "id": "d83956ae-c26d-4795-a050-77648e26a113",
      "name": "Telegram1",
      "webhookId": "07f7b049-c85f-45f4-8622-fc74893e9d83",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "contextWindowLength": 20
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        1100,
        180
      ],
      "id": "d604b566-a540-4d93-9497-7a6954928e7b",
      "name": "Window Buffer Memory"
    },
    {
      "parameters": {
        "resource": "image",
        "prompt": "=Generate a realistic image for the following TOPIC: \n\n{{ $json.output }}\n\n---\n\nThe image that features a person in a natural, everyday setting. The scene should look as if it was taken by an amateur using a smartphone, with no professional photography elements. \n\n\n\nThe person should be engaged in an activity, related to the TOPIC mentioned above. \n\n#Rule: The image must not contain any text or signage. ",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        2080,
        -580
      ],
      "id": "4772180c-db18-46ca-8004-4e710c3a217e",
      "name": "OpenAI1",
      "credentials": {
        "openAiApi": {
          "id": "6LnEKBlR3JCiWGdk",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $('Telegram Trigger').item.json.message.text }}",
                    "rightValue": "=generate image",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "generate image"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "1e02a758-42af-4b79-b06a-b3051e6a8147",
                    "leftValue": "={{ $('Telegram Trigger').item.json.message.text }}",
                    "rightValue": "generate image",
                    "operator": {
                      "type": "string",
                      "operation": "notContains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "not generate image"
            }
          ]
        },
        "options": {
          "ignoreCase": true
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1900,
        -140
      ],
      "id": "26347b8f-6031-47dd-94ae-056eaa7c4ac9",
      "name": "Switch1",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "sendPhoto",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "binaryData": true,
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        2300,
        -580
      ],
      "id": "f4a6e3cc-b9d9-4f47-a519-7957303c1c53",
      "name": "Telegram2",
      "webhookId": "418efd6c-3c18-4725-9967-d57338eefad6",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram2').item.json.result.chat.id }}",
        "text": "={{ $('AI Agent').item.json.output }}. \n\nHere is the URL to the generated image:\n{{ encodeURI($json.correct_drive_url) }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        3660,
        -580
      ],
      "id": "873b2da7-585f-4d3a-8882-38c56ed381f5",
      "name": "Telegram3",
      "webhookId": "182b655e-d280-4778-924d-9d2227b1a09a",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "inputDataFieldName": "result",
        "name": "={{ $json.result.file_unique_id }}.png",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "1QzYDsVYltdul6GMkh4clw2JYW3ctyhnI",
          "mode": "list",
          "cachedResultName": "AI Agent Social Media",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1QzYDsVYltdul6GMkh4clw2JYW3ctyhnI"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        2860,
        -580
      ],
      "id": "a5fce165-c260-4d1b-9f41-44e50aa68708",
      "name": "Google Drive",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "Aj5Mx22HVhBujibO",
          "name": "Google Drive account 3"
        }
      }
    },
    {
      "parameters": {
        "url": "=https://api.telegram.org/botINSERT_BOT_API/getFile?file_id={{ $json.result.photo[3].file_id }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2500,
        -580
      ],
      "id": "d1ac4be7-7c2a-4ab4-9a6c-1b28df42ffbf",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "url": "=https://api.telegram.org/file/botINSERT_BOT_API/{{ $json.result.file_path }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "result"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2680,
        -580
      ],
      "id": "eca4fb26-6d56-4404-94fb-33f04d4750f7",
      "name": "HTTP Request1"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "eb35be49-42f8-4a11-8383-59f4e28dd194",
              "name": "correct_drive_url",
              "value": "={{ $('Google Drive').item.json.webContentLink }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        3420,
        -580
      ],
      "id": "259ef307-de28-4569-8e10-dae058366980",
      "name": "Correct Drive URL"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak",
          "mode": "list",
          "cachedResultName": "Post Templates - Social Media AI Agent - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Templates",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit#gid=0"
        },
        "options": {
          "dataLocationOnSheet": {
            "values": {
              "rangeDefinition": "detectAutomatically",
              "readRowsUntil": "firstEmptyRow"
            }
          }
        }
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        1280,
        180
      ],
      "id": "d9c2299f-296b-481d-8c14-9690d7bf60ff",
      "name": "Google Sheets - Read Templates",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "LliVyi35Cxeh8PL7",
          "name": "Google Sheets account 2"
        }
      }
    },
    {
      "parameters": {
        "operation": "delete",
        "documentId": {
          "__rl": true,
          "value": "1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak",
          "mode": "list",
          "cachedResultName": "Post Templates - Social Media AI Agent - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 740956331,
          "mode": "list",
          "cachedResultName": "Generated Post",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit#gid=740956331"
        }
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        1420,
        180
      ],
      "id": "025badb2-01c6-47b5-b665-0b759ebb4f7d",
      "name": "Delete Post Templates",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "LliVyi35Cxeh8PL7",
          "name": "Google Sheets account 2"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak",
          "mode": "list",
          "cachedResultName": "Post Templates - Social Media AI Agent - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 740956331,
          "mode": "list",
          "cachedResultName": "Generated Post",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit#gid=740956331"
        },
        "options": {
          "dataLocationOnSheet": {
            "values": {
              "rangeDefinition": "detectAutomatically",
              "readRowsUntil": "firstEmptyRow"
            }
          }
        }
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        1960,
        80
      ],
      "id": "3ad1879f-91ef-4b0a-89d7-def4957091a2",
      "name": "Google Sheets - Read Post Texts",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "LliVyi35Cxeh8PL7",
          "name": "Google Sheets account 2"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak",
          "mode": "list",
          "cachedResultName": "Post Templates - Social Media AI Agent - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 740956331,
          "mode": "list",
          "cachedResultName": "Generated Post",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit#gid=740956331"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Post Text": "={{ $fromAI(\"post_text\",\"this is the text of the post\") }}",
            "Image URL": "={{ $fromAI(\"image_url\",\"this is the URL of the AI generated image\") }}",
            "Post ID": "={{ $fromAI(\"post_id\",\"this is the id of the post\") }}",
            "Platform": "={{ $fromAI(\"platform\",\"the name of the social media platform this post should be published to. If there are several names, separate them by a comma\") }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Post ID",
              "displayName": "Post ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Post Text",
              "displayName": "Post Text",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Image URL",
              "displayName": "Image URL",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Image Display",
              "displayName": "Image Display",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Platform",
              "displayName": "Platform",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Publish Date",
              "displayName": "Publish Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        1800,
        140
      ],
      "id": "1c234a15-7787-452e-8748-e47d9e5b1bec",
      "name": "Google Sheets - Add Post Texts",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "LliVyi35Cxeh8PL7",
          "name": "Google Sheets account 2"
        }
      }
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak",
          "mode": "list",
          "cachedResultName": "Post Templates - Social Media AI Agent - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 740956331,
          "mode": "list",
          "cachedResultName": "Generated Post",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit#gid=740956331"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Post ID": "={{ $fromAI(\"post_id\",\"this is the id of the post\") }}",
            "Image URL": "={{ $fromAI(\"image_url\",\"this is the URL of the AI generated image\") }}",
            "Post Text": "={{ $fromAI(\"post_text\",\"this is the text of the post\") }}",
            "Platform": "={{ $fromAI(\"platform\",\"the name of the social media platform this post should be published to. If there are several names, separate them by a comma\") }}"
          },
          "matchingColumns": [
            "Post ID"
          ],
          "schema": [
            {
              "id": "Post ID",
              "displayName": "Post ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Post Text",
              "displayName": "Post Text",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Image URL",
              "displayName": "Image URL",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Image Display",
              "displayName": "Image Display",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Platform",
              "displayName": "Platform",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Publish Date",
              "displayName": "Publish Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        1620,
        160
      ],
      "id": "6cb65a62-5cc5-4c33-898a-8b73e7d48b11",
      "name": "Google Sheets - Update Post Texts",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "LliVyi35Cxeh8PL7",
          "name": "Google Sheets account 2"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak",
          "mode": "list",
          "cachedResultName": "Post Templates - Social Media AI Agent - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Templates",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Post Style": "={{ $fromAI(\"post_style\",\"this is the style of the post template summarized in one or two words\") }}",
            "Post Template": "={{ $fromAI(\"post_template\",\"this is the text of the post template\") }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Post Style",
              "displayName": "Post Style",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Post Template",
              "displayName": "Post Template",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        1160,
        340
      ],
      "id": "7a36f5f7-4760-417d-ab6c-50befd71779e",
      "name": "Google Sheets - Add Post Templates",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "LliVyi35Cxeh8PL7",
          "name": "Google Sheets account 2"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $('Telegram Trigger').item.json.message.text }}",
                    "rightValue": "publish post",
                    "operator": {
                      "type": "string",
                      "operation": "notContains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "not publish post"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "3889943f-afba-44a3-b4d3-7b07170c7259",
                    "leftValue": "={{ $('Telegram Trigger').item.json.message.text }}",
                    "rightValue": "publish post",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "publish post"
            }
          ]
        },
        "options": {
          "ignoreCase": true
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        2220,
        -180
      ],
      "id": "694af400-5bd7-4a38-aec8-6605ba3665f5",
      "name": "Switch2"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak",
          "mode": "list",
          "cachedResultName": "Post Templates - Social Media AI Agent - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 740956331,
          "mode": "list",
          "cachedResultName": "Generated Post",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit#gid=740956331"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Post ID",
              "lookupValue": "={{ $json.postID }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2880,
        140
      ],
      "id": "0d5ba0b6-5e4a-43d7-a7ee-d5810c3f984f",
      "name": "Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "LliVyi35Cxeh8PL7",
          "name": "Google Sheets account 2"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "846e19f8-5918-4d09-9e68-fa1d28f2123a",
              "name": "postID",
              "value": "={{$('Telegram Trigger').item.json.message.text.toLowerCase().split('publish post ')[1]}}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2560,
        140
      ],
      "id": "f4703837-7b69-4409-9d63-47e349387b1b",
      "name": "Edit Fields1"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "INSERT_MAKE_WEBHOOK",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "Post Text",
              "value": "={{$('Google Sheets').item.json['Post Text']}}"
            },
            {
              "name": "Image URL",
              "value": "={{$('Google Sheets').item.json['Image URL']}}"
            },
            {
              "name": "Platforms",
              "value": "={{$('Google Sheets').item.json['Platform']}}"
            },
            {
              "name": "Row Number",
              "value": "={{ $json.row_number }}"
            },
            {
              "name": "Post ID",
              "value": "={{ $json['Post ID'] }}"
            },
            {
              "name": "Chat ID",
              "value": "={{ $('Telegram Trigger').item.json.message.chat.id }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3140,
        140
      ],
      "id": "b1d36f84-df99-4431-8f1b-fecab3b64077",
      "name": "HTTP Request2"
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "text": "={{ $('AI Agent').item.json.output }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        3420,
        140
      ],
      "id": "084466df-4c90-4894-b4a1-7b40bb64f036",
      "name": "Telegram4",
      "webhookId": "0515b983-d1b4-4051-9594-5b33d55accf6",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "operation": "share",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "permissionsUi": {
          "permissionsValues": {
            "role": "reader",
            "type": "anyone"
          }
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        3080,
        -580
      ],
      "id": "860305cf-5567-48f6-93ea-43995850a3bb",
      "name": "Google Drive1",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "Aj5Mx22HVhBujibO",
          "name": "Google Drive account 3"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $('Telegram Trigger').item.json.message.voice.file_id }}",
                    "rightValue": "",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "voice"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "af16bc8d-ae92-40c9-9299-4a1f689653c8",
                    "leftValue": "={{ $('Telegram Trigger').item.json.message.text }}",
                    "rightValue": "",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "text"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1460,
        -200
      ],
      "id": "f4a4e875-29e0-4e3d-a4e5-a331491ac983",
      "name": "Switch4"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $('OpenAI').item.json.text }}",
                    "rightValue": "=generate image",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "generate image"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "1e02a758-42af-4b79-b06a-b3051e6a8147",
                    "leftValue": "={{ $('OpenAI').item.json.text }}",
                    "rightValue": "generate image",
                    "operator": {
                      "type": "string",
                      "operation": "notContains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "not generate image"
            }
          ]
        },
        "options": {
          "ignoreCase": true
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1680,
        -360
      ],
      "id": "e829b0d0-1d92-47e2-9058-d35cf5d2a64d",
      "name": "Switch3",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $('OpenAI').item.json.text }}",
                    "rightValue": "=publish post",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "publish post"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "1e02a758-42af-4b79-b06a-b3051e6a8147",
                    "leftValue": "={{ $('OpenAI').item.json.text }}",
                    "rightValue": "publish post",
                    "operator": {
                      "type": "string",
                      "operation": "notContains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "not publish post"
            }
          ]
        },
        "options": {
          "ignoreCase": true
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        2120,
        -340
      ],
      "id": "1206d435-43e9-4dd9-879e-47e10b3e434d",
      "name": "Switch5",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "846e19f8-5918-4d09-9e68-fa1d28f2123a",
              "name": "postID",
              "value": "={{$('OpenAI').item.json.text.split('Publish post ')[1].replace('.', '').trim().toLowerCase()}}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2520,
        -380
      ],
      "id": "19be3dc1-3874-40f5-9beb-52e8135cd46f",
      "name": "Edit Fields2"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak",
          "mode": "list",
          "cachedResultName": "Post Templates - Social Media AI Agent - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 740956331,
          "mode": "list",
          "cachedResultName": "Generated Post",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jKO3unOJaCVuV2OnnLMjCDjD7wGNQKktipxcTKotMak/edit#gid=740956331"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Post ID",
              "lookupValue": "={{ $json.postID }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2840,
        -340
      ],
      "id": "27c50452-31de-4bd9-a030-cb096b9f964a",
      "name": "Google Sheets1",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "LliVyi35Cxeh8PL7",
          "name": "Google Sheets account 2"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "INSERT_MAKE_WEBHOOK",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "Post Text",
              "value": "={{$('Google Sheets1').item.json['Post Text']}}"
            },
            {
              "name": "Image URL",
              "value": "={{$('Google Sheets1').item.json['Image URL']}}"
            },
            {
              "name": "Platforms",
              "value": "={{$('Google Sheets1').item.json['Platform']}}"
            },
            {
              "name": "Row Number",
              "value": "={{ $json.row_number }}"
            },
            {
              "name": "Post ID",
              "value": "={{ $json['Post ID'] }}"
            },
            {
              "name": "Chat ID",
              "value": "={{ $('Telegram Trigger').item.json.message.chat.id }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3100,
        -340
      ],
      "id": "e85f415d-42c2-4d77-b956-0eff2b3186fe",
      "name": "HTTP Request3"
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "text": "={{ $('AI Agent').item.json.output }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        3380,
        -340
      ],
      "id": "587a197a-875f-4107-9eae-fe0eb756e840",
      "name": "Telegram5",
      "webhookId": "ded04fb3-2470-48eb-9262-8021b0fb1fa9",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "resource": "file",
        "fileId": "={{ $json.message.photo[3].file_id }}"
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        640,
        -480
      ],
      "id": "f40b7203-247c-49ee-865c-73097b3200da",
      "name": "Telegram6",
      "webhookId": "6bc764db-51db-47ab-99f0-d5bc54a74841",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "text": "=Here is the URL to the uploaded image:\n{{ encodeURI($json.correct_drive_url) }}\n\nIf you want to save this image to a certain post text, copy and paste this link into the chatfield and say for what post it should be used with.",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1820,
        -620
      ],
      "id": "e9c7d759-2922-4bb6-a694-3d0296951df0",
      "name": "Telegram7",
      "webhookId": "3feda4d2-76c8-4b57-bb32-f2fb71e9e2b6",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    },
    {
      "parameters": {
        "name": "={{ $json.result.file_unique_id }}.png",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "1QzYDsVYltdul6GMkh4clw2JYW3ctyhnI",
          "mode": "list",
          "cachedResultName": "AI Agent Social Media",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1QzYDsVYltdul6GMkh4clw2JYW3ctyhnI"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1020,
        -620
      ],
      "id": "521f5480-d6f3-43fe-b57c-acfc34177c5d",
      "name": "Google Drive2",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "Aj5Mx22HVhBujibO",
          "name": "Google Drive account 3"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "eb35be49-42f8-4a11-8383-59f4e28dd194",
              "name": "correct_drive_url",
              "value": "={{ $('Google Drive2').item.json.webContentLink }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1580,
        -620
      ],
      "id": "6d10076e-a63d-4e61-9916-014b83535ebb",
      "name": "Correct Drive URL1"
    },
    {
      "parameters": {
        "operation": "share",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "permissionsUi": {
          "permissionsValues": {
            "role": "reader",
            "type": "anyone"
          }
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1240,
        -620
      ],
      "id": "017d4080-425a-43cd-8350-7498ea2eb884",
      "name": "Google Drive3",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "Aj5Mx22HVhBujibO",
          "name": "Google Drive account 3"
        }
      }
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "8d5581c3-fd22-4b1d-a3e4-4719d03a6677",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        760,
        -820
      ],
      "id": "1ca86965-8d6d-4345-a953-5178375fbac6",
      "name": "Webhook",
      "webhookId": "8d5581c3-fd22-4b1d-a3e4-4719d03a6677"
    },
    {
      "parameters": {
        "chatId": "={{ $json.body.ChatID }}",
        "text": "=The post \"{{ $json.body.postID }}\" was successfully published to {{ $json.body.platform }} at {{ $json.body.publishTime }}.",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        980,
        -820
      ],
      "id": "ead7df29-d6a9-434b-8ddf-2b1382b3f264",
      "name": "Telegram8",
      "webhookId": "d4dd6f27-c6b2-409c-a6d3-f3c90f29070c",
      "credentials": {
        "telegramApi": {
          "id": "B194AMD8QoBAQXDZ",
          "name": "Telegram account 3"
        }
      }
    }
  ],
  "connections": {
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Switch4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI1": {
      "main": [
        [
          {
            "node": "Telegram2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "OpenAI1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram2": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive": {
      "main": [
        [
          {
            "node": "Google Drive1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Correct Drive URL": {
      "main": [
        [
          {
            "node": "Telegram3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Read Templates": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete Post Templates": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Read Post Texts": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Add Post Texts": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Update Post Texts": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Add Post Templates": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Switch2": {
      "main": [
        [
          {
            "node": "Telegram1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "HTTP Request2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request2": {
      "main": [
        [
          {
            "node": "Telegram4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive1": {
      "main": [
        [
          {
            "node": "Correct Drive URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch4": {
      "main": [
        [
          {
            "node": "Switch3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch3": {
      "main": [
        [
          {
            "node": "OpenAI1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch5": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets1": {
      "main": [
        [
          {
            "node": "HTTP Request3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request3": {
      "main": [
        [
          {
            "node": "Telegram5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Google Sheets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive2": {
      "main": [
        [
          {
            "node": "Google Drive3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Correct Drive URL1": {
      "main": [
        [
          {
            "node": "Telegram7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive3": {
      "main": [
        [
          {
            "node": "Correct Drive URL1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram6": {
      "main": [
        [
          {
            "node": "Google Drive2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Telegram8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "146c7293-ca24-4fb8-9ecc-6078427fb1b7",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "7ff6625f0127f3e9a7865e3493009de1c48f57dc5ed87def3ae3316be7f6b238"
  },
  "id": "qLCBHVt1cQtK0lim",
  "tags": []
}