Forum Discussion
McJasem
May 10, 2021Copper Contributor
Get Images (if any) from Microsoft Lists and post to teams via Flow
Hi all, I've got a Microsoft Lists with different info, and i wish to post any changes in Lists into Teams. I've so far set it up that my Flow monitors the list and *if* there's an change with th...
RobElliott
Jun 09, 2021Silver Contributor
McJasem instead of the Teams Post a message action you need to use Post your own adaptive card as the flow bot to a channel.
The sort of JSON you would need, including for the image, is as follows:
{
"type": "AdaptiveCard",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "REI News",
"wrap": true
},
{
"type": "TextBlock",
"spacing": "None",
"size": "Large",
"weight": "Bolder",
"text": "@{body('Get_file_properties')?['Title']}"
},
{
"type": "TextBlock",
"spacing": "None",
"text": "@{outputs('Compose_First_Published')} - @{outputs('Compose_Contact')}",
"isSubtle": true
},
{
"type": "TextBlock",
"size": "Small",
"text": "@{body('Get_file_properties')?['Description']}",
"wrap": true
},
{
"type": "Image",
"url": "@{body('Get_file_properties')?['BannerImageUrl']}"
}
],
"width": 2
}
]
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "Go to news article",
"url": "@{body('Get_file_properties')?['{Link}']}"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
This would give you a result like this:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
McJasem
Aug 18, 2021Copper Contributor
Hi Rob
Thanks for the great advice, but i'm still a novice and the JSON code isn't something i'm familiar with. Could you perhaps explain, or do you have a work around that don't need JSON code?
/McJasem
Thanks for the great advice, but i'm still a novice and the JSON code isn't something i'm familiar with. Could you perhaps explain, or do you have a work around that don't need JSON code?
/McJasem