Skip to main content

LinkedIn post automation with AI (GPT-4o) generation & Slack approval

Workflow preview

Workflow preview
100%
LinkedIn post automation with AI (GPT-4o) generation & Slack approval preview
Open on n8n.io

Important notice

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

1. Workflow Overview

LinkedIn Post Automation with AI Generation (Gpt 4o) & Slack Approval How it Works This workflow automates the creation and publishing of LinkedIn posts with AI generated content and human approval...

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.limit, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.webhook, n8n-nodes-base.googlesheetstrigger, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
LinkedIn post automation with AI (GPT-4o) generation & Slack approval
Workflow name
LinkedIn post automation with AI (GPT-4o) generation & Slack approval

LinkedIn Post Automation with AI Generation (Gpt-4o) & Slack Approval

How it Works

This workflow automates the creation and publishing of LinkedIn posts with AI-generated content and human approval via Slack, using Google Sheets, OpenAI (GPT-4), Slack Interactive Messages, and the LinkedIn API.

Whether you're a social media manager, content creator, or marketing professional, this workflow helps you maintain consistent LinkedIn presence and scale content creation while keeping human oversight β€” all managed from a simple spreadsheet.

🎯 Use Case

Ideal for:

  • Content Marketers managing multiple LinkedIn accounts
  • Personal Brand Builders maintaining regular posting schedule
  • Agencies handling client social media presence
  • Teams requiring content approval workflows

Setup Instructions

1. Prepare the Spreadsheet

  • File name: Linkedin Post
  • Main sheet structure: | ID | Linkedin Post Title | Status | Image URL |
  • Groups sheet structure: | GroupIds |
  • Add post topics and set their Status as Pending

2. Configure Google Sheets Nodes

Connect your Google account to:

  • Linkedin-Post-Topic (Trigger node)
  • Update-Status
  • Get-Group-id

3. Add API Credentials

  • OpenAI API Key β†’ for GPT-4 content generation
  • Slack OAuth Token β†’ for approval messages
  • LinkedIn Access Token β†’ for posting content
  • HTTP Header Auth β†’ Bearer token for LinkedIn API

4. Configure Webhooks

  • Set up Slack Interactive Components webhook
  • Point Request URL to your N8N webhook endpoint
  • Enable interactive messages in Slack app

5. Activate the Workflow

Once live, the workflow will:

  1. Monitor spreadsheet for new topics every minute
  2. Generate LinkedIn post using GPT-4
  3. Send to Slack for approval/editing
  4. Upload image to LinkedIn
  5. Publish to profile and groups
  6. Update spreadsheet status to Posted

πŸ” Workflow Logic

  1. Trigger: New/updated row with Pending status
  2. Generate: AI creates engaging LinkedIn post
  3. Approve: Slack message for review/edit
  4. Process: Handle approval response
  5. Upload: Register and upload image
  6. Publish: Post to LinkedIn profile & groups
  7. Update: Mark as Posted in sheet

🧩 Node Descriptions

Node Name Description
Linkedin-Post-Topic Monitors spreadsheet for new post topics
Validate-Status Filters only 'Pending' items
Limit Processes one item at a time
Linedin-Post-Creator Generates post content using GPT-4
Format-Content Prepares content for Slack display
Approval-on-Slack Sends interactive approval message
Webhook Receives Slack button responses
Format-Response Extracts edited content from Slack
Set-Final-Message Prepares approved content
Linkedin-User-Detail Fetches LinkedIn user info
Register Image Initiates LinkedIn image upload
Upload Image Uploads image to LinkedIn
Linkedin-post Publishes to personal profile
Get-Group-id Retrieves LinkedIn group IDs
Post-Linkedin-Groups Posts to multiple groups
Update-Status Marks as completed in sheet

πŸ› οΈ Customization Tips

  • Adjust AI prompt for brand voice and hashtags
  • Change Slack approver or add multiple reviewers
  • Modify posting schedule with delay nodes
  • Add analytics tracking with additional API calls
  • Filter groups based on specific criteria
  • Include URL shortening for tracking

πŸ“’ Suggested Sticky Notes for Workflow

Node/Section Sticky Note Content
Linkedin-Post-Topic "Triggers every minute for new posts in your spreadsheet"
Validate-Status "Filters to process only 'Pending' items - prevents duplicates"
Linedin-Post-Creator "Uses GPT-4 to generate LinkedIn content - customize prompt for your brand voice"
Approval-on-Slack "Sends for human review - edit the Slack user to change approver"
Webhook "Receives approval responses - ensure URL is configured in Slack app"
Register Image "Initiates LinkedIn media upload - requires valid image URL from sheet"
Linkedin-post "Publishes to your profile - update with your LinkedIn credentials"
Post-Linkedin-Groups "Posts to multiple groups - add group IDs in Groups sheet"
Update-Status "Marks as 'Posted' to prevent reprocessing"

πŸ’‘ AI Prompt Configuration

The workflow uses a sophisticated prompt that:

  • Creates compelling hooks
  • Includes 3-4 informative paragraphs
  • Adds engagement questions
  • Inserts relevant emojis
  • Generates 4-6 hashtags
  • Formats with proper spacing

πŸ”’ Security & Permissions

LinkedIn App Requirements:

  • r_liteprofile - Read profile data
  • r_emailaddress - Access email
  • w_member_social - Post content
  • rw_organization_admin - Group posting

Slack Bot Permissions:

  • chat:write - Send messages
  • im:write - Direct messages
  • users:read - User information

πŸ“Ž Required Components

Component Purpose
Google Sheet Store post topics and status
LinkedIn App API access for posting
Slack App Interactive approval flow
OpenAI Account GPT-4 content generation
N8N Instance Workflow execution

πŸ§ͺ Testing Tips

  • Start with one test topic marked as Pending
  • Verify Slack message appears correctly
  • Test both "Approve" and "Edit" buttons
  • Check image upload completes
  • Confirm post appears on LinkedIn
  • Verify status updates to Posted

⚠️ Common Issues & Solutions

LinkedIn API Errors:

  • Token expiration β†’ Refresh access token
  • Rate limits β†’ Add delays between posts
  • Group restrictions β†’ Check posting permissions

Slack Integration:

  • Missing responses β†’ Verify webhook URL
  • Button not working β†’ Check interactive components
  • User not found β†’ Confirm Slack user ID

Image Upload Failures:

  • Invalid URL β†’ Validate image accessibility
  • Size limits β†’ Compress images under 10MB
  • Format issues β†’ Use JPEG or PNG only

πŸ“Š Workflow Benefits

  • Time Savings: 80% reduction in content publishing time
  • Consistency: Regular posting schedule maintained
  • Quality Control: Human review ensures brand standards
  • Scalability: Handle multiple accounts and groups
  • Flexibility: Easy to modify and extend

πŸ“Ž Required Files

File Name Purpose
Linkedin Post Google Sheet to hold post topics and status

🏷 Suggested Tags & Categories

  • #LinkedIn
  • #AI
  • #ContentAutomation
  • #SocialMedia
  • #Slack
  • #GPT4
  • #Marketing
  • #WorkflowAutomation

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 - Workflow Overview

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

Block 2 - Sheets Trigger Info

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

Block 3 - AI Generation

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

Block 4 - Slack Approval

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

Block 5 - Webhook Handler

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

Block 6 - Image Upload Process

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

Block 7 - LinkedIn Publishing

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

Block 8 - Status Update

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

Block 9 - Limit

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

Block 10 - Structured Output Parser

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

Block 11 - OpenAI Chat Model

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

Block 12 - Webhook

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

Block 13 - Linkedin-Post-Topic

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

Block 14 - Validate-Status

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 15 - Linedin-Post-Creator

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

Block 16 - Format-Content

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

Block 17 - Approval-on-Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 18 - Format-Response

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

Block 19 - Validate-Response

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 20 - Set-Final-Message

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

Block 21 - Linkedin-User-Detail

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

Block 22 - Linkedin-post

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

Block 23 - Get-Group-id

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 24 - Pick 1 by 1

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

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

3. Summary Table

Workflow LinkedIn post automation with AI (GPT-4o) generation & Slack approval
Complexity advanced
Nodes 32
Categories Social Media, Multimodal AI
Author Amit Mehta
Published 29 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4483/4483.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 LinkedIn post automation with AI (GPT-4o) generation & Slack approval do?

LinkedIn Post Automation with AI Generation (Gpt 4o) & Slack Approval How it Works This workflow automates the creation and publishing of LinkedIn posts with AI generated content and human approval...

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.