This guide assumes you already have an API key and at least one connected profile. If not, do the Quickstart first (5 minutes).
1. Store the API key as a credential
Keep the key out of your workflow JSON by saving it as a reusable credential.- In n8n open Credentials → New, and choose Header Auth.
- Set:
- Name —
Authorization - Value —
Bearer mdc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Name —
- Save it as, for example, MADIAD Hub.
2. Publish a text post
Add an HTTP Request node:
Body (JSON):
3. Make retries safe with an Idempotency-Key
If n8n retries a node (timeout, error path), you don’t want a duplicate post. Add a header whose value is stable for a given item — the Hub treats a repeat of the same key as the same request. Under Headers, add:
Use a value that is unique per intended post and constant across retries of that same post. Good choices: a UUID you generate once and write back to the row, or a hash of the content itself.
4. Publish photos or video
The endpoint ishttps://api.madiad.com/v1/posts/photos for images and https://api.madiad.com/v1/posts/video for a single video.
Photos — upload the file: set Send Body → Form-Data Multipart and add the fields as separate entries. Repeat platforms[] once per platform, and send the image as a binary field:
Photos — send a public URL instead: if the image already has a public
https:// link, skip file handling entirely. Set Send Body → JSON and pass the link in photo_urls[] — this is the simplest option for n8n since no binary node is needed:
video_url:
5. Handle the async response
A text or photo post to fast platforms usually returns"status": "completed" with per-platform results. Video is asynchronous — it returns "status": "processing" and a request_id. Two ways to get the final result:
Poll — add a Wait node, then an HTTP Request:
status is completed, partial, or failed.
Webhook (recommended) — instead of polling, receive a push. Add a Webhook node in n8n, copy its Production URL, and register it in your dashboard at hub.madiad.com/dashboard/webhooks for the post.completed event. The Hub signs every delivery with HMAC-SHA256 — verify the signature in a following node. See Webhooks.
6. Read per-platform results
A post can partially succeed — inspectresults per platform, not just the top-level status:
success with an IF node to route failures to a Slack/email alert.
7. Handle errors without retrying forever
n8n’s Retry On Fail treats any non-2xx as worth another attempt, which is wrong for most failures here. Branch on the HTTP status code instead — never on the wording of the message:
In the HTTP Request node, turn on Never Error (or set On Error to Continue using error
output) so you can read
$json.error.code and route on it, rather than letting the node abort the
run.
Example workflow: Google Sheets → all platforms
A common pattern — a content calendar in Google Sheets, auto-published when a row is marked ready:- Schedule Trigger (every 15 min) → Google Sheets (get rows where
status = ready). - HTTP Request →
POST /v1/posts/photoswithprofile_id,platforms[],captionfrom the row,Idempotency-Key= a UUID stored on the row (not the row number — see the warning above). - IF on the response → on success, Google Sheets update the row to
published; on failure, send an alert.
Next steps
Per-platform fields
Override captions, titles, and options per platform.
Scheduling
Let the Hub publish at a future time for you.
Idempotency
Safe retries from any automation.
Webhooks
Get a signed callback when a post finishes.

