Reputation: 35190
I'm trying to set up a Flow with a Send and wait for reply
widget (triggered with the REST API), however, the reply doesn't seem to trigger the next widget (handle_welcome...) and instead triggers the Incoming Message for the Flow (handle_incoming...).
Is there a way to set up a Flow so that it knows that the received SMS is a reply and not just a generic Incoming Message?
Here is a screenshot of the flow:
I only have one number set up and that is set to trigger the Studio Flow on an incoming message.
Also, I'm not sure if it makes a difference but I have Concurrent calls trigger enabled.
Upvotes: 3
Views: 1770
Reputation: 21
You can use a messaging service when you trigger a Studio API call, but you need to set the From
to the MessagingServiceSID
, not the phone number.
curl -X POST https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions \
--data-urlencode "To=<ToPhoneNumber>" \
--data-urlencode "From=<MessagingServiceSID>" \
-u "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token"
Here is the relevant support article.
Remember to enable Sticky Sender in the messaging service so the messages always come from the same number.
Upvotes: 0
Reputation: 2780
Make sure that you do not have the phone number associated to Service. I had created a service, associated the number and that seems to have short circuited the flow. I logged a ticket with Twilio and they kindly instructed me to remove it. Once I removed it, the flow worked as expected:
Remove the number (:warning: if this is not required for your service. Else, purchase a new number and use that with your flow)
Upvotes: 4
Reputation: 98
To use the REST API trigger with a subsequent wait and reply widget, the phone number you send from can not be associated with a messaging service. Remove that association and then you will be able to use the flow with both REST API trigger and incoming message trigger.
Upvotes: 1