How-to

Connect your Make.com, n8n or any other agent to a Chat4Agent widget.

Make.com

  1. Add a Custom Webhook trigger.
  2. Copy its URL into the Agent Webhook URL in your chat's Agent Settings.
Make.com Custom Webhook trigger
  1. Add your Make Agent into the canvas.
  2. Use {{1.body.Session_Id}} as the conversation key (and {{1.body.Thread_Id}} to segment by thread).
Make.com step 2
  1. Final Webhook Response body — a JSON bundle that echoes the four identifiers plus the Response string from your AI Agent:
    {
      "Org_Id":     "{{1.body.Org_Id}}",
      "Chat_Id":    "{{1.body.Chat_Id}}",
      "Session_Id": "{{1.body.Session_Id}}",
      "Thread_Id":  "{{1.body.Thread_Id}}",
      "Response":   "{{<ai-node>.output}}"
    }
Make.com step 3
  1. The response body must be JSON.
  2. Make's default response is the plain text Accepted, which the widget cannot parse.
  3. In your Webhook Response module, set the body exactly to the JSON template shown in step 5 above.
  4. Set Advanced → Custom headers → Content-Type: application/json.
  5. Important: stringify your Agent's response before putting it in Response.
The finished Make.com scenario: Listen to Chat4Agent (custom webhook), My Agent, Send Response to Chat4Agent (webhook response)