AI-Powered Social Media Content Generator with Google Sheets Logging
Overview
This workflow automatically generates and publishes social media content using AI, then logs everything to Google Sheets. It's perfect for content creators, marketers, or anyone who wants to maintain a consistent social media presence without spending hours brainstorming and writing posts. The workflow runs on a schedule, creates a topic using GPT-4, generates a tweet about that topic, creates an anime-style image, and posts the content to Twitter, LinkedIn, and Facebook simultaneously.
Workflow Steps
-
Schedule Trigger (No auth) — Runs the workflow daily at 10 PM (22:00). This is the starting point that activates the entire automation on a recurring basis.
-
Message a model (OpenAI API Key auth) — Uses GPT-4 to generate a 50-character title about a specific problem related to n8n or automation. This creates the core topic that will be used throughout the workflow.
-
Message a model1 (OpenAI API Key auth) — Takes the title from the previous step and generates a complete tweet that breaks down the topic in a solution-oriented, easy-to-read way with hashtags. Uses the ChatGPT-4o-latest model.
-
Generate an image (OpenAI API Key auth) — Creates a Japanese anime-style image based on the same title. This uses OpenAI's image generation capabilities (DALL-E) to produce visual content for social media posts.
-
Append or update row in sheet1 (Google OAuth2) — Logs the generated title, description, and image URL to a Google Sheet named "Automation inbound content". Uses the appendOrUpdate operation to add new rows or update existing ones based on the Title column.
-
Create Tweet (Twitter OAuth2) — Posts the generated description as a tweet on Twitter.
-
Create a post (LinkedIn OAuth2) — Creates a LinkedIn post with the generated content.
-
Facebook Graph API (Facebook OAuth2) — Posts the content to Facebook using the Facebook Graph API.
Setup Instructions
To use this workflow, you'll need accounts and credentials for the following services:
- OpenAI: Create an account at platform.openai.com and generate an API key. You'll need access to GPT-4 and DALL-E image generation.
- Google Sheets: A Google account with access to Google Sheets. Create a new spreadsheet or use an existing one. You'll need to set up Google OAuth2 credentials in n8n.
- Twitter: A Twitter Developer account with API keys and access tokens. Set up OAuth2 authentication in n8n.
- LinkedIn: A LinkedIn account with API access. Create a LinkedIn app and configure OAuth2 credentials.
- Facebook: A Facebook Developer account with a Facebook app and Page Access Token for the Facebook Graph API.
Configuration Steps:
- Import this workflow into your n8n instance
- Configure each credential by clicking on the node and selecting "Create New" or "Select Existing"
- Update the Google Sheet ID in the "Append or update row in sheet1" node to point to your spreadsheet
- Adjust the schedule trigger time if needed (currently set to 10 PM daily)
- Activate the workflow
Use Cases and Variations
Primary Use Case
Automated social media content creation for n8n/automation enthusiasts who want to share tips, tricks, and solutions daily without manual effort.
Adaptation Ideas
- Change the topic: Modify the prompt in "Message a model" to generate content about any niche (e.g., marketing tips, coding tutorials, fitness advice)
- Add more platforms: Include Instagram, TikTok, or Pinterest by adding additional nodes
- Customize the image style: Change the prompt in "Generate an image" to produce different visual styles (realistic, cartoon, minimalist, etc.)
- Add content curation: Include an RSS feed or web scraper to find trending topics before generating content
- Implement approval workflow: Add a manual approval step before posting to review AI-generated content
- Schedule different times: Create multiple schedule triggers for different time zones or posting frequencies
- Track performance: Add analytics nodes to monitor engagement metrics from each platform
Workflow JSON
{
"id": "59a8WDMIKKo9faYP",
"meta": {
"instanceId": "c87a766eb8ed4a39121cf119a5038250a8ca0a11ed90cdd244f6beb7336758b3",
"templateCredsSetupCompleted": true
},
"name": "Posting",
"tags": [],
"nodes": [
{
"id": "81d2b01a-b0a6-4361-9eb5-00251031a289",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
135
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 22
}
]
}
},
"typeVersion": 1.2
},
{
"id": "5551acd6-a6d7-4c89-b7b8-104163d2c7a7",
"name": "Message a model",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
220,
135
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4",
"cachedResultName": "GPT-4"
},
"options": {},
"messages": {
"values": [
{
"content": "Create a 50 character title of a topic related to very specific problem related to n8n or automation."
}
]
// ... truncated (copy to see full JSON)How to Import This Workflow
- 1Copy the workflow JSON above using the Copy Workflow JSON button.
- 2Open your n8n instance and go to Workflows.
- 3Click Import from JSON and paste the copied workflow.
Don't have an n8n instance? Start your free trial at n8nautomation.cloud
Related Templates
AI Viral Video Creator from Telegram with Voice & Multi-Platform Posting
🚀 Automatically Generate and Publish Viral TikTok-Style Videos from a Simple Telegram Message This workflow transforms a single Telegram message containing a photo and a theme (caption) into a fully-produced, AI-generated talking-head video optimized for viral social media content. It leverages Perplexity for trend research, OpenAI GPT-4 for script and caption generation, ElevenLabs for realistic voice synthesis, and FAL.ai's VEED Fabric model to create a lip-synced avatar video from the photo. The final video, along with an engaging caption and relevant hashtags, is saved to Google Sheets for tracking and then automatically published to up to nine social media platforms—TikTok, YouTube, Instagram, LinkedIn, Facebook, Twitter (X), Threads, Pinterest, and Bluesky—via the Blotato integration. This is an end-to-end content creation pipeline perfect for creators, marketers, and businesses who want to maintain a consistent, high-frequency posting schedule without manual video editing. It reduces the time from idea to published video to under 5 minutes. 📋 Node-by-Node Breakdown Telegram Trigger (Telegram Bot Token) — Listens for incoming messages containing a photo and caption. The trigger activates on updates. No additional filtering is applied; every photo with a caption will start the workflow. Workflow Configuration (No auth) — A static Set node that stores API keys and configuration values (ElevenLabs API key, voice ID, FAL API key, and the Perplexity model name) as workflow variables for easy maintenance. Extract Photo and Theme (No auth) — Extracts the largest photo file ID from the Telegram message and the caption (or text) as the theme. Falls back to "viral content" if no caption is provided. Get Photo File from Telegram (Telegram Bot Token) — Uses the Telegram Bot API to download the photo file specified by the file ID extracted in the previous step. Build Public Image URL (No auth) — Uploads the downloaded photo to to obtain a publicly accessible URL. This URL is later used by FAL.ai's VEED Fabric model. Search Trends with Perplexity (Perplexity API key) — Sends a query to Perplexity AI asking for the top 3 current viral trends related to the user's theme. The model is configured dynamically from the workflow configuration node. Generate Script with GPT-4 (OpenAI API key) — Uses OpenAI GPT-4o-mini to generate a 30-second TikTok script based on the trends found by Perplexity and the original theme. The prompt enforces a hook in the first 2 seconds and conversational tone. ElevenLabs Voice Synthesis (API key in header) — Sends the generated script to ElevenLabs' text-to-speech API with the configured voice ID, producing an MP3 audio file. Uses header for authentication. Convert .mpga to .mp3 (No auth) — A JavaScript Code node that renames the binary audio file from to and sets the correct MIME type, ensuring compatibility with downstream nodes. Upload Audio to Public URL (No auth) — Uploads the MP3 audio to to make it publicly accessible for FAL.ai. FAL.ai Video Generation (API key in header) — Sends a request to FAL.ai's VEED Fabric 1.0 endpoint with the public image URL and audio URL to generate a talking-head lip-sync video at 480p resolution. Authentication uses the header with the FAL API key. Wait for VEED (No auth) — A Wait node that pauses execution for 10 minutes to allow the video generation to complete. The node uses polling via webhook (not active here) but is configured as a timed wait. Download VEED Video (API key in header) — Periodically queries the FAL.ai request status endpoint (using the request ID from the generation response) to retrieve the completed video URL. Generate Caption with GPT-4 (OpenAI API key) — A second OpenAI node that creates an engaging TikTok caption with trending hashtags based on the same theme and trends. Outputs only the caption text. Save to Google Sheets (Google Sheets OAuth2) — Appends a new row to a Google Sheet with columns: IDEA (original theme), CAPTION, AUDIO URL, IMAGE URL, VIDEO URL. The sheet and document ID are expected to be configured via resource locator or expression. Send a video (Telegram Bot Token) — Sends the generated video back to the original Telegram chat as a confirmation. Upload Video to BLOTATO (Blotato API key) — Uploads the video file to Blotato's media storage, obtaining a hosted URL for distribution. TikTok / YouTube / LinkedIn / Facebook / Instagram / Twitter (X) / Threads / Bluesky / Pinterest (Blotato API key) — Nine parallel Blotato nodes that each publish the video to their respective social media accounts. Each node uses pre-configured account IDs (list mode) and the generated caption. YouTube optionally sets the video to "private" and disables subscriber notifications. Merge1 (No auth) — A Choose Branch merge node that waits for all nine social media publishing branches to complete before continuing. Update Status to "DONE" (Google Sheets OAuth2) — Updates the corresponding row in the Google Sheet (matched by video URL) to set the STATUS column to "DONE". 🔧 Setup Instructions To use this workflow, you'll need the following accounts and API keys: Telegram — Create a bot via @BotFather and get the bot token. Use it in the Telegram Trigger and Telegram nodes. ElevenLabs — Sign up at elevenlabs.io, generate an API key, and clone or select a voice. Note the Voice ID. FAL.ai — Sign up at fal.ai, create an API key from the dashboard. The workflow uses the VEED Fabric 1.0 model – no separate VEED subscription is needed. Perplexity AI — Sign up at perplexity.ai, get an API key from settings. OpenAI — Sign up at platform.openai.com, create an API key with access to GPT-4o-mini. Google Sheets — Create a Google Sheet with the required columns (IDEA, URL IMAGE, URL AUDIO, URL VIDEO, CAPTION, STATUS). Set up Google Sheets OAuth2 credentials in n8n. Blotato — Sign up at blotato.com, get an API key from settings. Install the community node in n8n (Settings → Community Nodes). Connect each social media account within Blotato to obtain account IDs. tmpfiles.org — No account required; the service is used for temporary file hosting. After obtaining all keys, update the Workflow Configuration node with your values and configure credentials for each API node (Telegram, Perplexity, OpenAI, Google Sheets, Blotato). The sticky notes in the canvas provide step-by-step visual guidance. 💡 Use Cases & Variations Content Repurposing: The workflow can be adapted to repurpose a blog post or article into a short video by feeding the text as a theme. Brand Voice: Customize the ElevenLabs voice to match your brand's tone. Trend-Driven Campaigns: Use Perplexity with different prompts to focus on niche topics (e.g., "tech startups", "healthy recipes"). Platform-Specific Formatting: Modify the caption generation prompt to include platform-specific elements (e.g., LinkedIn professional tone, Twitter character limit). Scheduling: Add a Schedule Trigger to run the workflow periodically with pre-defined themes from a spreadsheet instead of Telegram. Analytics: Extend the Google Sheet with additional columns for engagement metrics by integrating with social media analytics APIs. This workflow is fully modular; you can remove any of the Blotato publishing nodes if you only need specific platforms.
Generate Videos & Carousels with Blotato, Publish to Instagram & TikTok
Overview This workflow creates a fully autonomous AI-powered social media content pipeline. It listens for incoming Telegram messages containing a public URL (YouTube video, article, Instagram post, etc.) and a target platform (Instagram or TikTok). The AI agent then extracts the content, generates a custom visual using Blotato's AI tools, waits for the visual to be fully rendered, publishes it to the specified social media account, and finally sends a confirmation message back to the user on Telegram. This eliminates the manual work of content repurposing, design, and cross-platform posting. This is ideal for content creators, marketers, and businesses who want to repurpose long-form content into short-form social media posts automatically. The AI handles the entire decision-making and execution process, making it a true "set and forget" automation. Workflow Steps Telegram Trigger (No auth) — Listens for incoming Telegram messages. Configured to capture all updates. This is the entry point; the user sends a URL and a platform request (e.g., "Post this YouTube video to Instagram"). Social Media Autopilot (AI Agent, uses OpenAI & Blotato tools) — The core AI agent. It receives the Telegram message text and uses a detailed system prompt to orchestrate the entire pipeline. It decides which tools to call and in what order. The agent uses: - OpenAI ChatGPT (API Key auth) — The language model powering the agent's reasoning. Uses model. - Simple Memory (No auth) — A buffer memory that stores the last 35 conversation turns, allowing the agent to maintain context across multiple tool calls (e.g., polling for status). Create source (Blotato API Key auth) — Takes the extracted URL from the user's message and creates a content source in Blotato. This fetches and processes the content from the URL (e.g., extracts article text, video transcript). Get source (Blotato API Key auth) — Polls the source created in step 3 until its becomes . This ensures the content is fully extracted before proceeding. Create visual - tweet card carousel (Blotato API Key auth) — Used when the target platform is Instagram. Generates a carousel of tweet-style quote cards using a predefined template. Configured with a default profile image, author name, and handle. Create visual - AI image video (Blotato API Key auth) — Used when the target platform is TikTok. Generates an AI-powered video with scenes, voiceover, and captions. Configured with a deep American voice (Brian) and the Recraft v3 AI image model. Get visual (Blotato API Key auth) — Polls the visual generation job until its is exactly . This is critical to ensure the media is fully rendered before publishing. Post to Instagram (Blotato API Key auth) — Publishes the generated carousel to the connected Instagram account (). Uses the media URLs from the completed visual. Post to TikTok (Blotato API Key auth) — Publishes the generated video to the connected TikTok account (). Uses the media URL from the completed visual. Send notification (Telegram Bot Token auth) — Sends a confirmation message back to the original Telegram chat, confirming successful publication (e.g., "✅ Published successfully on Instagram."). Setup Instructions To use this workflow, you will need: n8n instance — Self-hosted or cloud (n8n.cloud). Blotato account — Sign up at blotato.com and get your API key. Connect your Instagram and TikTok accounts inside Blotato. Telegram Bot — Create a bot via @BotFather and get the bot token. This is used for both the trigger and the notification. OpenAI API key — Required for the AI agent. Get one from platform.openai.com. Configuration steps: Import the workflow JSON into n8n. Add your Blotato API credentials as a credential of type "Blotato API". Add your OpenAI API key as a credential of type "OpenAI". Add your Telegram Bot token as a credential of type "Telegram Bot API". In the Post to Instagram and Post to TikTok nodes, select the correct Blotato-connected accounts from the dropdown. Activate the workflow. Use Cases & Variations Content Repurposing: Automatically turn YouTube videos into TikTok clips or blog posts into Instagram carousels. Multi-Platform Posting: Extend the workflow to post to other platforms like LinkedIn, Facebook, or Twitter by adding more Blotato post nodes. Scheduled Digests: Replace the Telegram trigger with a Schedule trigger to automatically process a list of URLs from a Google Sheet or RSS feed. Brand Customization: Modify the carousel template ID and video settings (voice, model, colors) to match your brand guidelines. Approval Workflow: Add a manual approval step (e.g., a Slack message with buttons) before publishing, giving you control over what goes live.
Low Cost AI Videos with Veo3 Fast for YouTube/TikTok
AI Video Generation & Social Media Upload Workflow This workflow automates the process of generating AI-powered videos using Google's Veo3 Fast model, saving them to Google Drive, generating SEO-optimized titles with GPT-4o, and automatically uploading them to YouTube and TikTok. It's designed for content creators, marketers, and social media managers who want to streamline their video production pipeline from a single Google Sheet interface. The workflow is triggered by a Google Sheet that acts as a central command center. You simply add your video prompts and desired durations to the sheet, and the workflow handles everything else — from video generation to multi-platform publishing. This eliminates manual downloading, renaming, and uploading steps, saving hours of repetitive work. Node-by-Node Breakdown When clicking 'Test workflow' (Manual Trigger) — No auth. Starts the workflow manually for testing purposes. Useful for initial setup and debugging. Schedule Trigger — No auth. Runs the workflow on a recurring schedule. Currently configured to run every 5 minutes (interval-based on minutes). Get new video (Google Sheets) — OAuth2 (Google). Reads rows from a Google Sheet where the "VIDEO" column is empty, indicating new video requests. The sheet must have columns: PROMPT, DURATION, VIDEO, YOUTUBEURL, and rownumber. Set data (Set) — No auth. Combines the PROMPT and DURATION fields from the sheet into a single prompt string that will be sent to the AI video generation API. Create Video (HTTP Request) — Header Auth (Authorization: Key YOURAPIKEY). Sends a POST request to the Veo3 Fast API endpoint () with the combined prompt as JSON body. Returns a for polling. Wait 60 sec. (Wait) — No auth. Pauses execution for 60 seconds to allow the video generation to complete before checking status. Get status (HTTP Request) — Header Auth (same as above). Polls the Veo3 Fast API status endpoint using the from step 5 to check if video generation is complete. Completed? (IF) — No auth. Checks if the status returned is "COMPLETED". If yes, proceeds to fetch the video URL. If not, loops back to wait another 60 seconds and check again. Get Url Video (HTTP Request) — Header Auth (same as above). Once completed, fetches the full video details including the download URL from the Veo3 API. Generate title (OpenAI) — API Key auth (OpenAI). Uses GPT-4o-mini to generate an SEO-optimized YouTube title (max 60 characters) based on the original prompt. The AI is instructed to match the language of the input and output only the title. Get File Video (HTTP Request) — No auth. Downloads the actual video file from the URL provided by Veo3. This binary data is used for uploading. Upload Video (Google Drive) — OAuth2 (Google). Uploads the downloaded video file to a specified Google Drive folder (named with timestamp + original filename). Update result (Google Sheets) — OAuth2 (Google). Updates the original Google Sheet row with the video URL from Veo3 in the "VIDEO" column. HTTP Request (Upload to YouTube) — Header Auth (Authorization: Apikey YOURAPIKEY). Uploads the video to YouTube via the Upload-Post API. Sends multipart form data including the title (from GPT-4o), username, platform (youtube), and the video binary. Update Youtube URL (Google Sheets) — OAuth2 (Google). Updates the same Google Sheet row with the YouTube video URL in the "YOUTUBE_URL" column. Upload on TikTok (HTTP Request) — Header Auth (same as Upload-Post). Uploads the same video to TikTok via the Upload-Post API, using the same title and username but with platform set to "tiktok". Setup Instructions Google Services: You need a Google Cloud project with the Sheets API and Drive API enabled. Create OAuth2 credentials and connect them in n8n. Fal.ai Account: Sign up at fal.ai to get an API key. In the HTTP Request nodes (Create Video, Get status, Get Url Video), set Header Auth with Name: and Value: . OpenAI Account: Get an API key from OpenAI. Connect it in the Generate title node. Upload-Post Account: Sign up at Upload-Post (free plan includes 10 uploads/month). Get your API key from Manage API Keys. Set Header Auth with Name: and Value: . Create a profile and use its username in the field. Google Sheet: Create a copy of this template. Add your prompts and durations. Leave the VIDEO and YOUTUBE_URL columns empty. Use Cases & Variations Content Repurposing: Modify the workflow to generate videos from blog posts or articles by adding an HTTP Request node to fetch content first. Multi-Language Support: The GPT-4o prompt already generates titles in the same language as the input. You can extend this to translate prompts before video generation. Additional Platforms: Add more HTTP Request nodes to upload to Instagram, Facebook, or LinkedIn using the same Upload-Post API (just change the parameter). Scheduling: Instead of running every 5 minutes, you could trigger the workflow via webhook from a form submission (e.g., Typeform or Google Forms). Thumbnail Generation: Add a node to generate video thumbnails using DALL-E or another image generation API before uploading. Analytics Tracking: After upload, add nodes to fetch video analytics from YouTube API and log them back to the Google Sheet.