Hi has anyone been able to solve this? I am trying to send attachments from a sharepoint list and publish them in an adptive card to Teams. the attachments the only thing I am trying to recover is the name and a link so that the approver only has to click on it and go to the file from the adaptive card, thank you very much for any information
Hi @Ea1409
I set up a flow, you can refer to below screenshots to see if it helps.
The content of Message field.
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "File Request",
"id": "Title",
"spacing": "Medium",
"horizontalAlignment": "Center",
"size": "ExtraLarge",
"weight": "Bolder",
"color": "Accent"
},
{
"type": "TextBlock",
"text": "Please approval the request",
"id": "acHeaderTagLine",
"separator": true
},
{
"type": "Input.ChoiceSet",
"placeholder": "Select from these choices",
"choices": [
{
"title": "Agree",
"value": "Agree"
},
{
"title": "Reject",
"value": "Reject"
}
],
"id": "acPollChoices",
"style": "expanded"
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "Click here to see the file:@{item()?['DisplayName']}",
"url": "@{item()?['AbsoluteUri']}"
},
{
"type": "Action.Submit",
"title": "Submit",
"id": "btnSubmit"
},
]
}
Save and test.
When a new item is created,the attachment's filename and link will be add in an adptive card to Teams.
Hope the content above may help you.
Best Regards
If my answer helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello, thank you very much for answering and sorry for the delay.
I wanted to ask you, there it creates an adaptive card once there is an attachment, for example there are several attachments in the attachment column, with this way, from what I see, send an adaptive card for each attachment that is in the list , this is so? If so, there would be inconveniences because my boss asks me to create only one adoptive card with all the attachments so that the approver approves or rejects them all at once and I can control this response, this idea is INCREDIBLY INTELLIGENT because I did not find another the same anywhere, but by chance I know how I can take a group of attachments, 2,3,4,5 etc to a single adptive card, I was doing this same process that you have, I get the attachments from the list and I get the content of the attachments and stored it in a JSON array but I still can't get it to work, I was trying to do something like the following, only from sharepoint but I still can't
https://youtu.be/Qb6ll0TwGyU?t=216
I thank you infinitely for this solution.
If a daptive card is generated for each attachment, I would have problems because the approver would have to answer me 6 times the approval and this goes to the flow, the states would be updated and many messes would be created, the ideal is that all the attachments be sent to a single adptive card as I mentioned for the approver to approve or not, so more or less how to show the video that I haven't managed to make it work yet.
Thank you again for responding and I am attentive to any information you can give me and I will be eternally grateful, a hug
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
28 | |
28 | |
26 | |
26 | |
23 |
User | Count |
---|---|
63 | |
51 | |
44 | |
33 | |
30 |