n8n integration
n8n has no dedicated NativPost node, but the generic HTTP Request node covers every endpoint. This guide sets up both directions.
One-time: store the API key as a credential
Section titled “One-time: store the API key as a credential”- In n8n, open Credentials → New → Header Auth.
- Name:
NativPost API. - Header name:
Authorization. - Header value:
Bearer npk_live_....
Reference this credential from every HTTP Request node instead of pasting the key inline.
Outbound: create content from a workflow
Section titled “Outbound: create content from a workflow”-
Add an HTTP Request node.
-
Configure:
-
Method:
POST -
URL:
https://app.nativpost.com/api/v1/content -
Authentication: Header Auth,
NativPost API -
Send Body: JSON, using expressions to pull fields from earlier nodes:
{"content_type": "text_only","platforms": ["x", "linkedin"],"body_text": "={{$json.text}}"}
-
-
Wire an upstream node (Airtable, Notion, Cron, whatever) into the HTTP node.
Inbound: receive events
Section titled “Inbound: receive events”-
Add a Webhook node. Set method
POSTand copy the production URL. -
In NativPost, subscribe:
Terminal window curl -X POST https://app.nativpost.com/api/v1/webhooks \-H "Authorization: Bearer $NATIVPOST_API_KEY" \-H "Content-Type: application/json" \-d '{"url": "https://your-n8n.example.com/webhook/nativpost","events": ["content.published", "campaign.launched"]}' -
Fire a test with
POST /webhooks/{id}/test. n8n receives the sample and lets you map fields for downstream nodes.
Signature verification
Section titled “Signature verification”Add a Function node right after the Webhook node with the Node.js verifier from Signature verification. Read the header from $json.headers["nativpost-signature"] and the raw body from $binary.data (enable Raw Body on the Webhook node first). Throw to abort the workflow on a bad signature.
Media uploads
Section titled “Media uploads”The HTTP Request node supports multipart/form-data:
- Body Content Type:
Form-Data Multipart - Add a field
fileof type File wired to the Binary property of an upstream node (for example the Read Binary File node).
Set the same Authorization header credential.