What This Workflow Does
Creating engaging, researched social media content is time-consuming. Between ideation, fact-checking, writing, and scheduling, a single post can eat up an hour of your team's day. This automation solves that by turning a simple chat message into a fully-formed, publication-ready social update in minutes.
The workflow accepts a topic prompt (like "latest trends in sustainable packaging"), uses Perplexity AI to research current information with sources, structures the findings, generates a concise and engaging post in your brand voice, and can optionally publish it directly to your Facebook Page. It's like having a dedicated content researcher and copywriter available 24/7.
How It Works
The automation follows a logical pipeline that transforms a raw idea into polished content.
Step 1: Chat Trigger Receives Prompt
You or your team member sends a topic idea through a chat interface (like Slack, Telegram, or directly in n8n). This could be as simple as "Write about remote work productivity tips for Q2."
Step 2: Topic Agent Calls Research Sub-Workflow
The system optionally triggers a dedicated research workflow using Perplexity AI. This searches the web for current information, statistics, and credible sources related to your prompt, ensuring your content is timely and factual.
Step 3: Output Validation & Structuring
The raw research data is validated and formatted into a clean JSON structure. This step ensures consistency and prepares the information for the content generation phase.
Step 4: Post Writing Agent Crafts Content
An AI writing agent (using OpenAI or similar) takes the structured research and generates a concise, engaging social media post. You can configure the tone, language (default is Vietnamese in the template), length, and call-to-action.
Step 5: Optional Facebook Publishing
If enabled, the finalized post is automatically published to your specified Facebook Page via the Facebook Graph API. You can also route it to a review queue or save it to a content calendar instead.
Who This Is For
This template is ideal for marketing teams, content creators, small business owners, and agencies who need to maintain an active social media presence with limited resources. It's particularly valuable for:
- Social Media Managers: Who need to produce daily content across multiple topics.
- Startups & Small Businesses: With no dedicated content team but who understand the importance of social engagement.
- Digital Agencies: Managing social accounts for clients in niche industries requiring researched content.
- Experts & Consultants: Who want to share timely insights on industry developments without spending hours writing.
- Teams with Global Audiences: Needing content in different languages or tailored to regional trends.
What You'll Need
- An active n8n instance (cloud or self-hosted).
- An OpenAI API key (stored securely in n8n Credentials) for the writing agent.
- Facebook Page publishing permissions and access tokens if using the auto-publish feature.
- (Optional) A configured Perplexity AI research sub-workflow for the topic research step.
- Basic familiarity with n8n to configure node credentials and adjust prompts.
Quick Setup Guide
Get this workflow running in your n8n environment in under 15 minutes.
- Import the Template: Download the JSON file above and import it into your n8n instance via the "Import from File" option.
- Configure Credentials: Set up your OpenAI API key and Facebook Graph API credentials in n8n's Credentials section. Do not hardcode keys in nodes.
- Set Research Workflow ID: In the "Tool: Call Perplexity Researcher" node, enter the workflow ID of your research sub-workflow (if using).
- Configure Facebook Publishing: In the "Publish: Facebook Graph API" node, enter your Facebook Page ID and select the appropriate edge for posting.
- Adjust Prompts & Language: Review and modify the AI agent prompts in the "CONFIG" section to match your brand voice. Change the LANGUAGE parameter if needed.
- Test the Flow: Activate the workflow and send a test prompt through the chat trigger. Monitor the execution to ensure each step completes successfully.
Pro tip: Before enabling auto-publishing, run the workflow with the Facebook step disabled and review the generated posts in a spreadsheet or document for a week. This helps you fine-tune the AI's tone and ensure quality before going fully automatic.
Key Benefits
Cut content creation time from hours to minutes. What used to require opening multiple browser tabs for research, drafting, and editing now happens in a single automated sequence. This can save 5-10 hours per week for active social accounts.
Ensure your content is current and credible. By leveraging Perplexity AI's real-time web search with citations, your posts reference the latest information, not just generic AI knowledge. This builds authority and trust with your audience.
Maintain consistent posting even during busy periods. Social media algorithms reward consistency. This automation ensures you never have a content gap because the team was focused on other projects or out of office.
Scale content production without scaling headcount. A single marketing manager can effectively produce the volume of content that might otherwise require a junior writer or researcher, optimizing your team's capacity.
Create a reusable content pipeline. Once configured, this workflow becomes a template for any topic. You can duplicate it for different content formats (LinkedIn articles, Twitter threads) or client accounts, creating a scalable system.