Social Media Post Generator
Monitors Google Trends for viral topics, researches them with AI, and auto-publishes optimized posts to social media on a schedule.
What it does
Stay ahead of viral trends by having this agent monitor Google Trends and use AI to research high-potential topics for your niche. It then automatically generates engaging content and publishes optimized posts to LinkedIn, Twitter/X, or Facebook on your schedule while tracking performance in Google Sheets.
Step by step
- Configure the schedule trigger to run at specific intervals for consistent content generation.
- Set up HTTP request nodes with the correct API endpoints and authentication headers for Google Trends and social media platforms.
- Define the JSON schema in the code node to filter research results based on relevance scores or keyword matches.
Where the LLM does the work
- Prompt OpenAI to select trending topics that align specifically with your niche rather than just general popularity.
- Instruct Perplexity AI to conduct focused research that extracts key facts and angles suitable for social media engagement.
- Have the final LLM step rewrite the researched content into platform-specific tones, such as professional for LinkedIn or concise for Twitter.
Watch out for
Tools that fit
The agent brief
You are helping me build the following AI agent workflow. ## Goal Social Media Post Generator: Monitors Google Trends for viral topics, researches them with AI, and auto-publishes optimized posts to social media on a schedule. ## Specification - What it does: Stay ahead of viral trends by having this agent monitor Google Trends and use AI to research high-potential topics for your niche. It then automatically generates engaging content and publishes optimized posts to LinkedIn, Twitter/X, or Facebook on your schedule while tracking performance in Google Sheets. - Trigger: On a schedule (Scheduled · daily 6 AM and 6 PM) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - n8n: Workflow orchestration platform - Google Trends API: Fetching trending search queries via SerpAPI - OpenAI: Topic selection and content curation - Perplexity AI: Researching selected topics for current information - LinkedIn: Publishing formatted posts to social media ## Known pitfalls, handle each one explicitly in your implementation 1. Trending topics can be volatile and irrelevant by the time generation completes so include a validation step to check topic freshness before publishing. ## Reference implementation https://n8n.io/workflows/4352 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/automated-social-media-post-generator/ via usecasesforagents.com
Frequently asked questions
Can I use a different Automation Platform than n8n?
Yes. n8n is only the example automation platform in this recipe. The same flow works with Home Assistant. Swap the automation platform connection and keep the rest of the setup as written.
Want this running in your business?
Who it's for
Built for marketers who'd rather brief an agent than start from a blank doc.
Founders and execs get the same output without having to ask someone else to run it.