How to connect Unified Chat to n8n

This guide explains how to integrate Unified Chat (Unichat) with n8n using webhooks and HTTP requests, so you can automate conversations and connect with AI models or other services.

1. Create a Webhook in n8n

  1. Add a Webhook node in n8n.
  2. Configure it:
    • HTTP Method: POST
    • Authentication: None
    • Respond: Immediately
  3. Copy the POST Webhook URL generated by n8n. This URL will be used in UniChat for the webhook setup.

2. Configure an HTTP Request Node in n8n

  1. Add an HTTP Request node.
  2. Configure it with the following details:
General Settings
  • Method: POST
  • URL:
    https://app.unichat.com.bd/api/v1/accounts/{{ $json.body.account.id }}/conversations/{{ $json.body.conversation.id }}/messages
Authentication

None

Headers
Content-Type: application/json
Accept: application/json
api_access_token: {your access token}
    
Body (JSON)
{
  "content": "Hi, I'm from n8n"
}
    
Note: This is a simple example. You can extend the workflow by adding additional n8n nodes, such as AI models, data transformation nodes, or external integrations depending on your automation needs.

3. Create a Bot in UniChat

  1. Go to UniChat Dashboard → Settings → Bots.
  2. Click Add Bot.
  3. Enter:
    • Bot Name
    • Webhook URL (the n8n Webhook URL)
  4. Click Create Bot.
  5. Copy the Access Token from the bot settings (also available under Edit → Access Token). This token will be used in the HTTP Request node.

4. Handing Over to Human Agents (Optional)

By default, when a bot replies, the conversation status is set to pending:

  • Pending → Bots can reply
  • Open → Only human agents can reply

To hand over a conversation to a human agent, update the status using the API:

curl --request POST \
  --url "https://app.unichat.com.bd/api/v1/accounts/{{$json.body.account.id}}/conversations/{{$json.body.conversation.id}}/toggle_status" \
  --header "Content-Type: application/json" \
  --header "api_access_token: <api-key>" \
  --data '{
    "status": "open"
  }'
    

Summary

  • Use an n8n Webhook node to receive UniChat events.
  • Use an HTTP Request node to send messages back to UniChat.
  • Set up a Bot in UniChat with the n8n Webhook URL and access token.
  • Extend the flow with AI models or other automation logic.
  • Change conversation status to open when handing over to a human agent.
Share:

More Resource

article

Unified Chat - Website live chat settings explained

This guide explains how to integrate UniChat with n8n using webhooks and HTTP requests, so you can automate conversations and connect with AI models or other services.

article

Unified Chat - How to setup a Facebook channel?

This guide explains how to integrate UniChat with n8n using webhooks and HTTP requests, so you can automate conversations and connect with AI models or other services.

article

সেরা ৫টি SaaS ভিত্তিক Omnichannel Unified Chat System — সব চ্যানেল এক প্ল্যাটফর্মে!

This guide explains how to integrate UniChat with n8n using webhooks and HTTP requests, so you can automate conversations and connect with AI models or other services.

article

কেন Paid Ads (Facebook/Google) চালানোর পরেও ‍Sales বাড়ছেনা ?

This guide explains how to integrate UniChat with n8n using webhooks and HTTP requests, so you can automate conversations and connect with AI models or other services.

article

বাংলাদেশের ই-কমার্স ব্র্যান্ডগুলো কীভাবে Unified Chat ব্যবহার করে বিক্রি বাড়াতে পারে

This guide explains how to integrate UniChat with n8n using webhooks and HTTP requests, so you can automate conversations and connect with AI models or other services.

article

বাংলাদেশী ব্যবসায়ীরা যে ৫টি গ্রাহক পরিষেবা ভুল করে (এবং কীভাবে সেগুলি এড়ানো যায়)

This guide explains how to integrate UniChat with n8n using webhooks and HTTP requests, so you can automate conversations and connect with AI models or other services.