Skip to main content

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

Workflow preview

Workflow preview
100%
Generate social media posts with GPT-4 for LinkedIn, X, and Facebook preview
Open on n8n.io

1. Workflow Overview

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

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.splitout, n8n-nodes-base.switch, n8n-nodes-base.aggregate, n8n-nodes-base.postgres

Source and attribution

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

Original n8n.io source

1.1 Workflow description

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

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 manual trigger for on-demand content
  2. Generate — Creates tailored marketing content using OpenAI GPT-4 based on topic/theme
  3. Optimize — Customizes content for each platform (character limits, hashtags, tone)
  4. Review — Optional human approval gate before publishing
  5. Publish — Auto-posts to LinkedIn, Twitter, and Facebook simultaneously
  6. Track — Logs all posts to database for analytics and content history
  7. Notify — Sends confirmation to Slack with links to published posts

Setup steps

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

What It Does:

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

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 - Sticky Note

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

Block 2 - Sticky Note1

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

Block 3 - Sticky Note2

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

Block 4 - Sticky Note3

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

Block 5 - Sticky Note4

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

Block 6 - Daily content generation at 10 AM

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 7 - Select content topic and type

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Generate content with OpenAI GPT-4

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Parse AI response and extract content

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Optimize content for each platform

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Split content for each platform

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

Block 12 - Route to appropriate platform

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3

Block 13 - Post to LinkedIn

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - Post to Twitter/X

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 15 - Post to Facebook

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - Aggregate all platform results

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

Block 17 - Prepare database record

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Store post record in PostgreSQL

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 19 - Prepare Slack notification

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - Send confirmation to Slack

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 21 - Log success and update statistics

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

3. Summary Table

Workflow Generate social media posts with GPT-4 for LinkedIn, X, and Facebook
Complexity advanced
Nodes 21
Categories Social Media, Multimodal AI
Author Oneclick AI Squad
Published 24 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13648/13648.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 Generate social media posts with GPT-4 for LinkedIn, X, and Facebook do?

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

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, Multimodal AI use case.