Die Artikel sind auf Englisch verfügbar.

How to Test n8n

Test n8n-to-WAPI, WAPI-to-n8n, inbound WhatsApp forwarding, filters, payloads, and shared secret validation.

Last updated

On this page

Before You Start

  1. Prepare an n8n workflow where you can safely test Webhook and HTTP Request nodes.
  2. Create and approve a WhatsApp template in WAPI if the workflow will send a template.
  3. Open Integration Marketplace > n8n.

Test n8n to WAPI

  1. Open n8n > Accounts in WAPI and click Add Account.
  2. Save a label. Endpoint URL can stay empty for the first n8n-to-WAPI test.
  3. Copy the WAPI Incoming URL from the saved account row.
  4. In n8n, create a workflow with Manual Trigger and HTTP Request.
  5. Set the HTTP Request method to POST.
  6. Paste the WAPI Incoming URL.
  7. Set Content-Type to application/json.
  8. Send JSON with event send_template, phone, template_name, language, and variables that match an approved WAPI template.
  9. Execute the n8n workflow.
  10. Confirm WAPI Recent Activity and Job History show the processed event.
  11. Confirm the WhatsApp message arrives.

Test WAPI to n8n

  1. In n8n, create a workflow with a Webhook Trigger.
  2. Activate the workflow and copy the Production URL.
  3. Do not use Listen for test event when testing the Production URL.
  4. In WAPI, open n8n > Accounts and save the n8n Production URL as the account Endpoint URL.
  5. Open n8n > Mappings/Rules & Jobs and use the manual Send Test to n8n action.
  6. Confirm n8n receives the webhook payload.
  7. Confirm WAPI Job History records the manual test result.

Test Inbound WhatsApp Forwarding to n8n

  1. In n8n, keep an active workflow with a Production Webhook URL ready.
  2. In WAPI, open n8n > Mappings/Rules & Jobs.
  3. Click Add Rule.
  4. Choose WhatsApp Inbound Message as the n8n event.
  5. Choose Forward inbound message to n8n as the action.
  6. Use the account Endpoint URL or enter a rule-specific Endpoint URL. The rule endpoint overrides the account endpoint when both exist.
  7. Choose message type filters such as Text, Image, Document, Video, Audio, Interactive/Button, Template Reply, or System.
  8. Choose optional filters such as phone/contact, contact category, conversation tag, assignment state, human activity state, keyword, starts with, or regular expression.
  9. Keep payload fields checked for the first test so n8n receives the full sample payload.
  10. Save the enabled rule.
  11. Send an inbound WhatsApp message that matches the filter.
  12. Confirm n8n receives the payload.
  13. Confirm WAPI Job History and Recent Activity show the forwarded inbound message.

Test Shared Secret

  1. Edit the n8n account in WAPI and save a Shared Webhook Secret.
  2. In n8n, add header X-WAPI-Connector-Secret with the same value when calling WAPI.
  3. Run the n8n workflow again.
  4. Confirm the request is processed.
  5. Change the header value temporarily and confirm WAPI rejects the request.
  6. Restore the correct header value.

What to Check if It Fails

  1. Use n8n Test URL only while n8n is actively listening for a test event.
  2. Use n8n Production URL only after the workflow is active.
  3. Confirm the rule endpoint URL or account Endpoint URL is correct.
  4. Confirm your filters actually match the inbound message.
  5. Confirm selected payload fields include the values your n8n workflow expects.
  6. Confirm shared-secret headers match when a secret is saved in WAPI.
Next ArticleHow to Test Generic CRM Webhook