company logo

Help center

Go to K3X
All collectionsIntegrationsConnect K3X with n8n.io

Connect K3X with n8n.io

Plug K3X into n8n workflows — cloud or self-hosted — with the Webhook node and HTTP Request node.

n8n is open-source workflow automation. If you're running it on n8n Cloud or self-hosting on your own infrastructure, K3X drops in with two stock nodes: Webhook (to receive) and HTTP Request (to send).

Two directions to know.

  • n8n → K3X. An n8n workflow fires an HTTP Request node that POSTs to your K3X Agent's webhook URL.

  • K3X → n8n. K3X POSTs to a Webhook trigger node in n8n when something happens in your CRM.

A self-hosted note before we go further. If you self-host n8n behind a firewall or on a private network, K3X can't reach your Webhook node's URL — outbound webhooks from K3X need a publicly resolvable HTTPS endpoint. Either expose n8n through a reverse proxy with TLS, or use a tunnel service (Cloudflare Tunnel, ngrok). For inbound (n8n → K3X) this doesn't matter — your n8n instance just needs egress to api.k3x.ai.

Worked example: Stripe charge becomes a K3X lead update.

A customer pays via Stripe. You want K3X to find the matching lead, mark them as a paying customer, move the deal to "Closed Won," and trigger an Agent that drafts a welcome/onboarding email.

Step 1 — Build the Agent in K3X.

Create a new Agent in K3X: "When a Stripe payment webhook arrives, find the lead by email, update its status to paying, move its deal to Closed Won, and draft an onboarding email." Turn on the Webhook trigger and copy the URL — something like https://api.k3x.ai/v1/agents/agt_8f4a2/webhook. Generate a signing secret if this is going to run in production.

Step 2 — Build the n8n workflow trigger.

In n8n, create a new workflow. Add a Stripe Trigger node, pick the event (charge.succeeded works), and authenticate. Click Listen for Test Event and fire a test charge in Stripe so n8n captures a sample payload — you'll see the full Stripe object, with the customer's email, amount, and metadata.

Step 3 — Add the HTTP Request node.

Add an HTTP Request node and wire it to the Stripe trigger's output. Configure:

  • Method: POST

  • URL: your Agent's webhook URL

  • Authentication: Generic Credential Type → Header Auth, with X-K3X-Signature and the computed HMAC if you set a signing secret. (Use a small Function node before HTTP Request to compute the signature: crypto.createHmac('sha256', secret).update(JSON.stringify(body)).digest('hex').)

  • Send Body: on, Body Content Type: JSON, Specify Body: Using Fields Below

  • JSON fields: map Stripe data to the keys your Agent expects, e.g.:

source        →  stripe-charge
email         →  {{ $json.customer.email }}
amount        →  {{ $json.amount }}
currency      →  {{ $json.currency }}
stripe_id     →  {{ $json.id }}

Step 4 — Test, then activate.

Click Execute Workflow. The Stripe trigger replays its captured sample, the HTTP Request fires, and you should see a 200 in the node output. Check K3X — the Agent should have a fresh run with the Stripe payload. If everything looks right, flip the workflow to Active in the top-right corner. Until you do, the production Stripe webhook URL won't fire your workflow.

Going the other way: K3X → n8n.

Add a Webhook node as the trigger of a new workflow. The node exposes two URLs:

  • Test URL (/webhook-test/…) — only responds when you've clicked Listen for Test Event. Use this while building. It stays active for 120 seconds, then stops.

  • Production URL (/webhook/…) — responds whenever the workflow is Active. Use this in K3X for live events.

In K3X, open the Agent, add an outbound webhook action, and paste n8n's Production URL. To capture a sample payload first (so n8n can map fields downstream), temporarily paste the Test URL, hit Listen in n8n, trigger the event once in K3X, then swap back to the Production URL before going live.

Recipes to try.

  • Webflow → K3X. When a Webflow form is submitted, POST to a K3X Agent that creates a lead and tags the campaign source.

  • Postgres → K3X. Run an n8n schedule that queries your product database nightly for trial signups, then bulk-creates K3X leads.

  • K3X → internal Slack. When an Agent flags a churn risk, POST to n8n, which formats and posts to your CS team's channel.

  • K3X → data warehouse. Mirror every lead and deal change to Snowflake or BigQuery via n8n for your analytics stack.

Troubleshooting.

  • K3X returns 401. Signing secret mismatch. Re-check your Function node's HMAC calculation — make sure you're hashing the exact JSON string you send, not an object.

  • K3X returns 422. Body shape doesn't match what the Agent expects. Click into the HTTP Request node's Output after a test execution and inspect what n8n actually sent.

  • Production webhook isn't firing. Workflow must be Active, not just saved. Also confirm you used the production URL (no /webhook-test/ in the path) in K3X.

  • Self-hosted n8n unreachable from K3X. Your Webhook node URL must be reachable on the public internet over HTTPS. Use Cloudflare Tunnel or a reverse proxy. K3X cannot call into a private network.

  • Test URL stops responding. The test webhook is alive for 120 seconds after you click Listen. Re-click to extend, or move to the production URL.

That's the integrations collection. If you want a fourth tool added (Pipedream, Workato, custom scripts), the pattern is the same — POST JSON to your Agent's webhook URL, and let K3X POST back when events fire.

Did this answer your question?
😞
😐
😁