Telegram to TikTok, avatar videos published fast
Turning a “good” TikTok idea into an actual posted video is where momentum goes to die. You find a viral clip, you want to personalize it, and then you’re stuck juggling downloads, voice tools, exports, and uploads.
This Telegram TikTok automation hits content creators hardest, honestly. But agency operators managing client accounts and marketers running experiments feel the same drag. The outcome is simple: you send one Telegram message, and you get a ready-to-post avatar swap published to TikTok, tracked in a sheet.
Below, you’ll see how the workflow runs end-to-end, what you need to connect, and the real-world time you get back once the pipeline is doing the repetitive parts for you.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Telegram to TikTok, avatar videos published fast
flowchart LR
subgraph sg0["Telegram Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Telegram Trigger"]
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Telegram Get File (Avatar)"]
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Extract Video URL"]
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Transform Video (FAL WAN Rep.."]
n4@{ icon: "mdi:cog", form: "rounded", label: "Wait Video (Job Status - WAN)", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get Video (Fetch WAN Output)"]
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Transform Audio (FAL Chatter.."]
n7@{ icon: "mdi:cog", form: "rounded", label: "Wait Audio (Job Status - Cha..", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get Audio (Fetch Chatterbox .."]
n9@{ icon: "mdi:swap-vertical", form: "rounded", label: "Workflow Configuration", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Combine (FAL FFmpeg Merge)"]
n11@{ icon: "mdi:cog", form: "rounded", label: "Wait Final (Job Status - FFm..", pos: "b", h: 48 }
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get Final (Fetch Final Video)"]
n13@{ icon: "mdi:database", form: "rounded", label: "OUTPUT (Google Sheet Write)", pos: "b", h: 48 }
n14["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Build Public Image URL"]
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge"]
n16@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n17["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Download Audio"]
n18["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Separate Audio (Video-to-Aud.."]
n19["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge urls"]
n20["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Send Video to Telegram"]
n21@{ icon: "mdi:cog", form: "rounded", label: "Upload Video to BLOTATO", pos: "b", h: 48 }
n22@{ icon: "mdi:cog", form: "rounded", label: "Youtube", pos: "b", h: 48 }
n23@{ icon: "mdi:cog", form: "rounded", label: "Tiktok", pos: "b", h: 48 }
n24@{ icon: "mdi:cog", form: "rounded", label: "Linkedin", pos: "b", h: 48 }
n25@{ icon: "mdi:cog", form: "rounded", label: "Facebook", pos: "b", h: 48 }
n26@{ icon: "mdi:cog", form: "rounded", label: "Instagram", pos: "b", h: 48 }
n27@{ icon: "mdi:cog", form: "rounded", label: "Twitter (X)", pos: "b", h: 48 }
n28["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge1"]
n29["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Send a text message"]
n30@{ icon: "mdi:robot", form: "rounded", label: "Generate Caption with GPT-4", pos: "b", h: 48 }
n31@{ icon: "mdi:robot", form: "rounded", label: "Transcribe a recording", pos: "b", h: 48 }
n32["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Convert mp3 to data"]
n16 --> n17
n15 --> n18
n28 --> n29
n23 --> n28
n22 --> n28
n25 --> n28
n24 --> n28
n26 --> n28
n19 --> n10
n27 --> n28
n17 --> n3
n17 --> n6
n0 --> n1
n0 --> n2
n0 --> n9
n2 --> n15
n32 --> n31
n14 --> n15
n20 --> n32
n31 --> n30
n9 --> n15
n21 --> n23
n21 --> n24
n21 --> n25
n21 --> n26
n21 --> n27
n21 --> n22
n10 --> n11
n1 --> n14
n30 --> n21
n13 --> n20
n5 --> n19
n12 --> n13
n4 --> n5
n18 --> n16
n6 --> n7
n11 --> n12
n3 --> n4
n8 --> n19
n7 --> n8
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n30,n31 ai
class n13 database
class n3,n5,n6,n8,n10,n12,n14,n17,n18,n32 api
class n2 code
class n23 disabled
class n24 disabled
class n25 disabled
class n26 disabled
class n27 disabled
classDef customIcon fill:none,stroke:none
class n0,n1,n2,n3,n5,n6,n8,n10,n12,n14,n15,n17,n18,n19,n20,n28,n29,n32 customIcon
The Problem: Avatar-swapping and publishing takes too many tools
Making “avatar swap” edits sounds easy until you do it twice. First you have to capture the source video, then separate audio, then run face replacement, then redo the voice, then stitch everything back together. And after that, you still have to upload, write a caption, pick the right account, and track what you posted so you don’t accidentally repost the same thing next week. One missed step means wasted time or a broken upload. Do this daily and it becomes a second job.
It adds up fast. Here’s where it usually breaks down when you’re doing it manually.
- Swapping video faces and voices requires multiple services, so you end up copying URLs and files between tabs for about an hour per video.
- Uploads are easy to postpone, which means you produce “almost finished” videos that never get published.
- Captions and hashtags get rushed, because you’re already tired from the editing pipeline.
- Without a clean log in Google Sheets (or similar), you can’t tell what worked, what failed, or what still needs approval.
The Solution: Send one Telegram message, publish everywhere
This workflow turns your Telegram inbox into a production line. You send a single message that includes an avatar photo and a viral video link (the URL goes in the caption). n8n grabs the avatar file, makes it publicly accessible for the AI tools, extracts the source audio, then runs two parallel jobs: one to replace the character in the video and another to transform the voice using a reference audio URL you choose. After that, it merges the new video with the new audio, fetches the final rendered file, and logs everything in Google Sheets so you can track output URLs and statuses. Finally, Blotato uploads the finished media and publishes it to TikTok, with optional posting to Instagram, Facebook, LinkedIn, X, and YouTube.
The workflow starts with Telegram intake. AI services handle face swap, voice conversion, and the final FFmpeg merge. Then Blotato publishes and n8n sends you a confirmation message so you know it’s live.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you want to publish 5 avatar-swap videos a week. Manually, even a “fast” process is about an hour per video when you include downloads, edits, exporting, caption writing, and uploading, so you lose roughly 5 hours weekly. With this workflow, your active work is closer to 5 minutes per video to send the Telegram message and check the result in Google Sheets (the AI processing runs while you do other things). That’s about 4 hours back every week, and you still get a published TikTok at the end.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Telegram Bot for receiving avatar + video URL.
- Google Sheets to log inputs, outputs, and status.
- Blotato to publish to TikTok (and others).
- FAL API key (get it from your FAL dashboard).
- Replicate API key (get it from your Replicate account settings).
Skill level: Intermediate. You’ll connect accounts, paste API keys, and confirm your Google Sheet columns match what the workflow writes.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Telegram kicks it off. You send one message that contains a photo (your avatar) and a source video URL in the caption. n8n captures both instantly.
The workflow prepares your inputs for AI. The avatar image gets uploaded to a public URL, then the source video’s audio is extracted so it can be reused for both the face-swap and voice steps.
AI does the transformation work. Replicate handles audio extraction, FAL runs the character replacement and speech-to-speech voice conversion, and then a merge step combines the final audio/video into one file. Waiting nodes are used so n8n only moves forward when each job is actually finished.
Publishing and tracking happen automatically. The finished file is fetched, logged to Google Sheets, and uploaded to Blotato so TikTok posting (and optional cross-posting) can run without manual uploads. You also get a Telegram status message when publishing completes.
You can easily modify which platforms get published to based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Telegram Trigger
Set up the workflow to start when a Telegram message arrives with a profile photo and a video URL in the caption.
- Add and configure Telegram Intake Trigger to listen for updates set to
message. - Credential Required: Connect your telegramApi credentials in Telegram Intake Trigger.
- Verify the trigger output includes
message.photoandmessage.captionsince downstream nodes reference them.
Step 2: Connect Telegram and File Intake Nodes
These nodes extract the avatar image, parse the video URL, and set core API parameters. They run in parallel after the trigger.
- Configure Fetch Telegram Avatar File with Resource set to
fileand File ID set to{{ $json.message.photo[$json.message.photo.length - 1].file_id }}. - Credential Required: Connect your telegramApi credentials in Fetch Telegram Avatar File.
- Configure Parse Source Video URL with the provided JavaScript so it returns
videoUrlfrommessage.caption. - Configure Set Workflow Parameters with targetVoiceAudioUrl set to
[YOUR_URL], falApiKey set to[CONFIGURE_YOUR_API_KEY], and replicateApiKey set to[CONFIGURE_YOUR_API_KEY]. - Telegram Intake Trigger outputs to Fetch Telegram Avatar File, Parse Source Video URL, and Set Workflow Parameters in parallel.
Step 3: Prepare Inputs and Extract Audio
This stage uploads the avatar to a public URL and combines it with the parsed video URL to start audio extraction.
- Configure Upload Avatar to Public URL with URL set to
https://tmpfiles.org/api/v1/uploadand Content Type set tomultipart-form-data; ensure file uses binary fielddata. - Configure Combine Input Streams with Mode set to
chooseBranch, Number Inputs set to3, and Use Data Of Input set to2. - Configure Extract Audio Track to POST to
https://api.replicate.com/v1/models/lucataco/extract-audio/predictionswith the JSON body that references{{ $('Parse Source Video URL').first().json.videoUrl }}. - Ensure Delay for Extraction waits before Download Extracted Audio retrieves
{{ $json.urls.get }}. - Download Extracted Audio outputs to both Apply Video Face Swap and Convert Voice Audio in parallel.
replicateApiKey from Set Workflow Parameters via the Authorization header.Step 4: Run Face Swap, Voice Conversion, and Merge
This section runs two parallel jobs (face swap and voice conversion) and merges their outputs into a final video.
- Configure Apply Video Face Swap to POST to
https://queue.fal.run/fal-ai/wan/v2.2-14b/animate/replacewith JSON body fields{{ $('Parse Source Video URL').first().json.videoUrl }}and{{ $('Upload Avatar to Public URL').first().json.data.url.replace(/^http:\/\/tmpfiles\.org\/(\d+)\/(.*)$/i, 'https://tmpfiles.org/dl/$1/$2') }}. - Configure Convert Voice Audio to POST to
https://queue.fal.run/fal-ai/chatterbox/speech-to-speechwith JSON body fields{{ $json.output }}and{{ $('Set Workflow Parameters').first().json.targetVoiceAudioUrl }}. - Allow Pause for Video Job and Pause for Audio Job to wait before Retrieve Video Result and Retrieve Audio Result poll
{{ $json.response_url }}. - Configure Combine Media URLs with Mode set to
combineand Combine By set tocombineByPosition. - Configure Merge Audio Video Output to POST to
https://queue.fal.run/fal-ai/ffmpeg-api/merge-audio-videowith{{ $json.video.url }}and{{ $json.audio.url }}. - Use Pause for Final Merge before Fetch Final Video File retrieves
{{ $json.response_url }}.
falApiKey or replicateApiKey from Set Workflow Parameters. Missing or invalid keys will cause silent job failures.Step 5: Log Output and Send Telegram Update
Once the final video is produced, the workflow logs it to Google Sheets and notifies the original Telegram chat.
- Configure Append Results to Sheet with Operation set to
appendand map columns: url output to{{ $json.video.url }}and url original to{{ $('Parse Source Video URL').first().json.videoUrl }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Append Results to Sheet.
- Configure Dispatch Video to Telegram with Operation set to
sendVideo, File set to{{ $('Parse Source Video URL').first().json.videoUrl }}, and Chat ID set to{{ $('Telegram Intake Trigger').first().json.message.chat.id }}. - Credential Required: Connect your telegramApi credentials in Dispatch Video to Telegram.
Step 6: Configure AI Transcription and Caption Generation
The workflow fetches the converted audio as a file, transcribes it, and generates a social caption and title.
- Configure Fetch MP3 as File with URL set to
{{ $('Retrieve Audio Result').item.json.audio.url }}and response format set tofile. - Configure Transcribe Audio Clip with Resource set to
audio, Operation set totranscribe, and Binary Property Name set todata. - Credential Required: Connect your openAiApi credentials in Transcribe Audio Clip.
- Configure Generate Social Caption with JSON Output enabled and keep the message prompt as defined (uses
{{ $json.text }}). - Credential Required: Connect your openAiApi credentials in Generate Social Caption.
{{ $('Generate Social Caption').first().json.message.content.caption }}.Step 7: Configure Media Upload and Social Publishing
This section uploads the final media to Blotato, then publishes to multiple platforms in parallel.
- Configure Upload Media to Blotato with Media URL set to
{{ $('Append Results to Sheet').item.json['url output'] }}and Resource set tomedia. - Credential Required: Connect your blotatoApi credentials in Upload Media to Blotato.
- Configure the publishing nodes to use
{{ $json.url }}for postContentMediaUrls and{{ $('Generate Social Caption').first().json.message.content.caption }}for postContentText. - Upload Media to Blotato outputs to Publish to TikTok, Publish to LinkedIn, Publish to Facebook, Publish to Instagram, Publish to Twitter X, and Publish to YouTube in parallel.
- Credential Required: Connect your blotatoApi credentials to all Blotato publish nodes (7 nodes handle uploads and multi-platform publishing).
Step 8: Aggregate Results and Send Final Status
All platform results are consolidated and a final Telegram status message is sent.
- Configure Aggregate Publish Results with Mode set to
chooseBranchand Number Inputs set to6. - Configure Send Telegram Status with Text set to
Publishedand Chat ID set to{{ $('Telegram Intake Trigger').first().json.message.chat.id }}. - Credential Required: Connect your telegramApi credentials in Send Telegram Status.
Step 9: Test and Activate Your Workflow
Validate the end-to-end execution and then activate for production use.
- Click Execute Workflow and send a Telegram message with a photo and a caption containing a valid video URL.
- Confirm that Fetch Final Video File returns a JSON payload with
video.urland that Append Results to Sheet adds a new row. - Verify Telegram receives the outgoing video from Dispatch Video to Telegram and the final status from Send Telegram Status.
- Once confirmed, toggle the workflow to Active for production use.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check the n8n credential connection test and the sheet sharing settings first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Blotato publishing can fail if the selected TikTok account is not connected correctly or the API token was regenerated. Re-check the Blotato credential in n8n and confirm the target account mapping.
Frequently Asked Questions
About an hour if your API keys and accounts are ready.
No. You’ll mostly paste API keys and choose the right accounts in each connection.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in FAL and Replicate API usage costs, plus whatever AI captioning/transcription costs you run through OpenAI.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and it’s a common change. In n8n, keep the Blotato “Upload Media” node and the “Publish to TikTok” node, then disable the nodes for Instagram, YouTube, LinkedIn, Facebook, and Twitter/X. You can also adjust the caption by editing the OpenAI “Generate Social Caption” node so it writes specifically for TikTok length and tone.
Usually it’s expired credentials or the wrong account selected in the Blotato nodes. Regenerate your Blotato API token, update it in n8n, then confirm the TikTok destination is still connected inside Blotato. If it fails only on busy days, you might be hitting rate limits or sending a video file that’s still processing. In that case, increase the wait time before the upload/publish nodes and try again.
A lot, but your limits come from your n8n plan and your AI providers. On n8n Cloud Starter, you get a monthly execution cap; Pro handles more. If you self-host, there’s no execution limit, but your server and the external rendering times become the bottleneck. Practically, many teams start with a few videos per day and scale once the waits and rate limits are tuned.
For AI-heavy media pipelines, n8n is usually the better fit because you can branch logic freely, wait for long-running jobs, and self-host when volume grows. Zapier and Make can work, but complex “polling until done” patterns get awkward and expensive. n8n also plays nicely with HTTP requests, which matters here since several steps depend on calling external AI endpoints. If your goal is only “send a file to TikTok,” simpler tools may be fine. Talk to an automation expert if you want a quick recommendation for your setup.
Once this is running, your “editing pipeline” becomes a Telegram message and a confirmation reply. The workflow handles the busywork, and you get to focus on picking better source clips and shipping more often.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.