TikTok Affiliate Automation

An n8n-powered AI pipeline that turns a plain product photo sent on Telegram into an AI-generated, UGC-style video and uploads it straight to TikTok as a draft.

Tech Stack

n8nOpenAIGPT ImageSeedance 2.0Kie.aiLLM Prompt EngineeringTelegram Bot APIGoogle SheetsImgBBTikTok Content Posting API
n8n TikTok affiliate video automation workflow

What problem does it solve?

A plain product screenshot doesn't sell on TikTok. Affiliate videos work best when the product is shown in a real-life scene, but that means filming content, or manually prompting image and video tools, downloading the results, and uploading every video one by one.

This automation reduces the whole process to sending a photo on Telegram. Everything from prompting to uploading runs on its own for my own TikTok affiliate account.

How it works

1.

Queue products from Telegram

A plain product photo is sent to a private Telegram bot. The bot only accepts my account, uploads valid images to ImgBB, adds them to Google Sheets as queued, and replies with the current queue count.

2.

Generate on command

The bot has several commands that trigger different actions, from generating a single video to processing the whole queue in parallel batches of 5. Telegram sends progress updates along the way.

3.

AI first frame

An OpenAI LLM writes the prompt for a UGC-style scene that showcases the product, and GPT Image generates the first frame from the product photo. The scene style is fully adjustable, so the same workflow can produce any kind of video.

4.

AI video generation

A second LLM prompt directs the motion and camera for the clip, and the first frame is sent to Seedance 2.0 through Kie.ai. The workflow checks the status every 20 seconds until the video is ready and retries failed generations. The prompts are interchangeable, so the scene can be changed per product.

5.

Upload to TikTok

The finished video is sent to Telegram for preview and uploaded through the official TikTok Content Posting API as a draft in the TikTok inbox, ready to publish.

6.

Status and error handling

Each product is marked as done or failed in Google Sheets. Errors are handled globally and reported straight to Telegram, so nothing fails silently.

Result

A hands-off pipeline that turns a single product photo into a ready-to-publish, UGC-style affiliate video. Posting 2 videos a day costs only around $12 a month, or roughly $0.20 per video.