How-tos

n8n Social Media Automation with OmniSocials

Learn how to connect n8n to the OmniSocials API and automate posting to 13 social platforms from a single workflow node.

Robert LigthartFounder of OmniSocialsPublished Updated 12 min read
n8n Social Media Automation with OmniSocials

Building an n8n workflow that posts to social media sounds simple until you realize each platform has its own OAuth flow, its own rate limits, and its own idea of what a valid API request looks like.

On this page
  1. What is n8n social media automation?
  2. Step 1: Get Your OmniSocials API Key
  3. Step 2: Set Up the HTTP Request Node
  4. Step 3: Add Media (Optional)
  5. Step 4: Handle the Response
  6. A Complete n8n Workflow Example
  7. JavaScript and Python Reference
  8. Common Pitfalls
  9. Frequently Asked Questions
  10. Sources

Instagram requires a Facebook Business Manager account, a Meta app, an approved permissions review, and at minimum three separate API calls to publish a single photo. LinkedIn uses a different auth model entirely. TikTok requires a separate developer registration and has its own app approval process. By the time you have all of that wired up in n8n, you have a workflow that is brittle, hard to maintain, and breaks every time a platform changes its API.

The OmniSocials API solves this. One endpoint, one API key, 13 platforms. You connect your social accounts once in the OmniSocials dashboard. After that, every post goes through a single POST /v1/posts request from your n8n workflow. That is the integration this tutorial covers.

What is n8n social media automation?

n8n social media automation is the practice of using n8n's workflow engine to trigger, prepare, and publish social content programmatically. Instead of manually posting each piece of content, you build a workflow that handles everything: pulling content from a CMS, formatting it per platform, publishing through an API, and logging the result. With the OmniSocials API, a single HTTP Request node covers all 13 platforms in one step.

[Screenshot: n8n workflow with Schedule Trigger → HTTP Request (OmniSocials) → IF node for error handling]

Step 1: Get Your OmniSocials API Key

Log into your OmniSocials dashboard and navigate to Settings > API. Click "Generate API Key" and copy the key immediately. You won't be able to view it again after closing the modal.

If you do not have an account yet, the 14-day free trial includes full API access.

Keep the key in n8n's credential store, not hardcoded in a node. In n8n, create a new Header Auth credential:

  • Name: Authorization
  • Value: Bearer YOUR_API_KEY

This credential will be reused across every OmniSocials HTTP Request node in your workflows.

Step 2: Set Up the HTTP Request Node

In your n8n workflow, add an HTTP Request node and configure it as follows:

Method: POST URL: https://api.omnisocials.com/v1/posts Authentication: Header Auth (select the credential you created above) Body Content Type: JSON

Set the body to:

{
  "content": "{{ $json.caption }}",
  "accounts": ["instagram", "linkedin", "bluesky"],
  "schedule_at": "{{ $json.publish_time }}"
}

The content and schedule_at fields are mapped from upstream nodes (a CMS trigger, a spreadsheet row, a form submission, anything). The accounts array is where you list every platform you want the post to reach: bare platform names like instagram, linkedin, x (not twitter) or linkedin_page, or the account ids from GET /v1/accounts. You can hardcode it or make it dynamic based on workflow input. schedule_at must be an ISO 8601 time in the future.

Leave out schedule_at and the post is saved as a draft, it does not publish. To publish immediately, send the same body to https://api.omnisocials.com/v1/posts/create-and-publish (or add "publish_now": true).

[Screenshot: n8n HTTP Request node configured with OmniSocials endpoint and JSON body]

Step 3: Add Media (Optional)

If your images or videos already sit at a public URL, pass them in media_urls and OmniSocials downloads them for you. If your workflow holds the file itself (binary data), upload it to OmniSocials first using the /v1/media/upload endpoint. The response gives you a media ID you pass into the post body.

Add a second HTTP Request node before your post node:

Method: POST URL: https://api.omnisocials.com/v1/media/upload Body Content Type: Form Data Field: file pointing to your binary input

The response (HTTP 201) looks like:

{
  "data": {
    "id": "5821",
    "url": "https://cdn.omnisocials.com/...",
    "type": "image"
  }
}

Pass {{ $json.data.id }} into the media array of your post request (media takes media IDs, media_urls takes public URLs):

{
  "content": "{{ $json.caption }}",
  "media": ["{{ $node['Upload Media'].json.data.id }}"],
  "accounts": ["instagram", "tiktok", "facebook"],
  "schedule_at": "{{ $json.publish_time }}"
}

OmniSocials automatically resizes and reformats the media to meet each platform's specifications. You upload once.

Step 4: Handle the Response

A successful post request returns HTTP 201 with a body like:

{
  "data": {
    "id": "1024",
    "status": "scheduled",
    "type": "post",
    "content": { "default": "Your caption" },
    "schedule_at": "2027-03-02T09:00:00.000Z",
    "app_url": "https://app.omnisocials.com/create-post/1024",
    "published_urls": {},
    "errors": null
  }
}

Add an IF node after the HTTP Request node. Set the condition: {{ $json.data.status }} equals scheduled (or posting for posts sent to /create-and-publish). Route the true branch to a success handler (log to Airtable, send a Slack message, update a spreadsheet row). Route the false branch to an error handler. A rejected request (bad field, platform not connected) comes back as a 4xx with an error object, so turn on the node's "Continue On Fail" option or use an error workflow to catch it.

The per-platform outcome only exists after the post publishes. A post can succeed on LinkedIn but fail on Instagram if the connected account has expired credentials: its status then becomes warning and errors lists the failed platforms. Read it with GET /v1/posts/{id}, or subscribe a webhook to post.published and post.failed, whose payload carries a targets array with each platform's status.

A Complete n8n Workflow Example

Here is the full workflow structure for a content pipeline that reads from a Google Sheet and publishes on a schedule:

Schedule Trigger (every weekday at 9am UTC)
  → Google Sheets (read next unpublished row)
  → IF node (check if row exists)
    → TRUE: HTTP Request (OmniSocials /v1/posts)
      → IF node (check response status)
        → SUCCESS: Google Sheets (mark row as published)
        → FAILURE: Slack (alert team)
    → FALSE: No operation (workflow ends)

The OmniSocials HTTP Request node in this workflow sends:

{
  "content": "{{ $json['Caption'] }}",
  "media_urls": ["{{ $json['Image URL'] }}"],
  "accounts": ["instagram", "linkedin", "x", "bluesky"],
  "schedule_at": "{{ $json['Publish Time'] }}"
}

Five nodes. Thirteen platforms. That is the whole integration.

For comparison: building this workflow with native platform APIs would require separate credential stores, separate HTTP Request nodes, and separate error handling for Instagram, LinkedIn, Twitter, and Bluesky individually. The OmniSocials approach cuts that to a single node and a single credential.

JavaScript and Python Reference

If you are using n8n's Code node to build the request dynamically, here are reference implementations:

JavaScript (n8n Code node)

const caption = $input.first().json.caption;
const publishTime = $input.first().json.publish_time;
const imageUrl = $input.first().json.image_url;

const response = await fetch('https://api.omnisocials.com/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${$env.OMNISOCIALS_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    content: caption,
    ...(imageUrl ? { media_urls: [imageUrl] } : {}),
    accounts: ['instagram', 'linkedin', 'bluesky', 'x'],
    schedule_at: publishTime,
  }),
});

const body = await response.json();
if (!response.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
return [{ json: body.data }];

Python (for n8n self-hosted with Python nodes or external scripts)

import requests
import os

def publish_post(caption, accounts, image_url=None, schedule_at=None):
    payload = {
        'content': caption,
        'accounts': accounts,  # e.g. ['instagram', 'linkedin', 'x']
    }
    if image_url:
        payload['media_urls'] = [image_url]
    if schedule_at:
        payload['schedule_at'] = schedule_at  # without it the post is saved as a draft

    response = requests.post(
        'https://api.omnisocials.com/v1/posts',
        headers={'Authorization': f"Bearer {os.environ['OMNISOCIALS_API_KEY']}"},
        json=payload
    )
    response.raise_for_status()
    return response.json()['data']

The full API reference is at docs.omnisocials.com.

Common Pitfalls

Hardcoding the API key in the node body. Always use n8n's credential store or environment variables. Keys embedded in workflow JSON get exported accidentally and are visible to anyone with workflow view access.

Using schedule_at in local time without an offset. The OmniSocials API takes an ISO 8601 timestamp, in UTC (ending in Z) or with an explicit offset. If your n8n instance or data source is in a local timezone, convert before passing the value. new Date(localTime).toISOString() handles this in the Code node.

Posting to platforms with disconnected accounts. If a platform isn't connected to the workspace, the request fails with HTTP 400 and the code platform_not_connected, and no post is created. If the account is connected but its token has expired, the post is created and that platform fails at publish time: the post's status becomes warning (some platforms failed) or failed (all failed), and errors names the platform. Check the publish outcome, not just the create response.

Not handling rate limits. The OmniSocials API allows 100 requests per minute per API key. There is no bulk endpoint, so a bulk content pipeline sends one POST /v1/posts per post: add a Wait node between batches, and on HTTP 429 wait for the Retry-After seconds before retrying.

Putting a public URL in the media field. media takes media IDs from /v1/media/upload. A public image or video URL goes in media_urls instead, and OmniSocials downloads and checks the file before it hits each platform.

Frequently Asked Questions

Does n8n have a built-in social media node?

n8n has native nodes for Twitter/X and a few other platforms, but coverage is limited and each requires its own OAuth setup. Using the OmniSocials API via an HTTP Request node gives you 13 platforms from a single, consistent integration that takes about 5 minutes to configure.

Can I use n8n to schedule social media posts?

Yes. Combine n8n's Schedule Trigger node with an HTTP Request node pointing to the OmniSocials API. Pass a schedule_at timestamp in the request body to queue the post for a future time. OmniSocials handles the actual delivery at the specified UTC time.

Is the OmniSocials API free to use?

API access is included in every OmniSocials plan, which starts at $10/mo (annual). There is no separate API pricing tier. The 14-day free trial also includes API access, so you can test the n8n integration before paying anything.

What social platforms can I post to through the OmniSocials API?

The OmniSocials API supports Instagram, Facebook, LinkedIn, YouTube, TikTok, X (Twitter), Pinterest, Bluesky, Threads, Mastodon, Google Business Profile, Telegram, and Discord. All 13 platforms use the same endpoint and the same authentication.

How do I handle errors from the OmniSocials API in n8n?

Add an Error Trigger node or use n8n's built-in error workflow feature. The OmniSocials API returns standard HTTP status codes and a JSON error body shaped like { "error": { "code": "validation_error", "message": "..." } }. You can route on the HTTP status code or parse the response body in an IF node to handle specific failure cases.


The full API reference, including webhook setup and media uploads, is at docs.omnisocials.com. OmniSocials starts at $10/mo and the 14-day free trial includes API access. For n8n social media automation, it is the fastest path from "I need to post to 5 platforms" to a working workflow.


Sources

Written byRobert LigthartFounder of OmniSocials

Try OmniSocials for 14 days

Plan, schedule and answer on 13 platforms from one calendar, or let your AI agent do it. The first charge comes when the trial ends.