https://discord.gg/botpress logo
Continue a conversation in trigger-based workflow!
# 🤝help
b
I am currently building a bot in which the conversation is started by the bot (triggered upon an email being sent via message API and Gmail API). Every message that gets sent is via an HTTP request (simple HTTP request integration by lebotfrancais) as I am sending out of Google Cloud via Gmail API (the Botpress Gmail integration was too limiting for my use case). The Gmail API returns the threadId and messageId, which are stored in a table along with the Botpress conversationId (captured from the event payload when the conversation is first created). When a user responds to the initial email, it comes through a separate workflow as a webhook trigger, which looks up the matched conversationId in the table, goes through the workflow, and decides how to respond next (again sent via HTTP request). The issue is that every time an email is sent or received in the thread, Botpress is technically creating a new conversation in the background, even though everything is being referenced from the same row in the table. Is there a way to keep the original conversation "alive" and waiting for input that arrives via a webhook trigger rather than a direct user message? Or is the recommended approach to use a table as the single source of truth and treat each webhook trigger as a stateless flow?
11 Views