Last Update:
Nov 30, 2026
AI

How to Build an Automated Social Media Content Workflow with n8n

How to Build an Automated Social Media Content Workflow with n8nHow to Build an Automated Social Media Content Workflow with n8n
Quick Summary
  • Use n8n to connect your social media content workflow, from idea generation to publishing, without manually moving content between tools.
  • Organize content ideas, generated posts, approval status, and publishing records in a central Google Sheets database.
  • Connect OpenAI to n8n to generate social media posts from content briefs, audience information, and brand voice instructions.
  • Add a human approval step before publishing. Review AI-generated content and approve or reject posts before they go live.
  • Connect LinkedIn to your n8n workflow to publish approved content and automatically update its publishing status.
  • Monitor workflow executions and publishing results to identify failed tasks, prevent duplicate posts, and keep your automation reliable.

How much time do you spend writing, reviewing, and publishing social media posts every week? If you manage several posts, you probably repeat the same tasks again and again. Finding ideas, writing captions, and publishing content can quickly fill your day.

You don't have to handle every step yourself. With AI and workflow automation, you can create a system that prepares posts, sends them for review, and publishes them after approval. This saves time without giving up control of your content.

In this guide, we'll build this system using n8n. We'll connect Google Sheets, OpenAI, and LinkedIn to automate the process from content ideas to published posts.

n8n social media content workflow showing content collection, OpenAI post generation, Supabase status tracking, review, publishing and regeneration

Why Social Media Content Workflow Integration Matters

Managing social media content involves more than writing and publishing posts. You need to collect ideas, create captions, review drafts, get approvals, and track published content. When these tasks happen across different tools, it's easy to lose track of updates, miss approvals, or publish the wrong version.

These tasks take up a big part of the week. Sprout Social's 2024 productivity report found that social media marketers spend more time on content creation and approvals, about 5 hours a week, than on any other task.

An integrated workflow connects these steps so you can manage the entire publishing process in one place. This is the core idea behind workflow automation: each step triggers the next one, so nothing waits on a person to copy it over. Here are some of the key benefits:

  • One place to manage content. Keep content ideas, generated posts, and publishing details in one place instead of switching between different documents.
  • Less manual work. Use AI to generate social media posts instead of writing every caption from scratch.
  • Easier content review. Send generated posts for approval before publishing them.
  • Clear publishing status. Track which posts are waiting for review, approved, rejected, or published.
  • Fewer missed steps. Connect content creation, approval, and publishing so each stage moves to the next automatically.
  • More control over publishing. Review and approve content before it's shared on your social media accounts.
Comparison of a manual social media workflow across five tools versus an automated n8n content workflow

Tools and Technologies Used

We'll use five tools to build this workflow. Each one handles a different part of the process, from content generation to final approval and publishing.

  1. n8n: Connects the tools and automates the entire workflow.
  2. OpenAI: Generates social media posts from content ideas and instructions.
  3. Supabase: Stores generated posts and tracks their approval and publishing status.
  4. OneSignal: Sends notifications when posts are ready for review.
  5. Flutter: Provides an interface where users can review, approve, or reject posts.
How the five tools connect through n8n.

Building the Automated Content Publishing Workflow

Now that we have the tools ready, it's time to connect them. We'll build the workflow step by step, starting with content collection and AI generation, then moving through review, approval, and publishing.

Each stage will handle a specific task and pass the required information to the next one.

Step 1: Collect and Prepare Content

n8n workflow collecting LinkedIn posts and a Medium article, merging them and building a data model for OpenAI

Collect and Prepare Content

Before generating new social media posts, we need to give the AI some content to work with. This includes existing social media posts and new articles. The existing posts help maintain the writing style, while new articles provide topics and information for fresh content.

In n8n, we'll collect both sources and combine them into a single data object using the Merge node. This keeps the information together instead of passing separate pieces of content to the AI model.

For example, the combined data could look like this:

{

  "existing_posts": [

    "Example of a previously published post...",

    "Another post showing the preferred writing style..."

  ],

  "new_article": {

    "title": "How AI Is Changing SaaS Products",

    "url": "https://example.com/ai-saas",

    "content": "Article content or extracted key information..."

  }

}

This gives OpenAI two useful references: how previous posts were written and what the new content should cover. We can pass this combined object directly to the next node for post generation.

Generate Social Media Posts Using OpenAI

Now comes the interesting part: turning all that collected content into social media posts. Instead of writing each post manually, we'll let OpenAI handle the first draft. But we don't want it to generate random captions. We want posts that match our existing writing style and cover the right information. Connecting OpenAI to n8n like this is a simple form of AI integration, where an AI model plugs into a workflow you already run.

Most social media teams already work this way. Metricool's 2025 State of AI in Social Media report found that 96% of social media professionals use AI tools, and 65% use AI for at least half of their posts.

To do that, we'll give OpenAI three things:

Input Purpose
Source content Gives AI the topic and information to write about
Existing social media posts Shows how we usually write and structure our posts
Writing instructions Sets the tone, length, format, and other writing rules

Think of existing posts as writing examples for the AI. They show it what our content usually sounds like, while the source articles tell it what to write about. This way, we can create fresh posts without losing the writing style we've already established.

n8n workflow sending source content, existing posts and writing instructions to OpenAI to generate a social media post draft

Set up the content generation prompt: Open the OpenAI node in n8n and add a prompt that brings all three inputs together. Here's a simple example we can start with:

You are a social media content writer.

Your task is to create a new social media post

using the source content provided below.

SOURCE CONTENT:

{{Source Content}}

EXISTING POSTS:

{{Writing References}}

WRITING INSTRUCTIONS:

- Follow the tone and writing style of the examples.

- Use simple and natural language.

- Start with an engaging opening.

- Focus on the main idea from the source.

- Avoid copying existing posts.

- Keep the post relevant to the target audience.

- End with a suitable call to action when appropriate.

Return the generated post as plain text.

The placeholders will pull information from the previous nodes in our workflow. This means we don't have to copy the source content or write examples into the prompt every time. n8n passes them to OpenAI automatically.

n8n OpenAI node settings with input data, a system message, a user prompt using expressions, and the generated post output

Run the node and check the result. Does the post cover the right information? Does it sound like the examples we provided? If the output misses the mark, we can adjust the prompt before moving forward.

Once we're happy with the generated posts, we'll send them to the approval stage.

Generate Social Media Posts Using OpenAI

As we've collected the existing posts and new articles, we can use OpenAI to create fresh social media content. The idea is to let AI handle the writing without losing the style of previously published posts.

We'll pass the combined data from the previous step to OpenAI. This includes existing posts that show our usual writing style and a new article that provides the topic and information for the next post.

The prompt tells OpenAI how to use this information. It should treat existing posts as writing examples, not content to copy. It should then use the new article to create a fresh post that follows the same tone and writing style.

Once OpenAI generates the post, n8n passes the result to the next part of the workflow. At the same time, the post status is updated in Supabase so we can track it through the approval process.

Save Generated Posts and Track Their Status

Once OpenAI generates a post, we need to save it before sending it for approval. For this, we'll use Supabase as our database. It stores the generated content and keeps track of its current status, so we can manage each post throughout the publishing process.

We'll save three main details for each post:

  • Post ID: A unique ID to identify and track the post.
  • Post content: The text generated by OpenAI.
  • Active status: Shows the current state of the post as it moves through the workflow.
n8n workflow saving a generated post to a Supabase posts table with post ID, content and status columns

The workflow also updates the post status in Supabase as it moves through the next stages. This makes it easier to see which posts are ready for review and which ones have been approved or rejected. The Flutter app can then display the post and its status for users to review.

Post status lifecycle: pending, in review, approved, published, rejected, regenerating and publish failed

Send Content for Review and Approval

AI-generated content isn't always ready to publish. A post might need a small edit, a different opening, or another attempt before it's ready to share. That's why we'll add a review step before publishing anything.

This matches how most teams handle AI content. In an Ahrefs survey of 879 marketers, 97% said they edit and review AI content before publishing, and only 4% publish it as is.

Once a new post is saved in Supabase, the workflow sends a notification through OneSignal to the Flutter app. Users can open the app to view the generated post, its ID, and its current status. This gives them a place to check the content before deciding what happens next.

Flutter app review screen with a OneSignal notification, post ID, in review status, post text, and approve and reject buttons

From the app, users can approve or reject the post:

  • Approve: The post moves to the publishing stage and is shared on the connected social media platforms.
  • Reject: The content goes back to OpenAI to generate a new version, which is then submitted for review again.

This keeps AI responsible for preparing the content while users make the final decision about what gets published.

Publish Approved Posts Across Social Platforms

Once a post is approved, it's ready to publish. We can use n8n to send the approved content to the connected social media platforms instead of copying and publishing each post manually.

Doing this by hand adds up quickly. Sprout Social's posting data shows brands published an average of 9.5 posts per day across their social networks in 2024.

n8n workflow publishing an approved post to LinkedIn, X and Facebook, then saving the post URLs in Supabase

The workflow checks the post's approval status and uses the approved content for publishing. It then sends the post to the connected platforms through their respective publishing integrations. This allows you to share the same content across multiple channels from one workflow.

After publishing, the workflow should update the post record in Supabase. You can store its publishing status and the returned post URL, making it easier to check which posts have gone live.

This way, you only need to review and approve the content. n8n handles the publishing process across your connected social accounts.

Regenerate Rejected Posts Using AI

Not every AI-generated post will be ready to publish on the first try. Sometimes the content needs a different opening, a clearer message, or a better fit for the audience. Instead of starting over manually, we can send rejected posts back to OpenAI for another version.

When a user rejects a post in the Flutter app, its status is updated in Supabase. The status change triggers the n8n workflow, which sends the post back to OpenAI for regeneration. The model creates a revised version using the original content and writing references.

n8n workflow that regenerates a rejected post with OpenAI, updates Supabase and notifies the reviewer again

Once the new version is ready, it's saved back to Supabase and sent to the Flutter app for another review. Users can check the updated post and approve or reject it again.

This creates a repeatable review process. AI handles the revisions, while users decide which version is ready to publish.

Setting Up Real-Time Notifications with Supabase and n8n

Users shouldn't have to keep checking the app to see if a new post is ready. We can automate that with Supabase, n8n, and OneSignal.

Supabase uses database triggers and functions to detect changes in the post status. Supabase calls this setup Database Webhooks, and they can fire on insert, update or delete events. When a status changes, a database trigger runs a function that sends a POST request to an n8n webhook. The webhook receives the update and starts the notification workflow.

From there, n8n uses OneSignal to send a notification to the Flutter app. Users can open the app and check the updated post without waiting for someone to notify them manually.

The notification process follows this flow:

Notification flow from a Supabase status change through a database trigger and n8n webhook to a OneSignal push in the Flutter app

The same process runs whenever the post status changes. This keeps users informed when content is ready for review or when an existing post receives an update.

Connecting Supabase to a Local n8n Webhook

There's one problem when running n8n on your computer: Supabase can't send requests directly to your localhost webhook. Your local n8n instance is only accessible from your own machine, not from external services.

ngrok tunnel forwarding Supabase POST requests to a local n8n webhook on localhost port 5678

To fix this, we'll use ngrok. It creates a public HTTPS URL and forwards incoming requests to your local n8n instance. This allows Supabase to reach the webhook even when n8n is running locally.

Set up ngrok to expose your local n8n instance

  1. Install ngrok and sign in to your account.
  2. Start your local n8n instance.
  3. Open a terminal and run the following command (assuming n8n uses its default port):

ngrok http 5678


  1. Ngrok will generate a public HTTPS URL, such as:

https://your-subdomain.ngrok-free.app


  1. Copy this URL and add your n8n webhook path to it. Use the complete address in your Supabase function instead of the localhost URL.

For example:

https://your-subdomain.ngrok-free.app/webhook/your-webhook-path

Now, when Supabase detects a database update, it can send a POST request to this public address. Ngrok forwards the request to your local n8n webhook, which starts the workflow.

This connects your local automation with Supabase without needing to host n8n on a public server.

Testing and Debugging the Workflow

Now that all the components are connected, it's time to test the complete workflow. We need to make sure content moves through each stage correctly, from AI generation to final publishing.

Start by adding a new content entry and running the workflow. Check whether OpenAI generates the post, Supabase saves it, and OneSignal sends a notification to the Flutter app. Then test both approval and rejection to make sure each action triggers the correct process.

If something doesn't work, open the Executions tab in n8n. It shows how each workflow run performed and helps you find the node where an error occurred. Select a failed execution to inspect its input, output, and error message. You can also use the Debug in editor option to load the previous execution data and investigate the problem.

n8n Executions tab showing a failed LinkedIn node with a 401 authorization error and the Debug in editor button

For easier debugging, you can also use n8n Data Tables to store useful test records and track workflow results. Once each stage works as expected, run the workflow again from beginning to end and confirm that approved posts are published and their status is updated in Supabase.

Need Help Integrating Your Social Media Workflow?

Setting up social media automation can feel overwhelming, especially when you need to connect multiple tools and manage the entire process. You don't have to figure everything out yourself.

Orbix Studio's AI integration services can help you connect your social media content workflow with your website and existing tools.

Here's how it works:

  1. Tell us what you need: Share how you currently create, manage, and publish social media content.
  2. We'll plan the integration: We'll identify the right tools and workflow for your requirements.
  3. We'll build and connect everything: Our team will handle the setup, integrations, and testing.
  4. Start managing your content: Get a connected workflow that reduces manual work and makes content publishing easier.

Want to automate your social media workflow without handling the technical setup Contact Orbix Studio to discuss your project.

Frequently Asked Questions

How do you prevent duplicate social media posts?

Prevent duplicate posts by giving each logical delivery its own ID and never retrying a timed-out request blindly. Mark it Unresolved, check the platform's status or the account's recent posts, and retry only after confirming the post doesn't exist. Store the platform's post ID as soon as you receive it, so every tool can see the delivery is complete.

What should a social media dashboard include?

A social media dashboard should show one row per destination with three separate states: approval, delivery and account connection. Add the approved version number, the time of the last status check, filters for items that need action, and a recovery button that matches the cause, such as Reconnect account or Check status.

How can AI improve social media workflows?

AI can speed up first drafts, channel-specific variations, content repurposing, tagging and performance summaries. It works best as a drafting and recommendation tool whose output goes through the same review and approval stage as human work. Keep publishing authorization with a named person or written rule, and mark AI-assisted drafts for fact checks.

Which social media integration tools should you use?

Start with the management tool your team already uses, such as Metricool, Planable or Sendible, and add Zapier, n8n or Zoho Flow to connect other apps. Choose custom software only when the workflow is your product or your approval, reconciliation and client-separation rules go beyond what existing tools support.

Is social media integration secure?

It can be, if access is controlled. Connect accounts through OAuth 2.0 instead of shared passwords, request the minimum scopes, store tokens server-side and remove access when people leave. RFC 9700 describes current OAuth security practice, including PKCE and refresh token protection. Review connected apps regularly and revoke unused ones.

Final Thoughts

Building a social media content workflow with n8n helps you manage more than just publishing. You can connect content collection, AI writing, post approval, and publishing in one system. This reduces repetitive work and makes it easier to track every post from its first draft to publication.

Start with a simple workflow and test each part before adding more features. Once everything works, you can connect additional social platforms, improve your AI prompts, or add performance tracking. Keep human approval in the process so you can review content before it goes live.

Orbix Studio
Shohanur Rahman
Founder & CEO
As the Founder and CEO of Orbix Studio, Shohanur Rahman brings over ten years of experience in UI/UX and product strategy. He is adept at aiding SaaS and AI startups in their growth journeys. His articles provide practical guidance for both founders and product designers.