Generate social media posts with GPT-4 for LinkedIn, X, and Facebook

Go to Workflow
1 views
Built by Oneclick AI Squad Oneclick AI Squad
Created on June 05, 2026

Description

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

Trigger — Runs daily at 10 AM or manual trigger for on-demand content
Generate — Creates tailored marketing content using OpenAI GPT-4 based on topic/theme
Optimize — Customizes content for each platform (character limits, hashtags, tone)
Review — Optional human approval gate before publishing
Publish — Auto-posts to LinkedIn, Twitter, and Facebook simultaneously
Track — Logs all posts to database for analytics and content history
Notify — Sends confirmation to Slack with links to published posts

Setup steps

OpenAI API — Add your OpenAI API key in credentials
Social Media APIs — Configure LinkedIn, Twitter (X), and Facebook credentials
PostgreSQL — Create social_posts table to store post history
Slack — Add webhook URL for notifications
Content Topics — Customize the topic list in the initial node
Approval (Optional) — Enable/disable manual review gate
Test — Run manually first, then activate for daily automation

What It Does:

Randomly selects content topics and types for variety
Generates engaging posts using OpenAI
Optimizes content for each platform (character limits, hashtags, tone)
Publishes simultaneously to all three platforms
Stores complete records in database
Sends confirmation notifications to Slack



Nodes Used (3)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest
Postgres
n8n-nodes-base.postgres