Generate social media posts with GPT-4 for LinkedIn, X, and Facebook
Ready for 3.0What this workflow does
This workflow has 16 nodes and runs on a schedule (cron 0 10 * * *). Along the way it connects Postgres. It also calls api.openai.com, api.linkedin.com and api.twitter.com over HTTP.
How it runs
Trigger: On a schedule (cron 0 10 * * *).
- Select content topic and type (Code): runs custom JavaScript code
- Generate content with OpenAI GPT- (HTTP Request): calls api.openai.com (POST)
- Parse AI response and extract content (Code): runs custom JavaScript code
- Optimize content for each platform (Code): runs custom JavaScript code
- Split content for each platform (Split Out): splits a list into separate items
- Route to appropriate platform (Switch): routes items into 3 branches
- Post to LinkedIn (HTTP Request): calls api.linkedin.com (POST)
- Post to Twitter/X (HTTP Request): calls api.twitter.com (POST)
- Post to Facebook (HTTP Request): calls graph.facebook.com (POST)
- Aggregate: combines items into one
…plus 5 more steps. See the full node list below.
Services it uses
HTTP calls to: api.openai.com, api.linkedin.com, api.twitter.com, graph.facebook.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Split Out
n8n-nodes-base.splitOut - Switch
n8n-nodes-base.switch - Aggregate
n8n-nodes-base.aggregate - Postgres
n8n-nodes-base.postgres
From the author
Automatically generates engaging marketing posts using OpenAI and publishes them across LinkedIn, Twitter (X), and Facebook. Creates platform-optimized content with hashtags, emojis, and proper formatting. How it works 1. Trigger — Runs daily at 10 AM or…