We use cookies to understand how you use our site and improve your experience. Privacy Policy

Back to Blog
Automation Workflows

Auto-Publish to Social Media with n8n

n8n
n8n Resources Team
July 23, 2026

Ready to automate?

Browse 5,600+ copy-paste n8n workflow templates.

Managing social media across four or five platforms is one of those tasks that compounds faster than it looks. A single piece of content needs a reformatted caption for LinkedIn, a different crop for Instagram, a shorter version for X, and vertical video for TikTok. Done manually, distributing one post takes 20 to 30 minutes. A team publishing 10 pieces per week spends close to a full workday on distribution alone.

The problem is structural: social publishing is repetitive, time-triggered, and follows the same payload format every time. Each platform has a documented API. The data lives in a spreadsheet. This is exactly the kind of task n8n handles well.

This guide covers building a workflow that reads from a Google Sheets content calendar, publishes to all configured platforms via Upload-Post's API in a single call, and logs the result back to the sheet automatically.

What You Will Build

The workflow has four stages:

  • Pull — a schedule trigger reads today's pending posts from Google Sheets
  • Prepare — the row data is mapped to the Upload-Post API payload format
  • Publish — one API call distributes the content to every configured platform
  • Log — the result is written back to the sheet as "Published" or "Error"

Once the workflow is running, publishing becomes a byproduct of maintaining a spreadsheet. Writers add rows; n8n handles the rest each morning.

Setting Up the Content Calendar

Before building in n8n, set up a Google Sheet with these columns:

  • Date — publish date in YYYY-MM-DD format
  • Caption — the post text (used as caption or overlay text depending on platform)
  • Media URL — a public URL to the image or video file; leave blank for text-only posts
  • Platforms — comma-separated list of target platforms: linkedin,x,instagram,tiktok
  • StatusScheduled, Published, or Error
  • Published At — timestamp, filled in by the workflow

This sheet becomes your editorial calendar. Your team plans content by adding rows. The workflow checks the sheet each morning and publishes everything due that day.

Example n8n Workflow

Step 1: Schedule Trigger Node

Add a Schedule Trigger node and set it to run daily at 09:00 AM in your timezone. This fires the workflow automatically every morning without any manual input.

Step 2: Google Sheets Node (Read)

Add a Google Sheets node in read mode. Connect it to your content calendar sheet. Configure the node to filter rows where the Date column equals today ({{ $now.toFormat('yyyy-MM-dd') }}) and Status equals Scheduled.

Set the output mode to "Return All Rows" — the workflow will process multiple posts in a single run.

Step 3: IF Node (Empty Check)

Add an IF node after the Sheets read to check whether any rows were returned ({{ $input.all().length > 0 }}). If the condition is false, the workflow exits cleanly without errors or notifications.

Step 4: Split in Batches Node

Add a Split in Batches node to process each row one at a time. This ensures a failed post on one platform does not block the remaining items in the batch.

Step 5: Set Node (Payload Mapping)

Add a Set node to map the spreadsheet columns to the Upload-Post API payload:

  • caption{{ $json.Caption }}
  • media_url{{ $json['Media URL'] }}
  • platforms{{ $json.Platforms.split(',') }}

The platforms field accepts an array of strings. Upload-Post recognizes linkedin, x, instagram, tiktok, facebook, and pinterest as valid identifiers.

Step 6: HTTP Request Node (Upload-Post API)

Add an HTTP Request node with the following configuration:

  • Method: POST
  • URL: https://upload-post.com/api/v1/post
  • Authentication: Header Auth — pass your Upload-Post API key as X-API-Key
  • Body: JSON, using the mapped fields from Step 5

Upload-Post handles platform-specific formatting internally: aspect ratio normalization, character limits, video transcoding, and rate limiting. A single request publishes to every platform in the array.

Step 7: IF Node (Success vs. Error)

Add an IF node that checks the HTTP Response Code from Step 6. Route 2xx responses to the success path and everything else to the error path.

Step 8: Google Sheets Node (Update Row)

On each path, add a Google Sheets node in update mode. Write back to the matching row:

  • StatusPublished (success path) or Error (error path)
  • Published At{{ $now.toISO() }}

On the error path, also write the response body to an Error Detail column so you can diagnose failures without digging through n8n logs.

Step 9 (Optional): Slack Node

Add a Slack node on the success path to send a summary to your team channel: "Published [N] posts at [time]." Useful for agencies or teams where multiple people need visibility on publishing status.

Adding AI-Generated Images

For content that does not include a pre-made visual, insert a Creatomate step between the Set node and the HTTP Request. Creatomate accepts a JSON template and a set of text variables and returns a rendered image URL.

Pass the Creatomate output URL into the media_url field before the HTTP Request fires. This works well for recurring formats — weekly stats, product quotes, or promotional cards — where the layout is fixed but the copy changes each post.

Platform-Specific Considerations

Upload-Post normalizes most formatting differences, but a few rules apply at the content level:

X (Twitter): Captions longer than 280 characters are truncated. If your captions run long, add a separate X Caption column to the sheet and map it to a shorter version of the text.

TikTok: Video is required. Text-only posts are not supported. Add an IF node before the Set node that removes tiktok from the platforms array when the Media URL column is empty.

LinkedIn: Link previews render automatically from the first URL in the caption. You do not need to pass a separate link field — Upload-Post picks it up from the caption text.

Managing Multiple Accounts

Upload-Post supports multiple connected accounts per platform. If you manage several brands or clients, add an Account ID column to the spreadsheet and pass it as a parameter in the HTTP Request payload. Each row can target a different set of connected accounts without any changes to the workflow structure.

Why This Workflow Scales

The value compounds with volume. A solo creator posting daily saves two to three hours per week. An agency managing 10 clients eliminates the equivalent of a part-time headcount in distribution work. The content calendar stays as the single source of truth — no app-switching, no missed posts, no status meetings about whether content went out.

Error logging directly in the spreadsheet means anyone on the team can see what published and what did not without access to n8n.

Pre-built variations of this workflow — including versions with Creatomate image generation and multi-account support — are available at n8nresources.dev/templates. For teams building broader automation stacks, the library also covers AI agent workflows, CRM pipelines, and reporting. Subscribe to get new workflow templates each week.

Enjoyed this article?

Share it with others who might find it useful