{
  "name": "Content Repurpose Bot",
  "nodes": [
    {
      "parameters": {
        "url": "https://api.apify.com/v2/acts/1p1aa7gcSydPkAE0d/run-sync-get-dataset-items",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n    \"customMapFunction\": \"(object) => { return {...object} }\",\n    \"duration\": \"all\",\n    \"features\": \"all\",\n    \"getTrending\": false,\n    \"includeShorts\": false,\n    \"maxItems\": 1,\n    \"sort\": \"r\",\n    \"startUrls\": [\n        \"{{ $json.message.text }}\"\n    ],\n    \"uploadDate\": \"all\"\n}",
        "options": {
          "redirect": {
            "redirect": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        940,
        240
      ],
      "id": "959d2974-740c-4a6e-8c3d-b797ceb775b3",
      "name": "HTTP Request - Scrape Youtube Video"
    },
    {
      "parameters": {
        "url": "={{ $json.captions.captionTracks[0].baseUrl }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1240,
        240
      ],
      "id": "b4521d2e-5224-4c1a-903c-16653460cad6",
      "name": "HTTP Request - Downloads Script",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "jsCode": "const xmlData = $input.first().json.data;\n\nconst plainText = xmlData\n  .replace(/<[^>]+>/g, ' ')           // Replace tags with spaces\n  .replace(/&amp;#39;/g, \"'\")         // Convert &#39; to '\n  .replace(/&amp;/g, \"&\")             // Convert &amp; to &\n  .replace(/\\[[^\\]]*\\]/g, '')         // Remove anything inside square brackets\n  .replace(/\\s+/g, ' ')               // Replace multiple spaces with a single space\n  .trim();                            // Trim leading and trailing spaces\n\nreturn [{\n  json: {\n    transcript: plainText\n  }\n}];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2040,
        220
      ],
      "id": "7d706cf8-36a1-4a1d-970c-a7fc07d8d8e3",
      "name": "Code - Clean Youtube Script",
      "executeOnce": false
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-3.5-turbo",
          "mode": "list",
          "cachedResultName": "GPT-3.5-TURBO"
        },
        "messages": {
          "values": [
            {
              "content": "You are a language model trained to take a YouTube video script and transform it into a LinkedIn post. The format should mimic the structure and tone of successful LinkedIn posts that focus on personal stories, unexpected learnings, and actionable advice. The output should be conversational, inviting, and relevant to professionals seeking value in a short, digestible format.\n\n",
              "role": "system"
            },
            {
              "content": "Adopt a friendly and engaging tone with an emphasis on personal storytelling. The post should sound approachable and down-to-earth, like you\u2019re having a casual conversation with a colleague or friend. Inject a sense of authenticity and vulnerability, especially when discussing challenges or insights. Keep the language clear, concise, and inviting, encouraging readers to engage by sharing their own experiences or thoughts in the comments. Use the structure of a professional yet relatable storyteller.\n\n",
              "role": "assistant"
            },
            {
              "content": "=Write a concise, engaging LinkedIn post based on this script: \n\n{{ $json.transcript }}\n\nusing this structure:\n\nStrong, counterintuitive statement or surprising fact (1 sentence)\n\nKey insight or lesson learned from personal experience (1-2 sentences)\n\nCommon misconceptions or typical mistakes people/businesses make in relation to this insight (bullet points, 3-5 short, punchy items)\n\nYour unique approach or solution clearly outlined (short, punchy sentences, bullet points encouraged)\n\nBrief personal anecdote or reason why you adopted this approach (1-2 sentences)\n\nDirect and impactful summary reinforcing the core idea (2-3 concise sentences)\n\nStrong closing statement or call-to-action (1-2 sentences)\n\nUse short, clear sentences. Maintain an assertive, confident tone. Avoid unnecessary filler and industry jargon. Keep the total length engaging and easy to read, mimicking an Alex Hormozi-style directness\u00a0and\u00a0punch.\n\nmake sure it always foloows this structure JSON strcutre, this isa ne xample:\n\n{\n  \"post\": {\n    \"hook\": \"example\",\n    \"introduction\": \"example\",\n    \"personal_touch\": \"example\",\n    \"bullet_points\": [\n      \"example\",\n      \"example\",\n      \"example\"\n    ],\n    \"actionable_tips\": [\n      \"example\",\n      \"example\",\n      \"example\"\n    ],\n    \"cta\": \"example\",\n    \"ps\": \"example\"\n  }\n}\n"
            }
          ]
        },
        "simplify": false,
        "jsonOutput": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        2360,
        520
      ],
      "id": "55b117bf-5019-4ce0-9196-69592ac665ea",
      "name": "OpenAI - Generates LinkedIn Post",
      "executeOnce": true,
      "credentials": {
        "openAiApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1.2,
      "position": [
        220,
        20
      ],
      "id": "83a71f2a-95d7-446a-96b6-f33f8f464039",
      "name": "Telegram Trigger - Message Received",
      "webhookId": "REDACTED",
      "credentials": {
        "telegramApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "e2dc2211-84ea-4ba2-bfe8-c44980d01bd4",
              "leftValue": "={{ $json.message.text }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            },
            {
              "id": "64c8b64f-8136-4dc2-92ec-6f6370d98e53",
              "leftValue": "={{ $json.message.text.isUrl() }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        440,
        20
      ],
      "id": "028d1a47-fb0a-45a0-bf07-9af0e275b27d",
      "name": "Filter - Remove Non-Urls"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": "insta",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    },
                    "id": "844cf170-249c-40d5-862e-8e0393d83811"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Instagram"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "7ca3adcd-5493-4617-9c71-fa444a0cca0d",
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": "link",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "LinkedIn"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "bc409e1d-b3af-43b8-bb91-ef941602c42a",
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": "you",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Youtube"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "e9e371d7-b9fc-4597-ab85-a35efd9606dd",
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": "tiktok",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Tiktok"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        660,
        20
      ],
      "id": "37138fc2-8779-43a2-86b6-007e0f4f353e",
      "name": "Switch = Determine Platform"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a language model trained to take a YouTube video script and transform it into a short form content script such as a instagram script. The format should mimic the structure and tone of successful instagram or tiktok that focus on personal stories, unexpected learnings, and actionable advice. The output should be conversational, inviting, and relevant to professionals seeking value in a short, digestible format.\n\n",
              "role": "system"
            },
            {
              "content": "Adopt a friendly and engaging tone with an emphasis on personal storytelling. The post should sound approachable and down-to-earth, like you\u2019re having a casual conversation with a colleague or friend. Inject a sense of authenticity and vulnerability, especially when discussing challenges or insights. Keep the language clear, concise, and inviting, encouraging readers to engage by sharing their own experiences or thoughts in the comments. Use the structure of a professional yet relatable storyteller.\n\n",
              "role": "assistant"
            },
            {
              "content": "=Input:\n{{ $json.transcript }}\n\nInstructions:\nGenerate a short form content script based on this long form (Youtube) script. The short form content needs to be less then 60 seconds, as it will be posted on tiktok and instagram reels. \n\nalways output this example format:\n\npost: \n\nsegment_1: \n- content \n- visuals\n\nsegment_2: \n- content \n- visuals\n\nthere should always be 5 segments, for the maximum and the minimum.\n"
            }
          ]
        },
        "jsonOutput": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        2360,
        220
      ],
      "id": "c818d0ed-bf9a-46c5-9728-4f362d270bc1",
      "name": "OpenAI - Generates Instagram Post",
      "credentials": {
        "openAiApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger - Message Received').item.json.message.chat.id }}",
        "text": "=Instagram / Tiktok Script Breakdown\n\n\ud83d\udd39 Segment 1:\nContent:\n{{ $json.message.content.post['segment_1'].content }}\n\nVisual:\n{{ $json.message.content.post['segment_1'].visuals }}\n\n\ud83d\udd39 Segment 2:\nContent:\n{{ $json.message.content.post['segment_2'].content }}\n\nVisual:\n{{ $json.message.content.post['segment_2'].visuals }}\n\n\ud83d\udd39 Segment 3:\nContent:\n{{ $json.message.content.post['segment_3'].content }}\n\nVisual:\n{{ $json.message.content.post['segment_3'].visuals }}\n\n\ud83d\udd39 Segment 4:\nContent:\n{{ $json.message.content.post['segment_4'].content }}\n\nVisual:\n{{ $json.message.content.post['segment_4'].visuals }}\n\n\ud83d\udd39 Segment 5:\nContent:\n{{ $json.message.content.post['segment_5'].content }}\n\nVisual:\n{{ $json.message.content.post['segment_5'].visuals }}",
        "additionalFields": {
          "reply_to_message_id": "={{ $('Telegram Trigger - Message Received').item.json.message.message_id }}"
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        2780,
        220
      ],
      "id": "e6bda363-3715-476c-b5f9-530b03e83f29",
      "name": "Telegram - Send Instagram Post",
      "webhookId": "REDACTED",
      "credentials": {
        "telegramApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $json.captions.captionTracks[0].base_url }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1620,
        420
      ],
      "id": "c342b688-91ef-45e8-a134-0b4580131551",
      "name": "HTTP Request - Downloads Script V2",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger - Message Received').item.json.message.chat.id }}",
        "text": "=Unfortantely the video provided had no captions that could be returned through the automation",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1880,
        440
      ],
      "id": "4e24d6fd-176c-43d4-bc33-c92275d50d69",
      "name": "Telegram - Send Error Message",
      "webhookId": "REDACTED",
      "credentials": {
        "telegramApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger - Message Received').item.json.message.chat.id }}",
        "text": "=LinkedIn Post: \n\n{{ $json.choices[0].message.content.post.hook }}\n\n{{ $json.choices[0].message.content.post.introduction }}\n\n{{ $json.choices[0].message.content.post.introduction }}\n\n{{ $json.choices[0].message.content.post.personal_touch }}\n\n{{ $json.choices[0].message.content.post.bullet_points }}\n\n{{ $json.choices[0].message.content.post.actionable_tips }}\n\n{{ $json.choices[0].message.content.post.cta }}\n\n{{ $json.choices[0].message.content.post.ps }}",
        "additionalFields": {
          "reply_to_message_id": "={{ $('Telegram Trigger - Message Received').item.json.message.message_id }}"
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        2780,
        520
      ],
      "id": "89443edc-8669-4e57-a22a-9db7b9a49df4",
      "name": "Telegram - Send LinkedIn Post",
      "webhookId": "REDACTED",
      "credentials": {
        "telegramApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "url": "https://api.apify.com/v2/acts/Wpp1BZ6yGWjySadk3/run-sync-get-dataset-items",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n    \"deepScrape\": true,\n    \"limitPerSource\": 1,\n    \"rawData\": false,\n    \"urls\": [\n        \"{{ $json.message.text }}\"\n    ]\n}",
        "options": {
          "redirect": {
            "redirect": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        940,
        20
      ],
      "id": "8613352b-01bb-4846-abc2-c5ed38e6a434",
      "name": "HTTP Request - Scrape LinkedIn Post"
    },
    {
      "parameters": {
        "jsCode": "return { transcript: $input.first().json.text };\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1660,
        20
      ],
      "id": "c0773ea4-2f6b-4342-82a2-e38a442a999b",
      "name": "Code - Normalize Data"
    },
    {
      "parameters": {
        "url": "https://api.apify.com/v2/acts/8yz4aO3qlqckRu3nu/run-sync-get-dataset-items",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n    \"url\": \"{{ $json.message.text }}\",\n    \"use_cache\": false\n}",
        "options": {
          "redirect": {
            "redirect": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        940,
        -260
      ],
      "id": "5d4e80ad-e245-4c9f-a533-3810b8492914",
      "name": "HTTP Request - Scrape Instagram Video"
    },
    {
      "parameters": {
        "url": "={{ $json.video_url }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1200,
        -260
      ],
      "id": "79a9ad9e-5c55-42b8-b7e4-e6147d34bad6",
      "name": "HTTP Request - Download Video From Instagram"
    },
    {
      "parameters": {
        "resource": "audio",
        "operation": "transcribe",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1440,
        -260
      ],
      "id": "61ce85ad-74ac-4afd-a366-424d55a1d16b",
      "name": "OpenAI - Transcribe Video",
      "executeOnce": true,
      "credentials": {
        "openAiApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "return { transcript:  $input.first().json.text};\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1660,
        -260
      ],
      "id": "28ccd77a-6a6e-4e9e-aca9-279a7b8d422c",
      "name": "Code - Normalize Data V3"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a language model trained to take a YouTube video script and transform it into a short form content script such as a youtube script. The format should mimic the structure and tone of successful youtube that focus on personal stories, unexpected learnings, and actionable advice. The output should be conversational, inviting, and relevant to professionals seeking value in a short, digestible format.\n\n",
              "role": "system"
            },
            {
              "content": "Adopt a friendly and engaging tone with an emphasis on personal storytelling. The post should sound approachable and down-to-earth, like you\u2019re having a casual conversation with a colleague or friend. Inject a sense of authenticity and vulnerability, especially when discussing challenges or insights. Keep the language clear, concise, and inviting, encouraging readers to engage by sharing their own experiences or thoughts in the comments. Use the structure of a professional yet relatable storyteller.\n\n",
              "role": "assistant"
            },
            {
              "content": "=Input:\n{{ $json.transcript }}\n\nInstructions:\nGenerate a short form content script based on this long form (Youtube) script. The short form content needs to be less then 60 seconds, as it will be posted on tiktok and instagram reels. \n\nalways output this example format:\n\npost: \n\nsegment_1: \n- content \n- visuals\n\nsegment_2: \n- content \n- visuals\n\nthere should always be 3 segments, for the maximum and the minimum.\n\nthe youtube video should be 10 minutes minimum. \n"
            }
          ]
        },
        "jsonOutput": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        2360,
        -20
      ],
      "id": "26101ca5-4a49-4b10-b649-2e1f8168639c",
      "name": "OpenAI - Generates Youtube Video",
      "credentials": {
        "openAiApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger - Message Received').item.json.message.chat.id }}",
        "text": "=Youtube Script Breakdown\n\n\ud83d\udd39 Segment 1:\nContent:\n{{ $json.message.content.post['segment_1'].content }}\n\nVisual:\n{{ $json.message.content.post['segment_1'].visuals }}\n\n\ud83d\udd39 Segment 2:\nContent:\n{{ $json.message.content.post['segment_2'].content }}\n\nVisual:\n{{ $json.message.content.post['segment_2'].visuals }}\n\n\ud83d\udd39 Segment 3:\nContent:\n{{ $json.message.content.post['segment_3'].content }}\n\nVisual:\n{{ $json.message.content.post['segment_3'].visuals }}\n",
        "additionalFields": {
          "reply_to_message_id": "={{ $('Telegram Trigger - Message Received').item.json.message.message_id }}"
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        2780,
        -20
      ],
      "id": "6d6ae4d4-c583-4b5e-af56-ec1d1b83e37a",
      "name": "Telegram - Send Youtube Video",
      "webhookId": "REDACTED",
      "credentials": {
        "telegramApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger - Message Received').item.json.message.chat.id }}",
        "text": "=Facebook Post Breakdown\n\n\ud83d\udd39 Paragraph 1\n{{ $json.message.content.post.paragraph_1 }}\n\n\ud83d\udd39 Paragraph 1\n{{ $json.message.content.post.paragraph_2 }}",
        "additionalFields": {
          "reply_to_message_id": "={{ $('Telegram Trigger - Message Received').item.json.message.message_id }}"
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        2780,
        -240
      ],
      "id": "06c10968-b0ab-452b-bf7f-e01a510860d7",
      "name": "Telegram - Send Youtube Video2",
      "webhookId": "REDACTED",
      "credentials": {
        "telegramApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a language model trained to take text based content (that can either be a long form content such as youtube video, short form content, or text based like facebook) and transform it into afacebook post. The format should mimic the structure and tone of successful youtube that focus on personal stories, unexpected learnings, and actionable advice. The output should be conversational, inviting, and relevant to professionals seeking value in a short, digestible format.\n\n",
              "role": "system"
            },
            {
              "content": "Adopt a friendly and engaging tone with an emphasis on personal storytelling. The post should sound approachable and down-to-earth, like you\u2019re having a casual conversation with a colleague or friend. Inject a sense of authenticity and vulnerability, especially when discussing challenges or insights. Keep the language clear, concise, and inviting, encouraging readers to engage by sharing their own experiences or thoughts in the comments. Use the structure of a professional yet relatable storyteller.\n\n",
              "role": "assistant"
            },
            {
              "content": "=Input:\n{{ $json.transcript }}\n\nInstructions:\nGenerate a high converting facebook post based on this script. Facebook posts tend to be one paragraph, or split into two smaller paragraphs that are quite straight to the point whilst having one wow or impressive factor. We can call that the hook. Its more conversational though. \n\nalways output post in json in two small paragraphs in this exact json format: \n\npost: \n\nparagraph_1 \n\nparagraph_2\n"
            }
          ]
        },
        "jsonOutput": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        2360,
        -240
      ],
      "id": "400f345f-30fa-4747-85b1-ea488f6e31dd",
      "name": "OpenAI - Generates Facebook / Twitter Post",
      "credentials": {
        "openAiApi": {
          "id": "REDACTED",
          "name": "REDACTED"
        }
      }
    },
    {
      "parameters": {
        "url": "https://api.apify.com/v2/acts/rFfyNgnvUxD1bm8hh/run-sync-get-dataset-items",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n    \"shouldDownloadCovers\": false,\n    \"shouldDownloadVideos\": false,\n    \"shouldGetTranscript\": true,\n    \"videos\": [\n        \"{{ $json.message.text }}\"\n    ]\n}",
        "options": {
          "redirect": {
            "redirect": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        940,
        640
      ],
      "id": "5491e3d5-3541-436a-b374-8222c1c11ec7",
      "name": "HTTP Request - Scrape Tiktok Video"
    },
    {
      "parameters": {
        "jsCode": "return { transcript: $input.first().json.transcript };\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2040,
        640
      ],
      "id": "b508dc2f-20c7-4151-8cae-633ecb4d7c8d",
      "name": "Code - Normalize Data V2"
    }
  ],
  "pinData": {},
  "connections": {
    "HTTP Request - Scrape Youtube Video": {
      "main": [
        [
          {
            "node": "HTTP Request - Downloads Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Downloads Script": {
      "main": [
        [
          {
            "node": "Code - Clean Youtube Script",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request - Downloads Script V2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Clean Youtube Script": {
      "main": [
        [
          {
            "node": "OpenAI - Generates LinkedIn Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "OpenAI - Generates Instagram Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "OpenAI - Generates Facebook / Twitter Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Generates LinkedIn Post": {
      "main": [
        [
          {
            "node": "Telegram - Send LinkedIn Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger - Message Received": {
      "main": [
        [
          {
            "node": "Filter - Remove Non-Urls",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter - Remove Non-Urls": {
      "main": [
        [
          {
            "node": "Switch = Determine Platform",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch = Determine Platform": {
      "main": [
        [
          {
            "node": "HTTP Request - Scrape Instagram Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request - Scrape LinkedIn Post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request - Scrape Youtube Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request - Scrape Tiktok Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Generates Instagram Post": {
      "main": [
        [
          {
            "node": "Telegram - Send Instagram Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Downloads Script V2": {
      "main": [
        [
          {
            "node": "Code - Clean Youtube Script",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram - Send Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Scrape LinkedIn Post": {
      "main": [
        [
          {
            "node": "Code - Normalize Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Normalize Data": {
      "main": [
        [
          {
            "node": "OpenAI - Generates Instagram Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "OpenAI - Generates Youtube Video",
            "type": "main",
            "index": 0
          },
          {
            "node": "OpenAI - Generates Facebook / Twitter Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Scrape Instagram Video": {
      "main": [
        [
          {
            "node": "HTTP Request - Download Video From Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Download Video From Instagram": {
      "main": [
        [
          {
            "node": "OpenAI - Transcribe Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Transcribe Video": {
      "main": [
        [
          {
            "node": "Code - Normalize Data V3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Normalize Data V3": {
      "main": [
        [
          {
            "node": "OpenAI - Generates LinkedIn Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "OpenAI - Generates Youtube Video",
            "type": "main",
            "index": 0
          },
          {
            "node": "OpenAI - Generates Facebook / Twitter Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Generates Youtube Video": {
      "main": [
        [
          {
            "node": "Telegram - Send Youtube Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Generates Facebook / Twitter Post": {
      "main": [
        [
          {
            "node": "Telegram - Send Youtube Video2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Scrape Tiktok Video": {
      "main": [
        [
          {
            "node": "Code - Normalize Data V2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Normalize Data V2": {
      "main": [
        [
          {
            "node": "OpenAI - Generates LinkedIn Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "OpenAI - Generates Youtube Video",
            "type": "main",
            "index": 0
          },
          {
            "node": "OpenAI - Generates Facebook / Twitter Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "0e857781-bc24-4b60-82fa-906ee37b3a79",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "7eb18c029aab76aa969d16eb02ede6a8b8fa757e2a2062b3c380a00fd8d61ac3"
  },
  "id": "rM0q8gfx0PZKcqPP",
  "tags": []
}