n8n Integration

Automate social media posting with n8n workflows. Replace complex multi-platform automation with a single API call.

Setup

  1. Add an HTTP Request node in n8n
  2. Set the URL to https://api.socialsyncerapi.com/v1/posts
  3. Add header: Authorization: Bearer sk_your_api_key
  4. Set method to POST

Basic Post Workflow

// HTTP Request node configuration
{
  "method": "POST",
  "url": "https://api.socialsyncerapi.com/v1/posts",
  "headers": {
    "Authorization": "Bearer sk_your_api_key",
    "Content-Type": "application/json"
  },
  "body": {
    "content": "={{ $json.content }}",
    "platforms": [
      {"platform": "instagram", "accountId": "ig_123"},
      {"platform": "twitter", "accountId": "tw_456"}
    ],
    "publishNow": true
  }
}

Schedule Posts

Use n8n's Schedule Trigger to post at specific times:

// Schedule Trigger → HTTP Request
{
  "schedule": "0 10 * * 1-5",  // Weekdays at 10am
  "workflow": [
    {
      "node": "HTTP Request",
      "config": {
        "method": "POST",
        "url": "https://api.socialsyncerapi.com/v1/posts",
        "body": {
          "content": "Good morning! Here's your daily tip...",
          "platforms": [
            {"platform": "instagram", "accountId": "ig_123"},
            {"platform": "threads", "accountId": "th_789"}
          ],
          "publishNow": true
        }
      }
    }
  ]
}

RSS to Social Media

Automatically post new blog articles to social media:

// RSS Feed Trigger → Set → HTTP Request
// 1. RSS Feed Trigger: watch your blog feed
// 2. Set node: format the content
{
  "content": "New blog post: {{ $json.title }}\n\n{{ $json.link }}",
  "platforms": [
    {"platform": "twitter", "accountId": "tw_456"},
    {"platform": "threads", "accountId": "th_789"}
  ]
}
// 3. HTTP Request: POST to SocialSyncerAPI

AI Content Pipeline

Generate content with AI and post automatically:

// Schedule → AI Agent → SocialSyncerAPI
// 1. Schedule: daily at 9am
// 2. AI Agent: generate a social media post about your topic
// 3. HTTP Request: POST to SocialSyncerAPI with the AI-generated content

{
  "content": "={{ $json.aiGeneratedContent }}",
  "mediaItems": [
    {"type": "image", "url": "={{ $json.imageUrl }}"}
  ],
  "platforms": [
    {"platform": "instagram", "accountId": "ig_123"},
    {"platform": "facebook", "accountId": "fb_456"},
    {"platform": "twitter", "accountId": "tw_789"}
  ],
  "publishNow": true
}

Error Handling

Add an IF node after the HTTP Request to handle failures:

// HTTP Request → IF → Retry
// IF condition: {{ $json.status }} === "partial" || {{ $json.status }} === "failed"
// Retry: POST /v1/posts/{{ $json.id }}/retry

Webhooks

Receive post status updates via webhooks:

  1. Add a Webhook node in n8n
  2. Copy the webhook URL
  3. Configure SocialSyncerAPI: POST /v1/webhooks/settings
  4. Events: post.published, post.failed

Common Workflows

Replacing Multi-Platform Workflows

Before SocialSyncerAPI, you needed separate nodes for each platform:

// OLD: 5 HTTP Request nodes, 5 OAuth setups, 5 error handlers
Instagram API → Instagram
Facebook API → Facebook
Threads API → Threads
TikTok API → TikTok
Twitter API → Twitter

// NEW: 1 HTTP Request node
SocialSyncerAPI → Instagram + Facebook + Threads + TikTok + Twitter