Générer des vidéos d'avatar parlant et les publier sur TikTok

Avancé

Ceci est unContent Creation, Miscellaneous, Multimodal AIworkflow d'automatisation du domainecontenant 24 nœuds.Utilise principalement des nœuds comme If, Set, Wait, Postiz, HttpRequest. Utiliser Elevenlabs et Infinitalk pour créer des vidéos d'avatars virtuels parlants et les publier automatiquement sur TikTok

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "XZSeWj4y0SWnp94K",
  "meta": {
    "instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
    "templateCredsSetupCompleted": true
  },
  "name": "Generate a talking avatar video and post to TikTok",
  "tags": [],
  "nodes": [
    {
      "id": "f0260063-c620-455f-ad89-a288b3deeb24",
      "name": "En cliquant sur 'Tester le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -288,
        256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "970f94fe-c0f0-46dc-94b5-21b225f031a9",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        272
      ],
      "parameters": {
        "width": 560,
        "height": 960,
        "content": "## Input - Image\n![image](https://n3wstorage.b-cdn.net/n3witalia/result2.png)\n\n## Output - Video Result (max 5 sec.)\n## [Donwload the video](https://n3wstorage.b-cdn.net/n3witalia/talking_avatar.mp4)"
      },
      "typeVersion": 1
    },
    {
      "id": "b4f04df4-a42b-4c17-b4fe-c5e7d3b1964b",
      "name": "Attendre 60 sec.1",
      "type": "n8n-nodes-base.wait",
      "position": [
        624,
        640
      ],
      "webhookId": "bb15f2f3-caec-4df6-ac1f-374ed90d8a3e",
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "1e27c532-b751-4e38-8b9d-d9478caa419c",
      "name": "Note adhésive8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        576
      ],
      "parameters": {
        "width": 180,
        "height": 200,
        "content": "Set API Key created in Step 2"
      },
      "typeVersion": 1
    },
    {
      "id": "1f85dad8-9641-4514-abe4-e9e882e91d28",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        976
      ],
      "parameters": {
        "width": 180,
        "height": 200,
        "content": "Set ChannelId Step 3"
      },
      "typeVersion": 1
    },
    {
      "id": "e9c7afd2-8741-476d-95a0-29045a06175e",
      "name": "Attendre 60 sec.2",
      "type": "n8n-nodes-base.wait",
      "position": [
        624,
        256
      ],
      "webhookId": "bb15f2f3-caec-4df6-ac1f-374ed90d8a3e",
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "c64be753-c029-4e74-a6a6-85a5ac7d9d83",
      "name": "Note adhésive9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        192
      ],
      "parameters": {
        "width": 180,
        "height": 200,
        "content": "Set API Key created in Step 2"
      },
      "typeVersion": 1
    },
    {
      "id": "2920c75b-df35-4042-9693-f345bad4e73d",
      "name": "Définir l'entrée texte",
      "type": "n8n-nodes-base.set",
      "position": [
        32,
        256
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5b4cdec4-d8e0-4adf-9669-c242320bed4a",
              "name": "text",
              "type": "string",
              "value": "=Tomorrow in New York the weather will be clear and partly cloudy with a temperature of 25 degrees"
            },
            {
              "id": "76f947bc-1802-4106-8e4e-54a44364afc5",
              "name": "voice",
              "type": "string",
              "value": "Alice"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f4c56b29-5818-4cbd-8204-859f18c13dfc",
      "name": "Obtenir le statut audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        256
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/elevenlabs/requests/{{ $('Create voice').item.json.request_id }}/status ",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "daOZafXpRXLtoLUV",
          "name": "Fal.run API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6da04971-2400-446a-baf1-8e64109b11d2",
      "name": "Audio terminé ?",
      "type": "n8n-nodes-base.if",
      "position": [
        976,
        256
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "383d112e-2cc6-4dd4-8985-f09ce0bd1781",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "COMPLETED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "94141113-277d-49ce-8072-a9a7b56286d8",
      "name": "Obtenir l'URL audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -272,
        640
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/elevenlabs/requests/{{ $json.request_id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "daOZafXpRXLtoLUV",
          "name": "Fal.run API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f987697a-1436-4a85-9aed-4a1a6ea9882b",
      "name": "Définir l'URL audio",
      "type": "n8n-nodes-base.set",
      "position": [
        -64,
        640
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "149fe1da-641e-4949-b695-fd6e3ad673f7",
              "name": "audio_url",
              "type": "string",
              "value": "={{$json.audio.url}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "193435c0-3b1f-4820-a24d-1645c0d81311",
      "name": "Définir les paramètres vidéo",
      "type": "n8n-nodes-base.set",
      "position": [
        176,
        640
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c713d31f-9abd-496a-ac79-e8e2efe60aa0",
              "name": "image_url",
              "type": "string",
              "value": "=https://n3wstorage.b-cdn.net/n3witalia/result2.png"
            },
            {
              "id": "5b4cdec4-d8e0-4adf-9669-c242320bed4a",
              "name": "audio_url",
              "type": "string",
              "value": "={{$json.audio_url}}"
            },
            {
              "id": "66901b83-8687-4e7d-8860-a76e232e6027",
              "name": "prompt",
              "type": "string",
              "value": "=You are a girl who makes weather forecasts and needs to be expressive"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f45bc334-7baa-48f7-be4e-dda094f52c5e",
      "name": "Créer la vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        640
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/infinitalk",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n     \"image_url\": \"{{ $json.image_url }}\",\n     \"audio_url\": \"{{ $json.audio_url }}\",\n     \"prompt\": \"{{ $json.prompt }}\"\n   }",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "daOZafXpRXLtoLUV",
          "name": "Fal.run API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "faf0fb26-d0cc-4c76-9ce9-9dd9fb3c0f78",
      "name": "Obtenir le statut",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        640
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/infinitalk/requests/{{ $('Create Video').item.json.request_id }}/status ",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "daOZafXpRXLtoLUV",
          "name": "Fal.run API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c6c38e72-966e-44de-a65b-b6f5694523a8",
      "name": "Terminé ?",
      "type": "n8n-nodes-base.if",
      "position": [
        976,
        640
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "383d112e-2cc6-4dd4-8985-f09ce0bd1781",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "COMPLETED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1368b0f4-7d61-4cc3-8b0a-81d13a167fbe",
      "name": "Obtenir l'URL vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -272,
        1024
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/infinitalk/requests/{{ $json.request_id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "daOZafXpRXLtoLUV",
          "name": "Fal.run API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "22c6d754-17d2-4730-b680-81027dfb6ec1",
      "name": "Générer le titre",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -16,
        1024
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Input: {{ $('Set text input').item.json.text }}\n\nPrompt: {{ $('Set Video Params').item.json.prompt }}"
            },
            {
              "role": "system",
              "content": "You are a TikTok expert specialized in creating engaging and optimized titles.\n\nYour task is to generate an effective title for a YouTube video based on the user's video description.\n\nGUIDELINES:\n- Maximum 60 characters to avoid truncation\n- Use relevant keywords for SEO\n- Make the title catchy and clickable\n- Avoid excessive or misleading clickbait\n- Consider the target audience of the content\n- Use numbers, questions, or power words when appropriate\n- IMPORTANT: Generate the title in the same language as the input description\n\nOUTPUT FORMAT:\nProvide only the title, without additional explanations.\n\nEXAMPLE:\nInput: \"Tutorial video on how to cook perfect pasta carbonara\"\nOutput: \"PERFECT Carbonara in 10 Minutes - Chef's Secrets\""
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "TefveNaDaMERl1hY",
          "name": "OpenAi account (Eure)"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "95db6c0f-1606-4035-b906-4e597844de20",
      "name": "Obtenir le fichier vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        352,
        1024
      ],
      "parameters": {
        "url": "={{ $('Get Url Video').item.json.video.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "a549c100-6d5a-4098-b270-4230a1f2dab3",
      "name": "Télécharger la vidéo vers Postiz",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        1024
      ],
      "parameters": {
        "url": "https://api.postiz.com/public/v1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "GIEq2Y2xhJSgjqyG",
          "name": "Postiz"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "670d593d-da7a-45ca-b40e-109a2bcbe1f3",
      "name": "TikTok",
      "type": "n8n-nodes-postiz.postiz",
      "position": [
        880,
        1024
      ],
      "parameters": {
        "date": "={{ $now.format('yyyy-LL-dd') }}T{{ $now.format('HH:ii:ss') }}",
        "posts": {
          "post": [
            {
              "value": {
                "contentItem": [
                  {
                    "image": {
                      "imageItem": [
                        {
                          "id": "={{ $json.id }}",
                          "path": "={{ $json.path }}"
                        }
                      ]
                    },
                    "content": "={{ $('Generate title').item.json.message.content }}"
                  }
                ]
              },
              "integrationId": "XXX"
            }
          ]
        },
        "shortLink": true
      },
      "credentials": {
        "postizApi": {
          "id": "c8iQxqMcfCXPbUHc",
          "name": "Postiz account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1d42267b-70a4-4b15-ad3f-877a918ceb67",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        -192
      ],
      "parameters": {
        "color": 3,
        "width": 992,
        "height": 224,
        "content": "# Generate a talking AI avatar video from one image and post it to TikTok\n\nThis automated workflow generates a **video featuring a talking AI avatar from a single image and automatically publishes it to TikTok** with [Postiz](https://postiz.com/?ref=n3witalia).\n\nThe process involves two main AI services chained together: **Elevenlabs v3** and **Infinitalk**."
      },
      "typeVersion": 1
    },
    {
      "id": "531b4fa0-ea2b-438c-81b2-c0647cba1393",
      "name": "Note adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        64
      ],
      "parameters": {
        "width": 992,
        "content": "## SETUP STEPS\n- Set \"Text\" and \"Voice\" name in the node \"Set text input\"\n- Set \"Image url\" and prompt in the node \"Set Video params\"\n- Install Postiz n8n node"
      },
      "typeVersion": 1
    },
    {
      "id": "3b104696-0805-49a7-8f6b-6657b8e74dfa",
      "name": "Créer la voix",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        256
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/elevenlabs/tts/eleven-v3",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n     \"text\": \"{{ $json.text }}\",\n     \"voice\": \"{{ $json.voice }}\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "daOZafXpRXLtoLUV",
          "name": "Fal.run API"
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "464c3e69-6f5c-445b-9e95-cf7cdde3db78",
  "connections": {
    "c6c38e72-966e-44de-a65b-b6f5694523a8": {
      "main": [
        [
          {
            "node": "1368b0f4-7d61-4cc3-8b0a-81d13a167fbe",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "b4f04df4-a42b-4c17-b4fe-c5e7d3b1964b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "faf0fb26-d0cc-4c76-9ce9-9dd9fb3c0f78": {
      "main": [
        [
          {
            "node": "c6c38e72-966e-44de-a65b-b6f5694523a8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f45bc334-7baa-48f7-be4e-dda094f52c5e": {
      "main": [
        [
          {
            "node": "b4f04df4-a42b-4c17-b4fe-c5e7d3b1964b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3b104696-0805-49a7-8f6b-6657b8e74dfa": {
      "main": [
        [
          {
            "node": "e9c7afd2-8741-476d-95a0-29045a06175e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "94141113-277d-49ce-8072-a9a7b56286d8": {
      "main": [
        [
          {
            "node": "f987697a-1436-4a85-9aed-4a1a6ea9882b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1368b0f4-7d61-4cc3-8b0a-81d13a167fbe": {
      "main": [
        [
          {
            "node": "22c6d754-17d2-4730-b680-81027dfb6ec1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f987697a-1436-4a85-9aed-4a1a6ea9882b": {
      "main": [
        [
          {
            "node": "193435c0-3b1f-4820-a24d-1645c0d81311",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b4f04df4-a42b-4c17-b4fe-c5e7d3b1964b": {
      "main": [
        [
          {
            "node": "faf0fb26-d0cc-4c76-9ce9-9dd9fb3c0f78",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e9c7afd2-8741-476d-95a0-29045a06175e": {
      "main": [
        [
          {
            "node": "f4c56b29-5818-4cbd-8204-859f18c13dfc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "22c6d754-17d2-4730-b680-81027dfb6ec1": {
      "main": [
        [
          {
            "node": "95db6c0f-1606-4035-b906-4e597844de20",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "95db6c0f-1606-4035-b906-4e597844de20": {
      "main": [
        [
          {
            "node": "a549c100-6d5a-4098-b270-4230a1f2dab3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2920c75b-df35-4042-9693-f345bad4e73d": {
      "main": [
        [
          {
            "node": "3b104696-0805-49a7-8f6b-6657b8e74dfa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6da04971-2400-446a-baf1-8e64109b11d2": {
      "main": [
        [
          {
            "node": "94141113-277d-49ce-8072-a9a7b56286d8",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "e9c7afd2-8741-476d-95a0-29045a06175e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f4c56b29-5818-4cbd-8204-859f18c13dfc": {
      "main": [
        [
          {
            "node": "6da04971-2400-446a-baf1-8e64109b11d2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "193435c0-3b1f-4820-a24d-1645c0d81311": {
      "main": [
        [
          {
            "node": "f45bc334-7baa-48f7-be4e-dda094f52c5e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a549c100-6d5a-4098-b270-4230a1f2dab3": {
      "main": [
        [
          {
            "node": "670d593d-da7a-45ca-b40e-109a2bcbe1f3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f0260063-c620-455f-ad89-a288b3deeb24": {
      "main": [
        [
          {
            "node": "2920c75b-df35-4042-9693-f345bad4e73d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Création de contenu, Divers, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds24
Catégorie3
Types de nœuds8
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at info@n3w.it or add me on Linkedin.com/in/davideboizza

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34