Avoid accidental WhatsApp sends in n8n HTTP Request: a small guarded starter

Disclosure: this example is maintained by the Wafly team. Wafly is a paid, non-official WhatsApp API, with account restriction risks. The workflow JSON is free to inspect; using the service is a separate decision. This is not Meta Cloud API.

One small pattern from our native-node walkthrough may be useful when a workflow has an external side effect: ship it unable to send, validate exactly one input, and require a deliberate first execution.

The path is:

Manual Trigger → Edit Fields → Code validation → HTTP Request (disabled)

The starter has no schedule, recipient list, loop or automatic retry. It stops when instance/token placeholders remain, the phone format is invalid, the message is empty or too long, or authorizedRecipient is not the Boolean true. That last field records the operator’s confirmation; it does not establish consent independently.

For example, these are two checks from the actual validation node:

const items = $input.all();
if (items.length !== 1) {
  throw new Error('This starter accepts exactly one input, not a recipient list.');
}
const c = items[0].json;
if (c.authorizedRecipient !== true) {
  throw new Error('Confirm that this recipient is yours or explicitly authorized before enabling the request.');
}

This snippet illustrates only two guards. The downloadable JSON contains the full validation.

Credential setup: use your private Header Auth credential with Client-Token as the header name. The instance token is also part of the endpoint URL, so a configured export or execution screenshot can expose it. Keep those private; distribute only the placeholder version.

The uncertain-result case: an HTTP timeout can happen after the API accepted a request. An API response containing a message identifier is acceptance, not proof of delivery or reading. Keep automatic retries off until you have reconciled the result. A disabled node and these validation checks do not provide provider-side idempotency or prevent someone manually running the workflow again.

We checked the starter in an isolated local n8n2.43.7 environment: unconfigured input stops, the disabled HTTP node sends nothing, a configured local mock receives one POST, and a simulated503 produces one attempt. No production credentials or real WhatsApp message were used. Native-node import/execution locally is not a claim that a hosted n8nCloud account was tested.

The standard Brazil offer is R$59.90 per number/month with a three-day trial without a card. n8n hosting and AI services, if added, are separate. This starter sends one deliberate test request; it does not provide an AI agent or automatic replies.

How do you make the first execution of a side-effecting HTTP workflow deliberate when handing it to someone else?