Hello everyone, I would like to keep my WhatsApp flow within Chatwoot.
To do this, I thought about creating a webhook in n8n and creating a Bot in Chatwoot that addresses n8n.
n8n would receive this webhook, call a method to create or retrieve an existing chat. From there, it would mediate between Chatwoot and Typebot.
Currently, for this, I would need to keep the sessionId and relate it to the conversation ID in Chatwoot. I didn't want to use a database for this, so my question is:
You need DB to play with it, currently my setup is like yours and i using postgreDB to store sessionID, resultID, user number & name:
Chatwoot Webhook > if sessionID not equal on DB > Preffiled variable with Chatwoot conversationID and Hit typebot startchat endpoint then save it to DB > else > hit typebot continuechat endpoint
So on typebot you can send Bot message as private note with send message Chatwoot API based on conversationID that you send from prefilled variable
But on my case you can scale and combine it with whatsapp api webhook on another workflow in n8n so you can playaround with all whatsapp type message
And you cant setup custom sessionID because its auto generate when you hit startchat endpoint on typebot and its stick forever so you must setup another flow to delete sessionID on your DB like when agent assign on chatwoot or whatever event you want
I created a custom conversation attribute in Chatwoot. When a message arrives, I check if the conversation does not have this attribute filled in, then I generate a sessionId and store it in the conversation attribute.