{
  "id": "",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "\ud83c\udfac Instantly Turn Ideas into Viral Instagram Reel Scenarios \ud83e\udd16 (Telegram, AI Agent)",
  "tags": [],
  "nodes": [
    {
      "name": "Start: Receive Message on Telegram",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        320,
        -80
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "name": "AI Model: GPT-4o",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1180,
        40
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "name": "Memory for Chat Context",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1340,
        40
      ],
      "parameters": {
        "sessionKey": "={{ $('Start: Receive Message on Telegram').item.json.message.chat.id }}",
        "sessionIdType": "customKey",
        "contextWindowLength": 10
      },
      "typeVersion": 1.3
    },
    {
      "name": "Optional: Log Ideas to Google Sheets",
      "type": "n8n-nodes-base.googleSheetsTool",
      "disabled": true,
      "position": [
        1500,
        40
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $now.toFormat(\"dd-MM-yyyy HH:mm\") }}",
            "Script": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('______', `Scenario Reels`, 'string') }}",
            "Status": "Note",
            "Description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('________', `Description Reels`, 'string') }}"
          },
          "schema": [
            {
              "id": "Script",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "name": "Set Error Message",
      "type": "n8n-nodes-base.set",
      "position": [
        760,
        120
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "name": "Error",
              "type": "string",
              "value": "An error has occurred"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "name": "Generate Reels Scenario with AI",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1232,
        -180
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "=You are a marketing expert with 25 years of experience.\nYou studied under the best U.S. marketers and copywriters\u2014Russell Brunson, Dan Kennedy, Gary Halbert, Alex Hormozi, Todd Brown, and others.\n\nYou also master viral Instagram Reels that rack up millions of views.\nYou know exactly how to grab and hold attention using top-tier marketing and psychology methods.\nYou command emotional storytelling and leverage psychological influence principles, blending brilliant techniques from legends such as Gary Bencivenga, Joe Sugarman, Dan Kennedy, Chris Haddad, John Carlton, David Ogilvy, Seth Godin, and more.\n\nWork at full power\u2014it's extremely important to me to get the best possible result.\n\nYou write hooks no one can scroll past.\n\nWrite in simple, lively language\u2014as if speaking straight into the camera.\nAvoid complicated wording, \"info-style\" delivery, and templates.\nShort sentences, spoken tone, no \"As an expert, I think\u2026,\" no fluff.\nImagine the person records this Reel in one take\u2014emotional, with rhythm, pauses, energy.\n\nBelow you'll find the idea for the Reel (transcript of the user's voice note):\n\n\"{text}\"\n\nBased on this, create:\n\t1.\tA Reel script (30\u201360 seconds) in the format:\n\u2022 HOOK \u2014 eye-catching first line\n\u2022 SUBTITLE \u2014 amplifies curiosity & value promise\n\u2022 BODY \u2014 explanation / story / argument / core message\n\u2022 CTA \u2014 light, non-generic call to action\n\t2.\tThree hook variants\u2014no clich\u00e9s, no emojis, but designed to stand out in the timeline\n\t3.\tA short Reel caption (1\u20132 lines)\u2014to appear under the Reel\n\n\u2757 Important: The viewer has already watched the Reel and is now reading the caption.\nYour job: keep their attention, trigger an \"aha\" moment, or spark the desire to save/share.\n\nThe caption should\n\u2013 be easy to understand\n\u2013 avoid repeating lines from the video\n\u2013 strengthen the Reel's core message\n\u2013 motivate an internal reaction or action\n\nExample openings:\n\u2014 \"And here's what almost every expert overlooks\u2026\"\n\u2014 \"Don't forget this before your next Reel post\"\n\u2014 \"Ever experienced this too?\"\n\n\u274c Avoid clich\u00e9s like \"Hey guys,\" \"Watch until the end,\" \"Subscribe to my channel.\"\n\n\ud83d\udcf8 Additional task \u2013 VISUAL IDEA for the Reel\nBased on the content, tone, and mood, give 1\u20132 concrete recommendations for suitable footage or imagery.\nThe visual idea should support the hook, amplify the emotion, and captivate the viewer within the first 2 seconds.\n\nNo generic suggestions like \"just show yourself on camera.\" Think concrete and cinematic:\n\u2013 Exactly what should be visible?\n\u2013 What happens in the background?\n\u2013 How's the lighting / mood?\n\u2013 Any visual metaphor or strong movement?\n\nExamples:\n\u2014 \"Dark room, only the face in focus, emotional close-up, camera slowly moving toward the person\"\n\u2014 \"Cut between old Insta posts and the person staring seriously into the lens\u2014then switch to a smiling face\"\n\u2014 \"Smartphone angrily tossed aside, then close-up of a calm, confident face delivering the message\"\n\n\ud83d\udce6 Return the result in this format:\n\n\u2e3b\n\n\ud83d\udca1 Hook (variants):\n\t1.\t\u2026\n\t2.\t\u2026\n\t3.\t\u2026\n\n\ud83c\udfac Script:\n\u2022 Hook: \u2026\n\u2022 Subtitle: \u2026\n\u2022 Body: \u2026\n\u2022 CTA: \u2026\n\n\ud83d\udcdd Reel Caption:\n\u2026\n\n\ud83d\udcf8 Visual Idea:\n\u2026"
        },
        "promptType": "define"
      },
      "typeVersion": 1.8
    },
    {
      "name": "Send Scenario to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1640,
        -180
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Start: Receive Message on Telegram').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "name": "Route by Input Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        540,
        -80
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Audio",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.voice.file_id }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Text",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.text || \"\" }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Error",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "error",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "name": "Set User Input",
      "type": "n8n-nodes-base.set",
      "position": [
        980,
        -80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "name": "text",
              "type": "string",
              "value": "={{ $json.message.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "name": "Send Error Message to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        980,
        120
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Start: Receive Message on Telegram').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "name": "Get Voice Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        760,
        -280
      ],
      "parameters": {
        "fileId": "={{ $json.message.voice.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "name": "Transcribe Voice to Text",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        980,
        -280
      ],
      "parameters": {
        "options": {},
        "resource": "audio",
        "operation": "transcribe"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        100,
        -540
      ],
      "parameters": {
        "width": 540,
        "height": 420,
        "content": "## \ud83d\ude80 Quick Start Guide\n\n1. \ud83d\udd10 Connect Your Accounts:\n\t\u2022\t\ud83e\udd16 Telegram: Link your Start & Send nodes to your bot (Use https://telegram.me/BotFather to create a new bot)\n\t\u2022\t\ud83e\udde0 OpenAI: Paste your API key in GPT-4o & Transcribe Audio nodes\n\t\u2022\t\ud83d\udcca Google Sheets (Optional): To log ideas, connect your account and pick your spreadsheet, otherwise leave deactivated\n\n2. \u2705 Activate Workflow:\nClick \"Activate\" (top-right)\n\n3. \ud83d\udcac Send Your Idea:\nText or voice message your Reel idea to your Telegram bot\n\n4. \ud83c\udfac Get Your Scenario:\nReceive a ready-to-use Reel plan:\nHook \u2728 Script \u270d\ufe0f Caption \ud83d\udcdd Visual Idea \ud83c\udfa8"
      },
      "typeVersion": 1
    },
    {
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1640,
        40
      ],
      "parameters": {
        "height": 120,
        "content": "## Optional:\n\ud83d\udcac Ask your bot to store the generated scenario in your google sheet*"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "Set User Input": {
      "main": [
        [
          {
            "node": "Generate Reels Scenario with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Model: GPT-4o": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Reels Scenario with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get Voice Message": {
      "main": [
        [
          {
            "node": "Transcribe Voice to Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Error Message": {
      "main": [
        [
          {
            "node": "Send Error Message to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Input Type": {
      "main": [
        [
          {
            "node": "Get Voice Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set User Input",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Memory for Chat Context": {
      "ai_memory": [
        [
          {
            "node": "Generate Reels Scenario with AI",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe Voice to Text": {
      "main": [
        [
          {
            "node": "Generate Reels Scenario with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Reels Scenario with AI": {
      "main": [
        [
          {
            "node": "Send Scenario to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start: Receive Message on Telegram": {
      "main": [
        [
          {
            "node": "Route by Input Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Optional: Log Ideas to Google Sheets": {
      "ai_tool": [
        [
          {
            "node": "Generate Reels Scenario with AI",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}