In my question on getting text messages into Azure I was able to get the message of an SMS into Azure Table Store.
In the case where the text message contains images and thus has been sent as a MMS I want to download the images into Azure Blob Storage.
Twilo has a guide on how to download and receive images
But I am not sure how to make use of this with a Logic App
I tried studying this Twilio guide and cloned the code from GitHub. Confusingly the DownloadMmsImages is in the same solution as a BlockSpamCalls project. I was unclear about the relationship between the 2 projects.
I tried adding a Twilio GetMessage action however the only property that I am prompted to put in the Message SID is Body.
The (slightly obfuscated ) request body JSON schema is
{
"body": {
"$content": "VG9Db3VudHJ etc",
"$content-type": "application/json",
"$formdata": [
{
"key": "ToCountry",
"value": "AU"
},
{
"key": "ToState",
"value": ""
},
{
"key": "SmsMessageSid",
"value": "SMeda21902 etc"
},
{
"key": "NumMedia",
"value": "0"
},
{
"key": "ToCity",
"value": ""
},
{
"key": "FromZip",
"value": ""
},
{
"key": "SmsSid",
"value": "SMeda2 etc"
},
{
"key": "FromState",
"value": ""
},
{
"key": "SmsStatus",
"value": "received"
},
{
"key": "FromCity",
"value": ""
},
{
"key": "Body",
"value": "Tskez7"
},
{
"key": "FromCountry",
"value": "AU"
},
{
"key": "To",
"value": "+61 etc"
},
{
"key": "ToZip",
"value": ""
},
{
"key": "NumSegments",
"value": "1"
},
{
"key": "MessageSid",
"value": "SMeda2 etc"
},
{
"key": "AccountSid",
"value": "AC7aa etc"
},
{
"key": "From",
"value": "+61 etc"
},
{
"key": "ApiVersion",
"value": "2010-04-01"
}
]
},
"headers": {
"Accept": "*/*",
"Cache-Control": "max-age=259200",
"Connection": "close",
"Content-Length": "381",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "etc.logic.azure.com:443",
"User-Agent": "TwilioProxy/1.1",
"X-Twilio-Signature": "sQf etc"
}
}