How-to Guide

How to Automate Social Media Posting with n8n

Quick Answer: A verified n8n REST workflow uses four stages: trigger, request a DOHOO presigned upload URL, PUT the binary file to S3, then call a documented platform publish endpoint with the returned fileId. To publish later, place an n8n Wait node before the immediate publish call or use the platform-specific DOHOO MCP schedule tool.

Do not put an MCP tool name such as upload_from_url into an HTTP Request node and expect it to become a URL. REST endpoints and MCP tools are different interfaces.

The REST Workflow

  1. Trigger: Schedule Trigger, Webhook, Google Drive, Airtable, or another source.
  2. Presigned slot: POST https://dohoo.ai/api/upload/presigned-url with filename and contentType.
  3. Binary upload: PUT the original file bytes to the returned uploadUrl with the same content type.
  4. Publish: call the documented platform endpoint with fileId and the correct connection ID.

Credentials

Create a reusable Header Auth credential in n8n:

Header name: X-API-Key
Header value: dh_live_xxxxxxxxxxxxxxxxxxxxxxxx

Apply it to DOHOO requests, but not to the presigned S3 PUT. The signed upload URL authenticates that request by itself.

Node Configuration

{
  "method": "POST",
  "url": "https://dohoo.ai/api/upload/presigned-url",
  "sendHeaders": true,
  "sendBody": true,
  "jsonBody": {
    "filename": "={{ $binary.data.fileName }}",
    "contentType": "={{ $binary.data.mimeType }}"
  }
}

After the PUT node, poll /api/upload/status/{fileId} for large videos. Then publish, for example, to Instagram:

{
  "method": "POST",
  "url": "https://dohoo.ai/api/v2/instagram/publish",
  "jsonBody": {
    "connectionId": "={{ $json.instagramConnectionId }}",
    "fileId": "={{ $json.fileId }}",
    "caption": "={{ $json.caption }}"
  }
}

Two Valid Scheduling Patterns

  • Pure REST: let n8n wait until the target time and then call the immediate publish endpoint.
  • MCP: use an MCP-capable node or agent and invoke the platform-specific schedule tool with scheduledAt and timezone.

Do not invent a REST /schedule URL unless it appears in the public reference.

Failure Handling

Use separate branches for upload, processing, and platform publication. Store HTTP status, response body, connection ID, and source record ID. Send a Slack or Telegram alert only after you have captured enough information to retry safely without creating duplicates.

FAQ

Cloud or self-hosted n8n?

Both work. The workflow uses standard HTTP Request, Wait, and source-system nodes.

Which DOHOO plan is required?

REST API and MCP access require Business or Agency.

Can one workflow publish to several platforms?

Yes. Reuse the uploaded media reference and branch into the relevant platform calls. Handle each result independently.

How do I avoid duplicate retries?

Store the returned post ID or workflow state and retry only the failed destination. Use a stable source-record identifier in your audit table.

Publish to all 8 platforms in one step — no silent failures.

View DOHOO plans