Skip to main content

Research-to-social post generator with Perplexity AI and Facebook Graph API

Workflow preview

Workflow preview
100%
Research-to-social post generator with Perplexity AI and Facebook Graph API preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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...

Best for

  • Social Media automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.toolworkflow, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.facebookgraphapi, n8n-nodes-base.set, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by HoangSP.

Original n8n.io source

1.1 Workflow description

Title
Research-to-social post generator with Perplexity AI and Facebook Graph API
Workflow name
Research-to-social post generator with Perplexity AI and Facebook Graph API

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 fresh sources
  • Outputs are validated into a structured JSON
  • Post Writing Agent crafts a concise Vietnamese post
  • (Optional) Facebook Graph API publishes to your Page

How to set up

  1. Connect OpenAI & Facebook in Credentials (no API key inside nodes).
  2. In Tool: Call Perplexity Researcher, set your research workflowId.
  3. In Publish: Facebook Graph API, set your Page ID and edge.
  4. Adjust prompts/tone and the LANGUAGE in CONFIG.
  5. Test the flow with sample prompts in the chat.

Requirements

  • n8n (Cloud or self-hosted)
  • OpenAI API key (stored in Credentials)
  • Facebook Page publish permissions
  • (Optional) a research workflow for Perplexity

How to customize the workflow

  • Add moderation/review gates before publishing.
  • Duplicate the publish path for other platforms.
  • Store outputs in Sheets/Notion/DB for auditing.
  • Tune model choice & temperature for your brand voice.

Security

  • Avoid hardcoding secrets in HTTP or Code nodes.
  • Keep identifiers (Page IDs, workflowIds) configurable in CONFIG.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Chat Trigger

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 2 - Tool: Call Perplexity Researcher

Type / Role
@n8n/n8n-nodes-langchain.toolWorkflow - toolWorkflow
Config choices
Version 2.1

Block 3 - Agent: Topic + Research

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 4 - Parser: Article JSON

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 5 - LM: For Topic Agent

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 6 - LM: For JSON Extraction

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 7 - Agent: Extract JSON

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 8 - Parser: Post Fields

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 9 - LM: For Post Writer

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 10 - Agent: Create Post Content

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 11 - Publish: Facebook Graph API

Type / Role
n8n-nodes-base.facebookGraphApi - facebookGraphApi
Config choices
Version 1

Block 12 - ⚙️ CONFIG (Set fields)

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 13 - Sticky: Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky: Chat Trigger

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky: Agent: Topic + Research

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky: Tool: Call Perplexity Researcher

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky: Parser: Article JSON

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky: Agent: Extract JSON

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky: Parser: Post Fields

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky: Agent: Create Post Content

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky: LM: For Topic Agent

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky: LM: For JSON Extraction

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky: LM: For Post Writer

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky: Publish: Facebook Graph API

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Research-to-social post generator with Perplexity AI and Facebook Graph API
Complexity advanced
Nodes 25
Categories Social Media
Author HoangSP
Published 17 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8664/8664.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Research-to-social post generator with Perplexity AI and Facebook Graph API do?

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...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media use case.