Building an async email negotiation bot - need help injecting messages into an existing Botpress conversation from an external webhook.
Context: Email bot that sends via Gmail API (Google Cloud Functions). Conversation starts via Salesforce → Make → plus/messaging integration. Replies come in via Gmail Pub/Sub → Cloud Function → Botpress webhook trigger. Can't use native Gmail integration — too limiting.
Problem: Every reply creates a new Botpress conversation instead of resuming the original, which will burn through my conversation quota fast at scale.
What I've tried:
- plus/messaging webhook with original conversationId — creates new conversation, stores original ID as tag only
- Runtime API createMessage with Personal Access Token + x-bot-id — returns 403: not authorized to create messages as an integration
- Runtime API createEvent — same 403
- Bot API key — 401: authentication type "bak" not supported
- Wait for User Input card — pauses correctly but no way to wake it up externally
Setup: plus/messaging (initial trigger), webhook integration (Gmail replies), Google Cloud Functions, Botpress Tables (threadId, conversationId, userId). Currently the bot has to refer to table variables to know what to respond next.
What authentication/endpoint allows resuming an existing conversation by conversationId? Or is there a way to ensure inbound webhook events attach to an existing conversation rather than creating a new one?