I'm trying to use the following code to start a proactive twilio conversation (basically get a conversationId):
console.log('Main webhook payload:', event.payload.body)
user.customerName = event.payload.body.name
user.customerPhone = event.payload.body.phone
const result = await actions.twilio.startConversation({
conversation: {
userPhone: user.customerPhone,
activePhone: env.twilio_number
}
})
console.log('Generated convId object:', result)
event.conversationId = result.conversationId
The error received in the logs is:
Error while executing integration action: An unexpected error occurred in the integration. Bot owners: Check logs for more informations.
What am I doing wrong? If I try to use the Start Proactive Conversation card, I get a slightly different error that says: Error while executing integration action: Could not create conversation: missing channel, channelId or userId. Do I need to create a user using the twilio card?
My intent is to start a new conversation with the received context data from the webhook.