Workflow Setup: External HTTP Request With Callback Triggering a Slack Message in N8N

Here is the step-by-step documentation for setting up the N8N workflow based on your screenshots. This setup demonstrates an interaction between a trigger button, an external HTTP POST request with a callback URL, and a Slack message based on a webhook response.




Overview

This workflow allows you to:

  1. Trigger a workflow manually.
  2. Send an HTTP request to an external server with a callback_url.
  3. Wait for the external system to call the callback URL.
  4. When the callback is triggered, send a message to a Slack channel with the response.

1. Manual Trigger: Execute workflow

  • Node Type: Trigger β†’ Manual Trigger
  • Purpose: Allows you to manually initiate the workflow in N8N for testing or production use.

2. HTTP Request to External Server

  • Node Type: HTTP Request

  • Method: POST

  • URL:

    https://webhook-custom-dev-1080791310029.europe-west1.run.app/custom/v1/webhook
    
  • Authentication:

    • Type: Generic Credential Type
    • Auth Method: Bearer Auth
    • Credential: Bearer Auth account (This is your Watermelon API key)
  • Send Body: Enabled

  • Body Content Type: JSON

  • JSON Payload:

{
  "channel_name": "chatwidget",
  "channel_id": "",
  "text": "",
  "callback_url": ""
}

πŸ”

This sends the message to an external server, telling it where to POST the callback response once it has processed the request.


3. Webhook Listener

  • Node Type: Trigger β†’ Webhook

  • Method: POST

  • Path: 37343446-975a-411e-a05a-9b3281bff868

  • Webhook URL:

    https://username.app.n8n.cloud/webhook/37343446-975a-411e-a05a-9b3281bff868
    
  • Authentication: None

  • Response Mode: Immediately

πŸ“₯

This node listens for the external service to call back with the result.


4. Send Slack Message

  • Node Type: Slack β†’ Message
  • Operation: Send
  • Channel: gcp-errors (select from list)
  • Message Type: Simple Text Message
  • Message Text:
This is the agent response from N8N after the webhook was triggered {{ $json.body.message }}

πŸ“€

This sends a message to the specified Slack channel using the content from the webhook callback.


βœ… Final Flow Summary



πŸ§ͺ Testing Instructions

  1. Click β€œExecute Workflow” to initiate the flow.
  2. Wait for the external server to call the callback_url.
  3. Observe the response message being sent to the gcp-errors Slack channel.

βœ… Key Notes

  • Ensure the callback_url in the HTTP request matches the Webhook node's Production/Test URL.
  • Your external service must POST to the callback URL after handling the initial request.
  • The expected response payload should include a message field for the Slack node to render it.

Let me know if you want a variant with conditional logic, multiple agents, or error handling.