Hi,
I’m seeking to post multiple images in-line to a Microsoft Teams Channel in a single message (NOT a message per image). I have this working with a single image but figuring out how to handle an array of N number of images has me perplexed.
The standard Teams modules in Make don’t yet have this functionality for in-inline images (and other useful things - features requested) so I am having to do this via the Microsoft Teams “Make an API Call” endpoint.
API Documentation here:
The key part regarding in-line photos is hosted contents and a unique @microsoft.graph.temporaryId" per image.
"hostedContents":[
{
**"@microsoft.graph.temporaryId": "1",**
"contentBytes": "samplebase64data",
"contentType": "image/png"
}]
… looking for suggestions on how to take an array like this:
[
{
“array”: [
{
“data”: “IMTBuffer(142502, binary, 8230f41cab545fff1b0ff77398fd17f320413c72): ffd8ffe000104a46494600010100000100010000ffdb00430003020203020203030203030303030407050404040409060705070a090b0b0a090a0a0c0d110e0c0c100c0a0a0e140f1011121313130b0e141614121611121312ffdb004301030303040404”,
“fileName”: “file.jpeg”,
“IMTINDEX”: 1,
“IMTLENGTH”: 3
},
{
“data”: “IMTBuffer(51234, binary, 0bb74b89e6f0a86a50eb84631f9adee43c2b592c): ffd8ffe000104a46494600010100000100010000ffdb0084000302020708070608080606060605060606060606080806060506060808060606060606080606050606060606060a0505070809090906060b0d0a080d060809080103040406050608060608”,
“fileName”: “file.jpeg”,
“IMTINDEX”: 2,
“IMTLENGTH”: 3
},
{
“data”: “IMTBuffer(54773, binary, a5b7b03a1999f038db768cf4bc43ce1a89c16813): ffd8ffe000104a46494600010100000100010000ffdb00430003020203020203030203030303030407050404040409060705070a090b0b0a090a0a0c0d110e0c0c100c0a0a0e140f1011121313130b0e141614121611121312ffdb004301030303040404”,
“fileName”: “file.jpeg”,
“IMTINDEX”: 3,
“IMTLENGTH”: 3
}
],
“IMTAGGLENGTH”: 3
}
]
into body input for the Microsoft Teams module that looks like this…
"hostedContents":[
{
"@microsoft.graph.temporaryId": "1",
"contentBytes": "base64(ffd8ffe000104a46494600010100000100010000ffdb00430003020203020203030203030303030407050404040409060705070a090b0b0a090a0a0c0d110e0c0c100c0a0a0e140f1011121313130b0e141614121611121312ffdb004301030303040404)",
"contentType": "image/jpg"
},
{
"@microsoft.graph.temporaryId": "2",
"contentBytes": "base64(ffd8ffe000104a46494600010100000100010000ffdb0084000302020708070608080606060605060606060606080806060506060808060606060606080606050606060606060a0505070809090906060b0d0a080d060809080103040406050608060608)",
"contentType": "image/jpg"
},
{
"@microsoft.graph.temporaryId": "3",
"contentBytes": "base64(ffd8ffe000104a46494600010100000100010000ffdb00430003020203020203030203030303030407050404040409060705070a090b0b0a090a0a0c0d110e0c0c100c0a0a0e140f1011121313130b0e141614121611121312ffdb004301030303040404)",
"contentType": "image/jpg"
}
]