🎬 Create talking avatar videos with Elevenlabs & Infinitalk and auto-post to TikTok

⚡ 1,277 views · 🎬 Content Creation & Video

💡 Pro Tip — Since TikTok doesn’t have a public API, getting data usually means fragile HTTP scraping. ScraperNode is a community node that gives you clean JSON for TikTok profiles, videos, and comments — drop it into your workflow and skip the parsing.

View All Scrapers

Description

This automated workflow generates a video featuring a talking AI avatar from a single image and automatically publishes it to TikTok with Postiz.

The process involves two main AI services chained together: Elevenlabs v3 and Infinitalk.


Key Benefits


How It Works

  1. Text-to-Speech (TTS) Generation: The workflow starts by sending a predefined text script and a selected voice (e.g., “Alice”) to the Fal.ai service, which utilizes ElevenLabs’ AI to generate a high-quality audio file. The workflow then polls the API until the audio generation is COMPLETED and retrieves the URL of the generated audio file.

  2. Talking Avatar Video Generation: The workflow takes a static image URL and the newly created audio URL and sends them to another Fal.ai service (Infinitalk). This AI model animates the avatar in the image to lip-sync and match the provided audio. A prompt guides the avatar’s expression (e.g., “You are a girl giving a weather forecast and you must be expressive”). The workflow again polls for status until the video is COMPLETED.

  3. Title Generation & Publishing: Once the video is ready, its URL is fetched. Simultaneously, an OpenAI (GPT-4o-mini) node generates an optimized, engaging title (under 60 characters) for the TikTok post based on the original script and avatar prompt. The final video file is downloaded and uploaded to Postiz (a social media scheduling service), which finally posts it to a pre-configured TikTok account.


Set Up Steps

Before executing this workflow, you must configure the following third-party service credentials and node parameters within n8n:

  1. Fal.ai API Credentials: Create an account on Fal.ai and obtain an API key. Create a new credential of type “HTTP Header Auth” in n8n named "Fal.run API". The key should be placed in the Value field, and the Header Name must be set to Authorization. The value should be Key <YOUR_FAL_AI_API_KEY>.

  2. OpenAI API Credentials: You need an OpenAI API key. Create a credential in n8n of type “OpenAI API”, name it (e.g., "OpenAi account"), and enter your API key.

  3. Postiz API Credentials: Create an account on Postiz, connect your TikTok account, and get your API key from the Postiz dashboard. In n8n, create an “HTTP Header Auth” credential named "Postiz". Set the Header Name to X-API-Key and the Value to your Postiz API key. Also, create a “Postiz API” credential in n8n and enter the same API key.

  4. Configure Postiz Node: In the “TikTok” (Postiz) node, you must replace "XXX" in the integrationId field with the actual ID of your connected TikTok account from your Postiz dashboard.

  5. (Optional) Customize Inputs: You can modify the default values in the “Set text input” node (the script and voice) and the “Set Video Params” node (the image_url and the prompt for the avatar’s expression) to create different videos without changing the workflow’s structure.


Need help customizing?

Contact me for consulting and support or add me on Linkedin.

đź”— Nodes Used

HTTP Request, OpenAI

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup