← All articles
Developer API, MCP and webhooks·

Set up Getwello with n8n

Self-hosted workflows. Branch on mood, fan out to multiple destinations, verify HMAC. About 15 minutes.

This guide wires Getwello into a self-hosted (or cloud) n8n instance so check-ins, missed-day alerts and visits trigger your own workflows. Branch on event type, verify signatures, fan out to anywhere.

What you need

  • An n8n instance running (self-hosted, cloud or local). v1.x or newer.
  • A Getwello Coordinator account with active subscription.
  • About 15 minutes.

Step 1: Add a webhook trigger node

  1. In your n8n editor, click + and search for “Webhook”.
  2. Drop the Webhook node onto the canvas.
  3. HTTP Method: POST. Path: /getwello (or whatever you like).
  4. Activate the workflow once so n8n issues the public URL. Copy it.

Step 2: Mint a Getwello API key

Open Settings → Developer API as a Coordinator. Name the key “n8n”. Copy the gw_live_ token.

Step 3: Create the Getwello webhook subscription

Settings → Developer API → Webhooks → Create. URL is the n8n webhook from Step 1. Pick the events you want. Copy the signing secret for Step 4.

Step 4: Verify the HMAC signature

After the Webhook node, add a Function node with this code:

const ts = $input.first().headers['x-getwello-timestamp'];
const provided = $input.first().headers['x-getwello-signature']
  .replace(/^.*v1=/, '');
const body = JSON.stringify($input.first().body);
const expected = require('crypto')
  .createHmac('sha256', $env.GETWELLO_SECRET)
  .update(`${ts}.${body}`)
  .digest('hex');
if (expected !== provided) throw new Error('bad signature');
return $input.all();

Set GETWELLO_SECRET in n8n environment variables. Now any unsigned or tampered request fails the workflow.

Step 5: Branch and act

Add IF or Switch nodes to branch on {{$json.event}} (check_in.created, check_in.missed, etc.). After the branch, drop in destination nodes: HTTP Request, Telegram, Discord, Google Sheets, anything n8n supports.

Test

  1. Click the Webhook node, click “Listen for test event”.
  2. On Getwello, click Test next to the webhook. The synthetic event arrives in n8n.
  3. Step through the nodes. Confirm the signature verifies and the right branch fires.
  4. Save the workflow and switch the trigger to Production mode.

Troubleshooting

Signature fails: the body must be the exact bytes received. Make sure you are JSON-stringifying the parsed object the same way the original arrived. Some n8n setups need $input.first().bodyRaw instead.

Workflow never fires: the trigger node has a Test URL and a Production URL. Make sure you wired Getwello to the Production URL once you saved the workflow.

More on developer api, mcp and webhooks

Didn't answer your question?

Email hello@getwello.co.uk