mindofbeholder
mindofbeholder12mo ago

Failed to deserialize form body on twilio POSTs to Windmill intake webhook

Windmill version: CE v1.208.0-12-gd82027cbf Webhook: https://windmill.redacted.dev/api/w/home/jobs/run_wait_result/f/f/twilio/twilio_intake?token=redacted I have twilio setup to post to a webhook trigger in a flow. Twilio sends texts as x-www-form-urlencoded payloads. I am seeing the following error response from Windmill on POST: Failed to deserialize form body: invalid type: map, expected option I can reproduce this behavior in Postman. Sample payload:
ToCountry:US
ToState:AK
SmsMessageSid:SMredacted
NumMedia:0
ToCity:
FromZip:55555
SmsSid:SMredacted
FromState:AK
SmsStatus:received
FromCity:REDACTED
Body:Test
FromCountry:US
To:+15555555
MessagingServiceSid:MGredacted
ToZip:
NumSegments:1
MessageSid:SMredacted
AccountSid:ACredacted
From:+15555555
ApiVersion:2010-04-01
ToCountry:US
ToState:AK
SmsMessageSid:SMredacted
NumMedia:0
ToCity:
FromZip:55555
SmsSid:SMredacted
FromState:AK
SmsStatus:received
FromCity:REDACTED
Body:Test
FromCountry:US
To:+15555555
MessagingServiceSid:MGredacted
ToZip:
NumSegments:1
MessageSid:SMredacted
AccountSid:ACredacted
From:+15555555
ApiVersion:2010-04-01
9 Replies
rubenf
rubenf12mo ago
Interesting, can you try in postman with removing ToZip and Tocity which are empty if that solves the issue then I likely can fix this quick
mindofbeholder
mindofbeholder12mo ago
Same results
rubenf
rubenf12mo ago
can you export that as a curl command, I can give it a try to solve it soon
mindofbeholder
mindofbeholder12mo ago
Added back in the empty values
curl --location 'https://windmill.redacted.dev/api/w/home/jobs/run_wait_result/f/f/twilio/twilio_intake?token=redacted' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'ToCountry=US' \
--data-urlencode 'ToState=AK' \
--data-urlencode 'SmsMessageSid=SMredacted' \
--data-urlencode 'NumMedia=0' \
--data-urlencode 'ToCity=' \
--data-urlencode 'FromZip=55555' \
--data-urlencode 'SmsSid=SMredacted' \
--data-urlencode 'FromState=AK' \
--data-urlencode 'SmsStatus=received' \
--data-urlencode 'FromCity=REDACTED' \
--data-urlencode 'Body=Test' \
--data-urlencode 'FromCountry=US' \
--data-urlencode 'To=+15555555' \
--data-urlencode 'MessagingServiceSid=MGredacted' \
--data-urlencode 'ToZip=' \
--data-urlencode 'NumSegments=1' \
--data-urlencode 'MessageSid=SMredacted' \
--data-urlencode 'AccountSid=ACredacted' \
--data-urlencode 'From=+15555555' \
--data-urlencode 'ApiVersion=2010-04-01'
curl --location 'https://windmill.redacted.dev/api/w/home/jobs/run_wait_result/f/f/twilio/twilio_intake?token=redacted' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'ToCountry=US' \
--data-urlencode 'ToState=AK' \
--data-urlencode 'SmsMessageSid=SMredacted' \
--data-urlencode 'NumMedia=0' \
--data-urlencode 'ToCity=' \
--data-urlencode 'FromZip=55555' \
--data-urlencode 'SmsSid=SMredacted' \
--data-urlencode 'FromState=AK' \
--data-urlencode 'SmsStatus=received' \
--data-urlencode 'FromCity=REDACTED' \
--data-urlencode 'Body=Test' \
--data-urlencode 'FromCountry=US' \
--data-urlencode 'To=+15555555' \
--data-urlencode 'MessagingServiceSid=MGredacted' \
--data-urlencode 'ToZip=' \
--data-urlencode 'NumSegments=1' \
--data-urlencode 'MessageSid=SMredacted' \
--data-urlencode 'AccountSid=ACredacted' \
--data-urlencode 'From=+15555555' \
--data-urlencode 'ApiVersion=2010-04-01'
rubenf
rubenf12mo ago
thanks!
mindofbeholder
mindofbeholder12mo ago
A buddy has the same setup that is functioning but is running CE v1.179.1-1-g9f88809e
rubenf
rubenf12mo ago
👍 it's fixed in very latest
mindofbeholder
mindofbeholder12mo ago
Confirmed successful! Thanks!