Research-to-social post generator with Perplexity AI and Facebook Graph API
Needs changesWhat this workflow does
This AI workflow has 12 nodes and runs when a chat message arrives. Along the way it connects OpenAI Chat Model and Facebook Graph API.
How it runs
Trigger: When a chat message arrives.
- ⚙️ CONFIG (Set fields) (Edit Fields (Set)): sets or maps fields
- LM: For Topic Agent (OpenAI Chat Model): uses OpenAI Chat Model
- Agent: Topic + Research (AI Agent): runs an AI agent
- Tool: Call Perplexity Researcher (Call n8n Workflow Tool): uses Call n8n Workflow Tool
- LM: For JSON Extraction (OpenAI Chat Model): uses OpenAI Chat Model
- Agent: Extract JSON (AI Agent): runs an AI agent
- Parser: Article JSON (Structured Output Parser): uses Structured Output Parser
- LM: For Post Writer (OpenAI Chat Model): uses OpenAI Chat Model
- Agent: Create Post Content (AI Agent): runs an AI agent
- Parser: Post Fields (Structured Output Parser): uses Structured Output Parser
…plus 1 more step. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Agent: Topic + Research (v1.8), Agent: Extract JSON (v1.8), Agent: Create Post Content (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Agent: Topic + Research (v1.8), Agent: Extract JSON (v1.8), Agent: Create Post Content (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (7)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Facebook Graph API
n8n-nodes-base.facebookGraphApi - Edit Fields (Set)
n8n-nodes-base.set
From the author
Who’s it for Teams that want to turn a chat prompt into a researched, ready-to-post social update—optionally published to Facebook. What it does / How it works - Chat Trigger receives the user prompt - Topic Agent optionally calls a research sub-workflow for…