Casey Davis
Casey Davis

Reputation: 23

Forward message similar to webhook from a Studio Flow

I have the ability to receive the full incoming message from setting a url in the number section under "A message comes in" to Webhook and entering my url. I would like my messages to be processed in a Studio Flow first. Is there any way from the flow I could then pass it out to a webhook url? I know the webhook sends this info in json, but I'm not sure if I can build all of this data with the html widget. Any idea for how I could do it?

(
    [inbound] => 
    [ToCountry] => US
    [ToState] => OK
    [SmsMessageSid] => xxx
    [NumMedia] => 0
    [ToCity] => NOBLE
    [FromZip] => 73003
    [SmsSid] => xxx
    [FromState] => OK
    [SmsStatus] => received
    [FromCity] => EDMOND
    [Body] => Test
    [FromCountry] => US
    [To] => +xxx
    [ToZip] => 73068
    [NumSegments] => 1
    [MessageSid] => xxx
    [AccountSid] => xxx
    [From] => +xxx
    [ApiVersion] => 2010-04-01
)

Upvotes: 1

Views: 234

Answers (1)

philnash
philnash

Reputation: 73029

Twilio developer evangelist here.

You could certainly pass it to a Studio Flow first, as you describe, and then use the HTTP request to send all the data onto a webhook URL of your own.

To send all the data onto your own URL, you would need to add all the parameters to the widget too. You'll find all that data in the trigger object within the flow.

Upvotes: 1

Related Questions