Extract trends, auto-generate social content with AI, Reddit, Google & post
Extract Trends and Auto-Generate Social Media Content with OpenAI, Reddit, and Google Trends: Approve and Post to Instagram, TikTok, and More
Description
What Problem Does This Solve? π οΈ
This workflow automates trend extraction and social media content creation for businesses and marketers. It eliminates manual trend research and content generation by fetching trends, scoring them with AI, and posting tailored content to multiple platforms. Target audience: Social media managers, digital marketers, and businesses aiming to streamline content strategies.
What Does It Do? π
- Fetches trending topics from Reddit, X and Google Trends
- Scores trends for relevance using OpenAI.
- Generates content for Twitter/X, LinkedIn, Instagram and Facebook
- Posts to supported platforms
- Stores results in Google Sheets for tracking
Key Features π
- Real-time trend fetching from Reddit and Google Trends.
- AI-driven trend scoring and content generation (OpenAI).
- Automated posting to Twitter/X, LinkedIn, Instagram, and Facebook.
- Persistent storage in Google Sheets.
Setup Instructions
Prerequisites βοΈ
- n8n Instance: Self-hosted or cloud n8n instance.
- API Credentials:
- Reddit API: Client ID and secret from Reddit.
- SerpApi (Google Trends): API key from SerpApi, stored in n8n credentials
- OpenAI API: API key with GPT model access.
- Twitter/X API: OAuth 1.0a credentials with write permissions.
- LinkedIn API: OAuth 2.0 credentials with
w_organization_socialscope. - Instagram/Facebook API: Meta Developer app with posting permissions.
- Google Sheets API: Credentials from Google Cloud Console.
Installation Steps π¦
-
Import the Workflow:
- Copy the workflow JSON from the "Template Code" section below.
- Import it into n8n via "Import from File" or "Import from URL".
-
Configure Credentials:
- Add API credentials in n8nβs Credentials section for Reddit, SerpApi, OpenAI, Twitter/X, LinkedIn, Instagram/Facebook, and Google Sheets.
- Assign credentials to respective nodes. For example:
- In the
Fetch Google Trendsnode (HTTP Request), use n8n credentials for SerpApi instead of hardcoding the API key. - Example: Set the API key in n8n credentials as
SerpApiKeyand reference it in the nodeβs query parameter:api_key={{ $credentials.SerpApiKey }}.
- In the
-
Set Up Google Sheets with the following columns (exact column names are case-sensitive) -Timestamp | Trend | Score | BrandVoice | AudienceMood |
-
Customize Nodes:
- OpenAI Nodes (
Trend Relevance Scoring,Generate Social Media Content): Update the model (e.g.,gpt-4o) and prompt as needed. - HTTP Request Nodes (
Post to Twitter/X,Post to LinkedIn, etc.): Verify URLs, authentication, and payloads. - Brand Voice/Audience Mood: Adjust
Prepare Trend Scoring Inputfor your desiredbrand_voice(e.g., "casual") andaudience_mood(e.g., "curious").
- Test the Workflow:
Fetch Reddit TrendstoStore Selected Trends- to score and store trends.Retrieve Latest Trendsto end) to generate and post content- Check Google Sheets for posting statuses
How It Works
High-Level Steps π
- Fetch Trends: Pulls trends from Reddit,X and Google Trends.
- Score Trends: Uses OpenAI to score trends for relevance.
- Generate Content: Creates platform-specific social media content.
- Post Content: Posts to LinkedIn, Facebook or X
Detailed descriptions are available in the sticky notes within the workflow screenshot above.
Node Names and Actions
Trend Extraction and Scoring
Daily Trigger Idea: Triggers the workflow daily.Set Default Inputs: Sets defaultbrand_voiceand inputs.Fetch Reddit Trends: Fetches Reddit posts.Extract Reddit Trends: Extracts trends from Reddit.Fetch Google Trends: Fetches Google Trends via SerpApi.Extract Google Trends2: Processes Google Trends data.Fetch Twitter Mentions: Fetches Twitter mentions.Translate Tweets to English: Translates tweets.Fix Tweet Translation Output: Fixes translation format.Detect Audience Mood: Detects audience mood.Fix Audience Mood Output: Fixes mood output format.Analyze News Sentiment: Analyzes news sentiment.Combine Data (Merge): Merges all data sources.Merge Items into Single Item: Combines data into one item.Combine Trends and UGC: Combines trends with UGC.Prepare Trend Scoring Input: Prepares data for scoring.Trend Relevance Scoring: Scores trends with OpenAI.Parse Trend Scores: Parses scoring output.Store Selected Trends: Stores trends in Google Sheets.
Content Generation and Posting
Retrieve Latest Trends: Retrieves trends from Google Sheets.Parse Retrieved Trends: Parses retrieved trends.Select Top Trends: Selects the top trend.Generate Social Media Content: Generates platform-specific content.Parse Social Media Content: Parses generated content.Generate Images: Generates images for posts (if applicable). -Handle Approvals/Rejection before PostingPost to Instagram: Posts to Instagram.Post to Facebook: Posts to Facebook.Post to LinkedIn: Posts to LinkedIn.
Customization Tips
- Add Trend Sources π‘: Include more sources (e.g., Instagram trends) by adding nodes to
Combine Data (Merge). - Change Content Tone βοΈ: Update the
Generate Social Media Contentprompt for a different tone (e.g., "humorous"). - Adjust Schedule β°: Modify
Daily Trigger Ideato run hourly or weekly. - Automate TikTok/YouTube π₯: Add video generation (e.g., FFMPEG) to post TikTok and YouTube Shorts
n8n Workflow: AI-Powered Trend Extraction and Social Content Generation
This n8n workflow automates the process of identifying trending topics from a Google Sheet, generating social media content using AI, and then publishing that content to Reddit, LinkedIn, and Facebook. It also includes an approval step via Gmail and a mechanism to handle content that is not approved.
What it does
This workflow simplifies and automates the following steps:
- Triggers on Google Sheet Update: Monitors a specified Google Sheet for new or updated rows, acting as the starting point for trend analysis.
- Extracts Trend Data: Reads the relevant trend information from the Google Sheet.
- Generates Social Media Content (AI): Uses OpenAI to generate engaging social media posts based on the extracted trend data.
- Requests Approval via Email: Sends an email (via Gmail) with the generated content for human review and approval.
- Conditional Publishing:
- If the content is approved, it proceeds to publish the content to Reddit, LinkedIn, and Facebook.
- If the content is not approved, it sends a notification and waits for a specified period before potentially re-attempting or logging the unapproved content.
- Publishes to Social Media Platforms: Automatically posts the approved content to:
- Logs Activity: Records the status and details of published or unapproved content back into the Google Sheet.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- Google Sheets Account: Access to a Google Sheet containing your trend data.
- OpenAI API Key: An API key for OpenAI to generate content.
- Gmail Account: For sending and receiving content approval requests.
- Reddit Account: With necessary permissions to post.
- LinkedIn Account: With necessary permissions to post.
- Facebook Account: With necessary permissions to post to a page or group.
Setup/Usage
- Import the Workflow:
- Download the provided JSON file.
- In your n8n instance, go to "Workflows" and click "New".
- Click the three dots menu (...) and select "Import from JSON".
- Paste the workflow JSON or upload the file.
- Configure Credentials:
- For each node requiring credentials (Google Sheets, OpenAI, Gmail, Reddit, LinkedIn, Facebook Graph API), click on the node and configure your respective credentials.
- Ensure your Google Sheets credential has access to the spreadsheet you intend to use.
- Ensure your social media credentials have the necessary posting permissions.
- Configure Google Sheets Trigger:
- In the "Google Sheets Trigger" node, specify the Spreadsheet ID and Sheet Name where your trend data is located.
- Configure the "Watch new rows" or "Watch for changes" settings as appropriate for your use case.
- Configure OpenAI Node:
- In the "OpenAI" node, set up the prompt for content generation. You'll likely want to reference data from the Google Sheets trigger (e.g.,
{{$json["trend"]}}).
- In the "OpenAI" node, set up the prompt for content generation. You'll likely want to reference data from the Google Sheets trigger (e.g.,
- Configure Gmail Node (Approval):
- Set up the "Gmail" node to send an email to the approver(s).
- Define the email content, including the generated social media post and clear options for "Approve" or "Reject" (e.g., via specific keywords or links).
- Configure If Node:
- The "If" node will need to be configured to check the response from the Gmail approval email. For example, it might look for a specific keyword in the reply subject or body to determine approval status.
- Configure Social Media Nodes:
- For the "Reddit", "LinkedIn", and "Facebook Graph API" nodes, map the generated content from the OpenAI node to the respective posting fields.
- Configure Error Handling/Unapproved Path:
- Review the "Wait" and "Google Sheets" nodes on the "False" branch of the "If" node. Adjust the wait time and the logging action for unapproved content as needed.
- Activate the Workflow:
- Once all credentials and configurations are set, activate the workflow. It will now automatically run based on your Google Sheets trigger.
Related Templates
Auto-create TikTok videos with VEED.io AI avatars, ElevenLabs & GPT-4
π₯ Viral TikTok Video Machine: Auto-Create Videos with Your AI Avatar --- π― Who is this for? This workflow is for content creators, marketers, and agencies who want to use Veed.ioβs AI avatar technology to produce short, engaging TikTok videos automatically. Itβs ideal for creators who want to appear on camera without recording themselves, and for teams managing multiple brands who need to generate videos at scale. --- βοΈ What problem this workflow solves Manually creating videos for TikTok can take hours β finding trends, writing scripts, recording, and editing. By combining Veed.io, ElevenLabs, and GPT-4, this workflow transforms a simple Telegram input into a ready-to-post TikTok video featuring your AI avatar powered by Veed.io β speaking naturally with your cloned voice. --- π What this workflow does This automation links Veed.ioβs video-generation API with multiple AI tools: Analyzes TikTok trends via Perplexity AI Writes a 10-second viral script using GPT-4 Generates your voiceover via ElevenLabs Uses Veed.io (Fabric 1.0 via FAL.ai) to animate your avatar and sync the lips to the voice Creates an engaging caption + hashtags for TikTok virality Publishes the video automatically via Blotato TikTok API Logs all results to Google Sheets for tracking --- π§© Setup Telegram Bot Create your bot via @BotFather Configure it as the trigger for sending your photo and theme Connect Veed.io Create an account on Veed.io Get your FAL.ai API key (Veed Fabric 1.0 model) Use HTTPS image/audio URLs compatible with Veed Fabric Other APIs Add Perplexity, ElevenLabs, and Blotato TikTok keys Connect your Google Sheet for logging results --- π οΈ How to customize this workflow Change your Avatar: Upload a new image through Telegram, and Veed.io will generate a new talking version automatically. Modify the Script Style: Adjust the GPT prompt for tone (educational, funny, storytelling). Adjust Voice Tone: Tweak ElevenLabs stability and similarity settings. Expand Platforms: Add Instagram, YouTube Shorts, or X (Twitter) posting nodes. Track Performance: Customize your Google Sheet to measure your most successful Veed.io-based videos. --- π§ Expected Outcome In just a few seconds after sending your photo and theme, this workflow β powered by Veed.io β creates a fully automated TikTok video featuring your AI avatar with natural lip-sync and voice. The result is a continuous stream of viral short videos, made without cameras, editing, or effort. --- β Import the JSON file in n8n, add your API keys (including Veed.io via FAL.ai), and start generating viral TikTok videos starring your AI avatar today! π₯ Watch This Tutorial --- π Documentation: Notion Guide Need help customizing? Contact me for consulting and support : Linkedin / Youtube
Track competitor SEO keywords with Decodo + GPT-4.1-mini + Google Sheets
This workflow automates competitor keyword research using OpenAI LLM and Decodo for intelligent web scraping. Who this is for SEO specialists, content strategists, and growth marketers who want to automate keyword research and competitive intelligence. Marketing analysts managing multiple clients or websites who need consistent SEO tracking without manual data pulls. Agencies or automation engineers using Google Sheets as an SEO data dashboard for keyword monitoring and reporting. What problem this workflow solves Tracking competitor keywords manually is slow and inconsistent. Most SEO tools provide limited API access or lack contextual keyword analysis. This workflow solves that by: Automatically scraping any competitorβs webpage with Decodo. Using OpenAI GPT-4.1-mini to interpret keyword intent, density, and semantic focus. Storing structured keyword insights directly in Google Sheets for ongoing tracking and trend analysis. What this workflow does Trigger β Manually start the workflow or schedule it to run periodically. Input Setup β Define the website URL and target country (e.g., https://dev.to, france). Data Scraping (Decodo) β Fetch competitor web content and metadata. Keyword Analysis (OpenAI GPT-4.1-mini) Extract primary and secondary keywords. Identify focus topics and semantic entities. Generate a keyword density summary and SEO strength score. Recommend optimization and internal linking opportunities. Data Structuring β Clean and convert GPT output into JSON format. Data Storage (Google Sheets) β Append structured keyword data to a Google Sheet for long-term tracking. Setup Prerequisites If you are new to Decode, please signup on this link visit.decodo.com n8n account with workflow editor access Decodo API credentials OpenAI API key Google Sheets account connected via OAuth2 Make sure to install the Decodo Community node. Create a Google Sheet Add columns for: primarykeywords, seostrengthscore, keyworddensity_summary, etc. Share with your n8n Google account. Connect Credentials Add credentials for: Decodo API credentials - You need to register, login and obtain the Basic Authentication Token via Decodo Dashboard OpenAI API (for GPT-4o-mini) Google Sheets OAuth2 Configure Input Fields Edit the βSet Input Fieldsβ node to set your target site and region. Run the Workflow Click Execute Workflow in n8n. View structured results in your connected Google Sheet. How to customize this workflow Track Multiple Competitors β Use a Google Sheet or CSV list of URLs; loop through them using the Split In Batches node. Add Language Detection β Add a Gemini or GPT node before keyword analysis to detect content language and adjust prompts. Enhance the SEO Report β Expand the GPT prompt to include backlink insights, metadata optimization, or readability checks. Integrate Visualization β Connect your Google Sheet to Looker Studio for SEO performance dashboards. Schedule Auto-Runs β Use the Cron Node to run weekly or monthly for competitor keyword refreshes. Summary This workflow automates competitor keyword research using: Decodo for intelligent web scraping OpenAI GPT-4.1-mini for keyword and SEO analysis Google Sheets for live tracking and reporting Itβs a complete AI-powered SEO intelligence pipeline ideal for teams that want actionable insights on keyword gaps, optimization opportunities, and content focus trends, without relying on expensive SEO SaaS tools.
Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax
Spark your creativity instantly in any chatβturn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. π What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing π§ Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation π Required Credentials OpenAI API Setup Go to platform.openai.com β API keys (sidebar) Click "Create new secret key" β Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai β Dashboard β API Keys Generate a new API key β Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) βοΈ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowβchat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" π― Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration β οΈ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions