AutomationFlowsAI & RAG › Episode 16: AI Poem Tiktok Videos Community

Episode 16: AI Poem Tiktok Videos Community

Episode 16: AI Poem TikTok videos community. Uses httpRequest, lmChatOpenAi, lmChatOllama, lmChatDeepSeek. Event-driven trigger; 71 nodes.

Event trigger★★★★★ complexityAI-powered71 nodesHTTP RequestOpenAI ChatOllama ChatLm Chat Deep SeekOpenRouter ChatGoogle Gemini ChatLm Chat Azure Open AiLm Chat Xai Grok
AI & RAG Trigger: Event Nodes: 71 Complexity: ★★★★★ AI nodes: yes Added:
Episode 16: AI Poem Tiktok Videos Community — n8n workflow card showing HTTP Request, OpenAI Chat, Ollama Chat integration

This workflow follows the Form Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Episode 16: AI Poem TikTok videos community",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        2320,
        -580
      ],
      "id": "52d4c232-16a7-4be3-baf0-9cfbe5087e20",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.together.ai/v1/images/generations",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "black-forest-labs/FLUX.1-schnell-Free"
            },
            {
              "name": "prompt",
              "value": "={{ $json.image_prompt }}"
            },
            {
              "name": "width",
              "value": "={{ 720 }}"
            },
            {
              "name": "height",
              "value": "={{ 1280 }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2580,
        -820
      ],
      "id": "d3dd944e-32fe-4b17-ba92-022985a36a55",
      "name": "Generate AI image",
      "alwaysOutputData": false,
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/storage",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "={{ $json.data[0].url }}"
            },
            {
              "name": "media_type",
              "value": "image"
            }
          ]
        },
        "options": {
          "timeout": 10000
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2880,
        -880
      ],
      "id": "3dc338d2-05d1-4ca8-b62d-1e16140c1819",
      "name": "Upload image to server",
      "retryOnFail": true
    },
    {
      "parameters": {
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/storage/{{ $('Start generating TTS (chatterbox)').item.json.file_id }}/status",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3560,
        -760
      ],
      "id": "a0a7aa8d-e1ce-49c2-8f16-814cc805b370",
      "name": "Get status of TTS generation",
      "retryOnFail": true
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "ready",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "91402596-3978-4dfc-91b7-9ffe3521b862"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "ready"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "0c29765e-4213-434c-9bf3-c5e854dd6ee8",
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "processing",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "processing"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "4a6cfd86-e690-417e-aa6d-ae497e1177ae",
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "not_found",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "failed"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        3720,
        -700
      ],
      "id": "30edaabc-7648-4e26-8bf8-945aa316dcfa",
      "name": "TTS status switch"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/video-tools/generate/tts-captioned-video",
        "sendBody": true,
        "contentType": "form-urlencoded",
        "specifyBody": "string",
        "body": "={{ \n\n[\n  `background_id=${$('Upload image to server').item.json.file_id}`,\n  `audio_id=${$json.tts_audio_id}`,\n  `text=${encodeURIComponent($('Loop Over Items').item.json.text)}`\n].filter(Boolean).join('&')\n\n}}",
        "options": {
          "redirect": {
            "redirect": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4140,
        -720
      ],
      "id": "4256ef7c-ed14-4b73-8352-bacfa0e4cc94",
      "name": "Start generating captioned TTS video"
    },
    {
      "parameters": {
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/storage/{{ $('Start generating captioned TTS video').item.json.file_id }}/status",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4540,
        -700
      ],
      "id": "2b574280-839e-40fd-b4eb-081f08297a99",
      "name": "Get video generation status",
      "retryOnFail": true
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "ready",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "91402596-3978-4dfc-91b7-9ffe3521b862"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "ready"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "0c29765e-4213-434c-9bf3-c5e854dd6ee8",
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "processing",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "processing"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "4a6cfd86-e690-417e-aa6d-ae497e1177ae",
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "not_found",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "failed"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        4720,
        -700
      ],
      "id": "78f39ae2-e751-4c06-b1ca-60421e775e93",
      "name": "Video generation switch"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a7fdacca-749e-4f69-84fd-50075e0e3409",
              "name": "video_id",
              "value": "={{ $('Start generating captioned TTS video').item.json.file_id }}",
              "type": "string"
            },
            {
              "id": "6c99c267-5c41-4697-ba19-b51d9e8c9a4e",
              "name": "tts_id",
              "value": "={{ $('Setup TTS file_id').item.json.tts_audio_id }}",
              "type": "string"
            },
            {
              "id": "21dd08a7-f785-4829-8609-a99950f21572",
              "name": "image_id",
              "value": "={{ $('Upload image to server').item.json.file_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        4980,
        -700
      ],
      "id": "ad8fa920-3427-4a92-a894-6aa10359d1b6",
      "name": "Setup media fields"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        2640,
        -360
      ],
      "id": "812fb186-3461-4462-8dfa-1fb789f7c1f0",
      "name": "Combine loop items"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/video-tools/merge",
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "video_ids",
              "value": "={{ $json.data.map(item => item.video_id).join(',') }}"
            },
            {
              "name": "background_music_id",
              "value": "={{ $('Set background music id').item.json.background_music_id ?? '' }}"
            },
            {
              "name": "background_music_volume",
              "value": "={{ $('Configure me').item.json.background_music_volume }}"
            }
          ]
        },
        "options": {
          "redirect": {
            "redirect": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2840,
        -360
      ],
      "id": "d7f103b9-56f6-47a4-a249-322e268e845e",
      "name": "Start merging the videos"
    },
    {
      "parameters": {
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/storage/{{ $('Start merging the videos').item.json.file_id }}/status",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3260,
        -320
      ],
      "id": "66fdf7c2-4aa6-4743-a6aa-268c37d5099a",
      "name": "Get status of the video merge"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "ready",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "91402596-3978-4dfc-91b7-9ffe3521b862"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "ready"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "0c29765e-4213-434c-9bf3-c5e854dd6ee8",
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "processing",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "processing"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "4a6cfd86-e690-417e-aa6d-ae497e1177ae",
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "not_found",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "failed"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        3440,
        -300
      ],
      "id": "c66b510c-9d10-4525-bc57-6012aaf2b786",
      "name": "Video merge status switch"
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        2880,
        -700
      ],
      "id": "200793ed-abd1-4ec5-ad12-789735ea2ff8",
      "name": "Wait for the error / rate limit to go away"
    },
    {
      "parameters": {
        "amount": 1
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        3380,
        -760
      ],
      "id": "00c13bcc-4e1b-413e-a94a-c8bd9ef535ac",
      "name": "Wait until the TTS gets generated"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/audio-tools/tts/chatterbox",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "={{ $('Loop Over Items').item.json.text }}"
            },
            {
              "name": "sample_audio_id",
              "value": "={{ $('Set sample voice id').item.json.sample_audio_id ?? '' }}"
            },
            {
              "name": "exaggeration",
              "value": "={{ $('Configure me').item.json.chatterbox_exaggeration }}"
            },
            {
              "name": "cfg_weight",
              "value": "={{ $('Configure me').item.json.chatterbox_cfg_weight }}"
            },
            {
              "name": "temperature",
              "value": "={{ $('Configure me').item.json.chatterbox_temperature }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3200,
        -760
      ],
      "id": "f3cdbbad-e98d-48e3-9dce-b9519511c398",
      "name": "Start generating TTS (chatterbox)"
    },
    {
      "parameters": {
        "amount": 1
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        4340,
        -700
      ],
      "id": "cb820a9d-5ae1-451b-ba2a-aa8e9c920350",
      "name": "Wait until the video gets generated"
    },
    {
      "parameters": {
        "amount": 1
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        3060,
        -320
      ],
      "id": "fe9c4338-9e69-471b-9f22-e85933c4f9eb",
      "name": "Wait until the videos gets merged together"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "d41f1ef6-7591-41b7-805d-94b58caba5c4",
              "name": "tts_audio_id",
              "value": "={{ $('Start generating TTS (chatterbox)').item.json.file_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        3920,
        -720
      ],
      "id": "10f8a6e7-f631-4854-bfd1-80de769ffd88",
      "name": "Setup TTS file_id"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4.1-mini",
          "mode": "list",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        5140,
        -1640
      ],
      "id": "a7b5a1a9-a151-429c-a6c5-9b88c1e4447f",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "content": "# Pick your choice of LLM \u26a0\ufe0f\n\u26a0\ufe0f Make sure to deactive/delete the rest of the LLMs after selecting one",
        "height": 700,
        "width": 700,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4600,
        -1780
      ],
      "id": "0442135c-6c3a-4b5b-9ae0-80d65b1f2a57",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "model": "qwen3:32b",
        "options": {
          "numCtx": 16048
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "typeVersion": 1,
      "position": [
        4680,
        -1640
      ],
      "id": "121cc7ad-844c-4836-a06d-038f34df9d6b",
      "name": "Ollama Chat Model",
      "credentials": {
        "ollamaApi": {
          "name": "<your credential>"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "typeVersion": 1,
      "position": [
        5000,
        -1640
      ],
      "id": "a58a049b-31e3-4db2-b7f5-bbd2ff3905ff",
      "name": "DeepSeek Chat Model",
      "credentials": {
        "deepSeekApi": {
          "name": "<your credential>"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "model": "tngtech/deepseek-r1t-chimera:free",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        5140,
        -1300
      ],
      "id": "67109933-9de8-4a4e-a2ae-77fedc741d40",
      "name": "OpenRouter Chat Model",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        4680,
        -1300
      ],
      "id": "4a6d5161-7458-4b3c-bc98-ab45c1621a8e",
      "name": "Google Gemini Chat Model",
      "disabled": true
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "typeVersion": 1,
      "position": [
        4680,
        -1480
      ],
      "id": "4dcec653-3a66-4224-ad51-4349b3c8a004",
      "name": "Azure OpenAI Chat Model",
      "disabled": true
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatXAiGrok",
      "typeVersion": 1,
      "position": [
        4840,
        -1480
      ],
      "id": "90500acc-0ac0-494f-b44b-1183afcbaf24",
      "name": "xAI Grok Chat Model",
      "disabled": true
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514",
          "cachedResultName": "Claude 4 Sonnet"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        5000,
        -1480
      ],
      "id": "59e9dbe2-99b2-434c-9890-23e0ee65c010",
      "name": "Anthropic Chat Model",
      "disabled": true
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatXAiGrok",
      "typeVersion": 1,
      "position": [
        5140,
        -1480
      ],
      "id": "4c1810d0-31b3-4cef-9c73-29aa5f90b174",
      "name": "xAI Grok Chat Model1",
      "disabled": true
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "typeVersion": 1,
      "position": [
        5000,
        -1300
      ],
      "id": "8af5bea3-124d-4e40-9e2d-75e82cf16481",
      "name": "Groq Chat Model",
      "disabled": true
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAwsBedrock",
      "typeVersion": 1,
      "position": [
        4840,
        -1640
      ],
      "id": "17a7729f-27ba-4c65-9b15-75ebbffffb95",
      "name": "AWS Bedrock Chat Model",
      "disabled": true
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "typeVersion": 1,
      "position": [
        4840,
        -1300
      ],
      "id": "37145a8f-0b08-402e-a401-cbe9fc6be2c3",
      "name": "Mistral Cloud Chat Model",
      "disabled": true
    },
    {
      "parameters": {
        "content": "# 1. Create script from the story",
        "height": 560,
        "width": 340
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4220,
        -1640
      ],
      "id": "24d66b56-f618-4051-b6ec-113d8557b17d",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "# 5. Merge the videos",
        "height": 360,
        "width": 1180
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2540,
        -480
      ],
      "id": "a6929ee5-d152-4c4e-9bce-3409d11230d2",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "# 2. Generate an image with Flux \u26a0\ufe0f\n\n\u26a0\ufe0f add your credentials to the `Generate AI image` node\n\nthe free image generation is slow, if you want to make it faster, just remove the `free`",
        "height": 520,
        "width": 580
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2540,
        -1040
      ],
      "id": "6a4dc30a-4d8c-4396-ae0b-02604fdefdfc",
      "name": "Sticky Note7"
    },
    {
      "parameters": {
        "content": "# 3. Create speech from text",
        "height": 520,
        "width": 900
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3160,
        -1040
      ],
      "id": "f61416f8-ccf8-477f-b8a1-d883a7068f0d",
      "name": "Sticky Note8"
    },
    {
      "parameters": {
        "content": "# 4. Generate captioned video",
        "height": 520,
        "width": 1040
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4100,
        -1040
      ],
      "id": "325346b1-ae10-44a0-96bb-4ae56c21ac33",
      "name": "Sticky Note9"
    },
    {
      "parameters": {
        "text": "=<Instructions>\nTake the following poem and break it down into multiple scenes. Break it up at every two lines, and add punctuation to increase emotions for the text to speech model we are going to use.\n\nFor each scene, create an image prompt that we'll use with an image generation tool.\n\nCreate the image generation prompt using the ImagePromptTemplate below.\nInsert the part of the poem in it, and a description of a melancholic illustration showing the scene from the distance.\nAdd \"Do not add text or characters to the final image.\" to the end of each image prompt.\n</Instructions>\n\n<ImagePromptTemplate>\nGenerate an image that matches the content of this poem stanza, based on the provided art style.\n\nPoem:\n{ADD_POEM_PART_HERE}\n\nScene:\n{MELANCHOLIC_ILLUSTRATION}\n\nArt style:\nSoft, poetic, and slightly surreal art style, featuring subtle textures, pastel tones, gentle lighting, minimalistic human figures, and a dreamlike, nostalgic mood.\nThe overall palette is muted, featuring pastels or gentle tones, warm neutrals, and soft, faded textures, with an atmospheric, calming, melancholic mood. The image evokes feelings of nostalgia, quiet contemplation, and the beauty of small, tender moments.\nUse these keywords: storybook illustration, soft painterly texture, dreamy twilight, cottagecore, surreal elements, long shadows, vintage atmosphere, whimsical\n</ImagePromptTemplate>\n\n<Poem>\n{{ $('On form submission').item.json['The poem'] }}\n</Poem>\n\n/nothink",
        "schemaType": "manual",
        "inputSchema": "{\n    \"type\": \"object\",\n    \"properties\": {\n        \"scenes\": {\n            \"type\": \"array\",\n            \"description\": \"poem scenes\",\n            \"items\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"text\": {\n                        \"type\": \"string\",\n                        \"description\": \"the text of the scene, it will be used for TTS\"\n                    },\n                    \"image_prompt\": {\n                        \"type\": \"string\",\n                        \"description\": \"prompt for image generation\"\n                    }\n                },\n                \"required\": [\n                    \"text\",\n                    \"image_prompt\"\n                ]\n            }\n        },\n        \"title\": {\n            \"type\": \"string\",\n            \"description\": \"the title of the youtube video\"\n        },\n        \"description\": {\n            \"type\": \"string\",\n            \"description\": \"the description of the youtube video\"\n        },\n        \"tags\": {\n            \"type\": \"array\",\n            \"description\": \"tags for sharing the video on youtube\",\n            \"items\": {\n                \"type\": \"string\"\n            }\n        }\n    },\n    \"required\": [\n        \"scenes\",\n        \"title\",\n        \"description\",\n        \"tags\"\n    ]\n}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1.1,
      "position": [
        4260,
        -1420
      ],
      "id": "f02c0e33-c297-486b-b7b6-cbdc4c78ff39",
      "name": "Create the script"
    },
    {
      "parameters": {
        "fieldToSplitOut": "output.scenes",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        4260,
        -1260
      ],
      "id": "2eb6c0b9-69e4-455d-9afb-6d3f6ff92c3e",
      "name": "Split Out"
    },
    {
      "parameters": {
        "content": "# How to set up this automation?\n\n## Make sure to use n8n `1.97.1` or higher, lower versions could break the stuctured output node\n\n## 1. Add the AI Agents No-Code Tools server URL to the Configure me node, and your Postiz server URL\n## 2. Select the LLM you want to use, make sure to deactivate the rest\n## 3. Add your free Together.ai API key to the Generate AI image node\n## 4. Setup the Postiz nodes with your credentials\n",
        "height": 340,
        "width": 1680,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2880,
        -2020
      ],
      "id": "4de30265-2750-4dfd-93e4-0f84cfc3eec2",
      "name": "Sticky Note14"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7bbb518a-c4f1-49a5-9e72-3e9d939b131b",
              "name": "AI_AGENTS_NO_CODE_TOOLS_URL",
              "value": "YOUR_AGENTS_URL",
              "type": "string"
            },
            {
              "id": "79226bcb-3a26-4d30-b3a3-e578cda677f9",
              "name": "postiz_api_url",
              "value": "YOUR_POSTIZ_URL",
              "type": "string"
            },
            {
              "id": "34f8b468-b669-46ed-be9d-e77e15f36380",
              "name": "background_music_volume",
              "value": 0.1,
              "type": "number"
            },
            {
              "id": "a725aaf1-c91e-4d5b-87f9-d540d309098c",
              "name": "chatterbox_exaggeration",
              "value": 0.5,
              "type": "number"
            },
            {
              "id": "d048e31d-f1cb-48ac-9ff2-13f1028c843e",
              "name": "chatterbox_cfg_weight",
              "value": 0.5,
              "type": "number"
            },
            {
              "id": "96943158-11f6-4731-9d4b-dbae0862d7ab",
              "name": "chatterbox_temperature",
              "value": 0.8,
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2640,
        -1400
      ],
      "id": "db216237-aee9-40a1-96e6-becfd39d758c",
      "name": "Configure me"
    },
    {
      "parameters": {
        "content": "# Configure me \u26a0\ufe0f\n",
        "height": 560,
        "width": 300,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2540,
        -1640
      ],
      "id": "4a259f9c-f66b-43e2-8d0f-9f85a2d4a739",
      "name": "Sticky Note12"
    },
    {
      "parameters": {
        "url": "={{ $json.AI_AGENTS_NO_CODE_TOOLS_URL }}/health",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3120,
        -1480
      ],
      "id": "6dce468b-24ef-4ef3-9e7d-fd14f25982f7",
      "name": "HTTP Request",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "errorMessage": "The server is not running or isn't configured"
      },
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        3120,
        -1260
      ],
      "id": "e9dd7a2f-36f1-4f04-b157-f3189bccfc18",
      "name": "Server isn't ready"
    },
    {
      "parameters": {
        "content": "# Test connection",
        "height": 560,
        "width": 420,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2880,
        -1640
      ],
      "id": "7cbafa1f-26a9-43cd-afbf-e212dc14c44b",
      "name": "Sticky Note15"
    },
    {
      "parameters": {
        "content": "# 7. cleanup (removing tmp files)\nif you want to delete the generated video too, add it's id to the array",
        "height": 360,
        "width": 540
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4680,
        -480
      ],
      "id": "642256d4-d954-4d2d-9679-0a5cfd10a3ff",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "27bcaf96-fcaa-41cb-8a51-436870ce2110",
              "name": "file_ids",
              "value": "={{ [...$('Combine loop items').item.json.data.map(item => [item.video_id, item.tts_id, item.image_id]).flat(), $('Configure me').item.json.chatterbox_clone_voice_id, $('Configure me').item.json.background_music_id].filter(Boolean) }}",
              "type": "array"
            },
            {
              "id": "ff26af44-84ff-46a0-8532-5eeca8dbb099",
              "name": "",
              "value": "",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        4720,
        -360
      ],
      "id": "690f9982-fac1-49ce-950e-ca1d44f38a56",
      "name": "Set file ids to delete"
    },
    {
      "parameters": {
        "method": "DELETE",
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/storage/{{ $json.file_ids }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        5040,
        -360
      ],
      "id": "23af9913-171c-4f5a-9978-4e80d356670e",
      "name": "Delete tmp files",
      "disabled": true
    },
    {
      "parameters": {
        "fieldToSplitOut": "file_ids",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        4880,
        -360
      ],
      "id": "66cf907a-b80b-43e4-8c66-2cdd53da96ef",
      "name": "For each file"
    },
    {
      "parameters": {
        "content": "# \ud83d\udcda [Join our Skool community for support, premium content and more!](https://www.skool.com/ai-agents-az/about?w9)\n\n## Be part of a growing community and help us create more content like this",
        "height": 260,
        "width": 700,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2140,
        -1940
      ],
      "id": "135d6870-d780-492b-88c9-aef20c7faa34",
      "name": "Sticky Note16"
    },
    {
      "parameters": {
        "content": "# 6. Schedule with Postiz \u26a0\ufe0f",
        "height": 820,
        "width": 880,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3760,
        -480
      ],
      "id": "43333e98-33d7-448e-bf4a-2b7e0a2dd8f7",
      "name": "Sticky Note20"
    },
    {
      "parameters": {
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/storage/{{ $('Start merging the videos').item.json.file_id }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3800,
        -360
      ],
      "id": "4217cbd9-0f2d-40ce-8367-9e41a636817b",
      "name": "Download the video for Postiz"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Configure me').item.json.postiz_api_url }}/upload",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4000,
        -360
      ],
      "id": "80af0cc5-11e9-4190-8c75-b5ab27468408",
      "name": "Upload video to Postiz",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        },
        "httpCustomAuth": {
          "name": "<your credential>"
        },
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "url": "={{ $('Configure me').item.json.postiz_api_url }}/integrations",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4220,
        -360
      ],
      "id": "a09b3f33-7cb3-46e5-86bf-df043a2e6fbf",
      "name": "Get Postiz integrations",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        },
        "httpCustomAuth": {
          "name": "<your credential>"
        },
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        4400,
        -360
      ],
      "id": "a1628818-22a4-4f0a-b5f9-76f304bfa04f",
      "name": "Merge integrations",
      "disabled": true
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Configure me').item.json.postiz_api_url }}/posts",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"type\": \"schedule\",\n  \"date\": \"{{ $now.plus(1, 'days').toISO() }}\",\n  \"tags\": [],\n  \"shortLink\": false,\n  \"posts\": [\n    {\n      \"integration\": {\n        \"id\": \"{{ $json.postiz_integration_id }}\"\n      },\n      \"value\": [\n        {\n          \"content\": \"{{ $('Create the script').item.json.output.description }}\",\n          \"image\": [\n            {\n              \"id\": \"{{ $('Upload video to Postiz').item.json.id }}\",\n              \"path\": \"{{ $('Upload video to Postiz').item.json.path }}\"\n            }\n          ]\n        }\n      ],\n      \"settings\": {\n      \"title\": \"{{ $('Create the script').item.json.output.title }}\",\n      \"type\": \"unlisted\",\n      \"tags\": {{ JSON.stringify($('Create the script').item.json.output.tags.map(tag => ({ value: tag, label: tag }))) }}\n  }\n    }\n  ]\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4380,
        120
      ],
      "id": "e345e45e-67bf-408e-bbfe-697ada94e692",
      "name": "Schedule YouTube video",
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "content": "# Setup the integration\n\nYou should implement your own logic here.\n\n1. You can hard-code the desired integration id\n2. You can filter the integrations by your own logic\n\nMake sure to modify the `settings` field if you are sharing to other platforms than YouTube",
        "height": 500,
        "width": 380
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3800,
        -180
      ],
      "id": "39ce5c34-01a8-4d91-9026-9819338c23c9",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "formTitle": "AI Poem Video Creator for TikTok (and YouTube shorts + Facebook Reels)",
        "formFields": {
          "values": [
            {
              "fieldLabel": "The poem",
              "fieldType": "textarea",
              "placeholder": "add a poem here - but make sure you use one that's public domain",
              "requiredField": true
            },
            {
              "fieldLabel": "Background music",
              "fieldType": "file",
              "multipleFiles": false,
              "acceptFileTypes": ".mp3"
            },
            {
              "fieldLabel": "Sample voice",
              "fieldType": "file",
              "multipleFiles": false,
              "acceptFileTypes": ".wav, .mp3"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        2300,
        -1400
      ],
      "id": "8027f34a-5400-4060-af7c-8e3463660762",
      "name": "On form submission"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "6b9c15f3-2db9-4a1e-a688-4fc4e95ded53",
              "leftValue": "={{ $('On form submission').item.json['Background music'] }}",
              "rightValue": "",
              "operator": {
                "type": "object",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3380,
        -1360
      ],
      "id": "33f125f4-a269-43c0-a58b-ebf01ce865cc",
      "name": "If"
    },
    {
      "parameters": {
        "jsCode": "return $('On form submission').first()"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        3580,
        -1560
      ],
      "id": "e96f1e84-ff14-45e6-9885-bf56b49a2955",
      "name": "Relay background music"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7aec0c26-8c27-4aa6-bec7-1f65d9fe3aaf",
              "name": "background_music_id",
              "value": "={{ $json.file_id ?? '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        3580,
        -1260
      ],
      "id": "91d157aa-d837-4db8-8dae-a941ca5af40f",
      "name": "Set background music id"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "6b9c15f3-2db9-4a1e-a688-4fc4e95ded53",
              "leftValue": "={{ $('On form submission').item.json['Sample voice'] }}",
              "rightValue": "",
              "operator": {
                "type": "object",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3820,
        -1420
      ],
      "id": "04774c97-d731-43cf-87a3-0ddf2c27fbf1",
      "name": "If1"
    },
    {
      "parameters": {
        "jsCode": "return $('On form submission').first()"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        4020,
        -1560
      ],
      "id": "1d66eb57-b2b7-4534-bf7e-1992404dd506",
      "name": "Relay sample audio"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7aec0c26-8c27-4aa6-bec7-1f65d9fe3aaf",
              "name": "sample_audio_id",
              "value": "={{ $json.file_id ?? '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        4020,
        -1240
      ],
      "id": "c819b6be-9c95-49fd-a624-6f7ddeeff28a",
      "name": "Set sample voice id"
    },
    {
      "parameters": {
        "content": "To get free social media scheduling, you need to host your own [Postiz instance](https://docs.postiz.com/installation/coolify)\n\nIf you run Postiz on localhost, you won't be able to schedule TikTok videos - for that you need to deploy it on a VPS, add a (sub)domain and go through the verification process\n\nAs an alternative, you can use the free tier of [ayrshare](https://www.ayrshare.com/).",
        "height": 340,
        "width": 260
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4680,
        0
      ],
      "id": "239114d9-67a8-4a7e-afd5-19f22eae356b",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "# Upload background music",
        "height": 560,
        "width": 400,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3340,
        -1640
      ],
      "id": "c0c070ad-56e0-4b31-be0c-6f650d3698fb",
      "name": "Sticky Note17"
    },
    {
      "parameters": {
        "content": "# Upload voice sample",
        "height": 560,
        "width": 400,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3780,
        -1640
      ],
      "id": "b39de1f2-1612-4817-9a31-7aec28afbe2a",
      "name": "Sticky Note18"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/storage",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "=Background_music"
            },
            {
              "name": "media_type",
              "value": "audio"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3580,
        -1420
      ],
      "id": "83abe191-0d76-41ef-b3ae-f33b8f4e3f30",
      "name": "Upload background music to the server"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Setup defaults').item.json.AI_AGENTS_NO_CODE_TOOLS_URL }}/api/v1/media/storage",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "=Sample_voice"
            },
            {
              "name": "media_type",
              "value": "audio"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4020,
        -1420
      ],
      "id": "628d190b-e73e-43c9-be0e-f1d73e0e92c0",
      "name": "Upload voice sample to the server"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7d55d6da-a78c-4a28-9343-0ea9035a0aa3",
              "name": "AI_AGENTS_NO_CODE_TOOLS_URL",
              "value": "={{   ((u) => {   let s = u.trim();   if (!/^https?:\\/\\//i.test(s)) s = 'https://' + s;   const parts = s.split('/');   return parts[0] + '//' + parts[2]; })($json.AI_AGENTS_NO_CODE_TOOLS_URL)  }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2920,
        -1400
      ],
      "id": "bf8084b6-6552-4138-8876-5bbc1505ad61",
      "name": "Setup defaults"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1f7adeed-3cd0-47bb-8bf5-5887d2c82cad",
              "name": "postiz_integration_id",
              "value": "={{ $json.data.find(integration => integration.identifier === 'tiktok')?.id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        3840,
        120
      ],
      "id": "b1f519c8-cea7-4115-8ccf-6af3af50d904",
      "name": "Set integration id for TikTok",
      "disabled": true
    }
  ],
  "connections": {
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Combine loop items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate AI image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI image": {
      "main": [
        [
          {
            "node": "Upload image to server",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for the error / rate limit to go away",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload image to server": {
      "main": [
        [
          {
            "node": "Start generating TTS (chatterbox)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get status of TTS generation": {
      "main": [
        [
          {
            "node": "TTS status switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TTS status switch": {
      "main": [
        [
          {
            "node": "Setup TTS file_id",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait until the TTS gets generated",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Start generating TTS (chatterbox)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start generating captioned TTS video": {
      "main": [
        [
          {
            "node": "Wait until the video gets generated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get video generation status": {
      "main": [
        [
          {
            "node": "Video generation switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video generation switch": {
      "main": [
        [
          {
            "node": "Setup media fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait until the video gets generated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Setup media fields": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine loop items": {
      "main": [
        [
          {
            "node": "Start merging the videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start merging the videos": {
      "main": [
        [
          {
            "node": "Wait until the videos gets merged together",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get status of the video merge": {
      "main": [
        [
          {
            "node": "Video merge status switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video merge status switch": {
      "main": [
        [
          {
            "node": "Download the video for Postiz",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait until the videos gets merged together",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for the error / rate limit to go away": {
      "main": [
        [
          {
            "node": "Generate AI image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait until the TTS gets generated": {
      "main": [
        [
          {
            "node": "Get status of TTS generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start generating TTS (chatterbox)": {
      "main": [
        [
          {
            "node": "Wait until the TTS gets generated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait until the video gets generated": {
      "main": [
        [
          {
            "node": "Get video generation status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait until the videos gets merged together": {
      "main": [
        [
          {
            "node": "Get status of the video merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Setup TTS file_id": {
      "main": [
        [
          {
            "node": "Start generating captioned TTS video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        []
      ]
    },
    "Create the script": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure me": {
      "main": [
        [
          {
            "node": "Setup defaults",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Server isn't ready",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set file ids to delete": {
      "main": [
        [
          {
            "node": "For each file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For each file": {
      "main": [
        [
          {
            "node": "Delete tmp files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Create the script",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Download the video for Postiz": {
      "main": [
        [
          {
            "node": "Upload video to Postiz",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload video to Postiz": {
      "main": [
        [
          {
            "node": "Get Postiz integrations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Postiz integrations": {
      "main": [
        [
          {
            "node": "Merge integrations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge integrations": {
      "main": [
        [
          {
            "node": "Set integration id for TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule YouTube video": {
      "main": [
        [
          {
            "node": "Set file ids to delete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Configure me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Relay background music",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set background music id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Relay background music": {
      "main": [
        [
          {
            "node": "Upload background music to the server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Relay sample audio",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set sample voice id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set background music id": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Relay sample audio": {
      "main": [
        [
          {
            "node": "Upload voice sample to the server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set sample voice id": {
      "main": [
        [
          {
            "node": "Create the script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload background music to the server": {
      "main": [
        [
          {
            "node": "Set background music id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload voice sample to the server": {
      "main": [
        [
          {
            "node": "Set sample voice id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Setup defaults": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set integration id for TikTok": {
      "main": [
        [
          {
            "node": "Schedule YouTube video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        []
      ]
    },

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Episode 16: AI Poem TikTok videos community. Uses httpRequest, lmChatOpenAi, lmChatOllama, lmChatDeepSeek. Event-driven trigger; 71 nodes.

Source: https://github.com/gyoridavid/ai_agents_az/blob/main/episode_16/workflow_poem_videos.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Episode 11: AI shorts factory app. Uses httpRequest, googleSheets, lmChatOpenAi, lmChatOllama. Event-driven trigger; 96 nodes.

HTTP Request, Google Sheets, OpenAI Chat +15
AI & RAG

A Telegram bot that converts natural-language work descriptions into detailed cost estimates using AI parsing, vector search, and the open-source DDC CWICR database with 55,000+ construction work item

HTTP Request, Telegram, Telegram Trigger +6
AI & RAG

My workflow 53. Uses formTrigger, httpRequest, lmChatOpenAi, form. Event-driven trigger; 74 nodes.

Form Trigger, HTTP Request, OpenAI Chat +15
AI & RAG

Episode 23: UGC with nanobanana. Uses lmChatOpenAi, lmChatOllama, lmChatDeepSeek, lmChatOpenRouter. Event-driven trigger; 74 nodes.

OpenAI Chat, Ollama Chat, Lm Chat Deep Seek +12
AI & RAG

Scary Stories TikTok video - flux. Uses httpRequest, lmChatOpenAi, lmChatOllama, lmChatDeepSeek. Event-driven trigger; 65 nodes.

HTTP Request, OpenAI Chat, Ollama Chat +12