Automate AI Video Creation & Social Posting with n8n and Blotato

Save hours by automating AI video creation and publishing to 9 social platforms using Telegram, GPT-4, and Blotato in n8n. This workflow transforms Telegram prompts or images into engaging, captioned videos with music, then publishes them automatically across multiple channels.
telegramTrigger
httpRequest
openAi
+7
Workflow Identifier: 1009
NODES in Use: telegramTrigger, code, if, telegram, httpRequest, wait, set, googleSheets, openAi, stickyNote

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow listens for messages on Telegram that have video ideas or pictures.

It makes short AI videos with music and captions automatically.

It sends the videos to nine social media sites like Instagram and YouTube.

The user gets a message on Telegram with the finished video.

The workflow also keeps track of video info in Google Sheets.


Who Should Use This Workflow

Anyone making many short videos for social media.

People who want to save hours and avoid copy-paste mistakes.

Users who want videos with good captions and music without extra work.


Tools and Services Used

  • Telegram Bot API: Receives user messages on Telegram.
  • Blotato API: Creates videos from text and publishes to multiple social sites.
  • Piapi AI: Generates music and converts images to video clips.
  • OpenAI GPT-4: Writes captions, scripts, and titles for videos.
  • Google Sheets API: Saves video metadata for tracking.
  • Cloudinary: Temporarily hosts uploaded images online.
  • n8n automation platform: Handles the workflow with all API calls.

Beginner Step-by-Step: How to Use This Workflow Inside n8n

1. Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor where the workflow runs.
  3. Click “Import from File” and choose the downloaded workflow.

2. Configure Credentials and IDs

  1. Add Telegram Bot Token credentials in the Telegram Trigger node.
  2. Insert API Keys for Blotato, Piapi, and OpenAI in their respective HTTP request and OpenAI nodes.
  3. Set up Google Sheets credentials with OAuth and update sheet IDs or folders in the Google Sheets nodes.
  4. Check Cloudinary upload preset and API keys are correct in the HTTP request node for image upload.

3. Review Prompts and Code Snippets

  1. Look at the Code nodes parsing Telegram messages; ensure the input matches your expected formats.
  2. Copy any necessary prompt text inside the OpenAI nodes if you want to customize captions or script generation.

4. Test and Activate

  1. Send a test video prompt or image to the Telegram bot to see if the workflow triggers.
  2. Check execution results inside the workflow to catch errors.
  3. When tests pass, toggle the workflow to active for production use.

Make sure webhook URLs are accessible from the internet.

For full control and stable operation, consider self-host n8n.


Workflow Inputs, Processing, and Outputs Explained

Inputs

  • Telegram messages with text prompts or images from users.

Processing Steps

  • The Telegram Trigger gets new messages.
  • A Code node cleans and splits the message into video prompt, caption idea, and music style.
  • An If node chooses whether the input is text or image.
  • For images, the workflow downloads the photo and uploads it to Cloudinary.
  • Piapi AI creates a short video from the image and waits for processing.
  • For text prompts, Blotato API generates the video, waiting for it to finish.
  • Music is generated by Piapi based on the music style chosen.
  • OpenAI GPT-4 writes two overlay text lines using the caption idea.
  • Video and music are merged with captions into a final video asset via an API.
  • Created video metadata is saved to Google Sheets.
  • The workflow posts the final video and captions to nine social platforms using Blotato’s publishing API.
  • A Telegram message sends the video back to the user with details.

Outputs

  • AI-generated social videos with music and caption overlays.
  • Updated row entries in Google Sheets tracking video info.
  • Posted content across multiple social accounts automatically.
  • Confirmation messages on Telegram with video link.

Common Failures and Edge Case Handling

  • If Telegram messages are empty or missing input, the workflow uses an If node to stop errors.
  • If API keys are invalid, HTTP request nodes return errors—check keys immediately.
  • Delays in AI video or audio processing are handled by Wait nodes set to fixed intervals (2 minutes).
  • Make sure Telegram bot has proper webhook and file permission setups to avoid download problems.
  • OpenAI node failures usually happen because of bad prompt syntax or API limits; test prompts separately.

Customization Ideas

  • Change video style or template by editing the JSON “style” or “template.id” in the Blotato HTTP request node.
  • Rewrite the social caption prompt in the OpenAI node to adjust the mood or tone.
  • Add new social platforms by updating platform ID lists and adding HTTP requests to Blotato’s API nodes.
  • Switch to a cheaper or newer OpenAI model by editing the model in OpenAI nodes.
  • Set video duration longer or shorter in Piapi’s video generation request parameters.

Summary of Benefits

✓ Saves hours previously spent on video creation and posting.

✓ Stops mistakes from manual copying and pasting.

✓ Creates videos with good music and clear captions automatically.

✓ Posts content to 9 social media platforms without extra work.

✓ Tracks all video details in an easy Google Sheets log.


Next Steps

Try adding analysis tools to capture video views and engagement.

Use AI to improve captions further with sentiment or tone detection.

Add video scheduling or closed captions for better accessibility.

The workflow supports many ways to grow content quickly and simply.


Frequently Asked Questions

The Telegram Trigger node listens for new Telegram messages that contain video prompts or images to start the workflow.
If the input is an image, the workflow downloads and uploads it to Cloudinary, then uses Piapi AI to generate a video. For text prompts, Blotato API creates the video from the text.
OpenAI GPT-4 generates overlay text captions for videos and creates social media captions and SEO-friendly titles based on user input.
A beginner should import the workflow file into n8n, add required API keys and credentials, update any IDs needed, test the workflow by sending Telegram messages, then activate the workflow for production.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free