Тёмный

🔁 How to refresh and update Adaptive Cards in Teams [Travel Request Self-Service] 

Giuliano De Luca
Подписаться 10 тыс.
Просмотров 12 тыс.
50% 1

Наука

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@gegervl
@gegervl 5 месяцев назад
@DeLucaGiulian Hi, can you please tell me at 31:23 how do you get the Responder Name for the value Approved by ? Is there a way to get this dynamic content ? How should it be written ? I don't know how to get the user info who submit the adaptative card previously this step. Can you explain me that part please ? I need to get this user to display in the updated adaptative card and save it in the sharepoint list
@DeLucaGiulian
@DeLucaGiulian 5 месяцев назад
Hi, Thank you for asking, this is what I have in order to save the approver in the SharePoint list: triggerBody()?['entity']?['teamsFlowRunContext']?['messagePayload']?['from']?['user']?['displayName']
@microfuel
@microfuel Год назад
Good to see it working in channels. Does updating the card work for you in chats with the Flow Bot (outside of channels)? I get an error 403 when I try that.
@DeLucaGiulian
@DeLucaGiulian Год назад
Hi Andreas, Yes it works.
@microfuel
@microfuel Год назад
@@DeLucaGiulian Thanks for the response. Do you know what permissions are needed for the user that makes the connection in the flow in order to be able to update cards between the flowbot and another user?
@DeLucaGiulian
@DeLucaGiulian Год назад
In my case a used a user with Teams and power automate license, I used the same PoC of flows in the video.
@nivednambiar6845
@nivednambiar6845 4 месяца назад
Hi Is it possible to update a adaptive card in chat when user submit it , I am still getting forbidden issue with that
@pedroguth4705
@pedroguth4705 Год назад
Could you provide the json for the Adaptive Card? I need one just like your and I've already lost 2 hours trying to get it right on the JSON formater. My god man...
@DeLucaGiulian
@DeLucaGiulian Год назад
{ "type": "AdaptiveCard", "$schema": "adaptivecards.io/schemas/adaptive-card.json", "version": "1.4", "body": [ { "type": "TextBlock", "text": "New Trip Requested @{triggerOutputs()?['body/Title']}", "wrap": true }, { "type": "TextBlock", "text": "Reason for travel @{triggerOutputs()?['body/ReasonForTravel']}", "wrap": true }, { "type": "TextBlock", "text": "Submitted by @{triggerOutputs()?['body/Requester/DisplayName']}", "wrap": true }, { "type": "TextBlock", "text": "Destination: @{triggerOutputs()?['body/Destination']}", "wrap": true }, { "type": "ActionSet", "actions": [ { "type": "Action.OpenUrl", "title": "Open Request", "url": "@{triggerOutputs()?['body/{Link}']}" } ] }, { "type": "Input.Text", "placeholder": "Comments", "label": "Add the reason of your choice below:", "id": "_comments", "isRequired": true, "errorMessage": "The reason for the approval or rejection must be provided" }, { "type": "ActionSet", "actions": [ { "type": "Action.Submit", "title": "Approve", "id": "_approve", "data": { "Action": "Approved", "SPListItemID": "@{triggerOutputs()?['body/ID']}" }, "style": "positive" }, { "type": "Action.Submit", "title": "Reject", "id": "_reject", "style": "destructive", "data": { "Action": "Rejected", "SPListItemID": "@{triggerOutputs()?['body/ID']}" } }, { "type": "Action.ShowCard", "title": "Reassign", "card": { "type": "AdaptiveCard", "body": [ { "type": "Input.ChoiceSet", "id": "peoplepicker", "isRequired": true, "isMultiSelect": true, "label": "Select who to assign the approval to:", "errorMessage": "Select the user to reassign the workflow", "choices": [ { "title": "Custom Profile 1", "value": "Profile1" }, { "title": "Custom Profile 2", "value": "Profile2" } ], "choices.data": { "type": "Data.Query", "dataset": "graph.microsoft.com/users" } } ], "actions": [ { "type": "Action.Submit", "title": "Send", "data": { "Action": "Reassigned", "SPListItemID": "@{triggerOutputs()?['body/ID']}" } } ], "$schema": "adaptivecards.io/schemas/adaptive-card.json" } } ] } ], "id": "ac_travelrequest" }
@kalohkohan
@kalohkohan Год назад
I got lost in the SPListItemID in step 3. What should I use there?
@DeLucaGiulian
@DeLucaGiulian Год назад
Hi, just rewatch the video, or could you tell me at which specific time are you pointing?
@kalohkohan
@kalohkohan Год назад
28:30. Also, I would be using a dropdown for names (assigning of tasks to). Then a commen section (placeholder?) to provide a comment/resolution to the ticket.
@DeLucaGiulian
@DeLucaGiulian Год назад
​@@kalohkohan The SPListItemID tells you for which element of the list the user is submitting, to add additional fields you can use the adaptive cards designer: www.adaptivecards.io/designer/ You can also follow this other video in the case you want to implement a People Picker: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-gHuqcrzZ0LA.htmlsi=vE1BBXn4A-uwUs2a
@anjelotorres5967
@anjelotorres5967 Год назад
Can you send your JSON adaptive card here? all of it
@DeLucaGiulian
@DeLucaGiulian Год назад
{ "type": "AdaptiveCard", "$schema": "adaptivecards.io/schemas/adaptive-card.json", "version": "1.4", "body": [ { "type": "TextBlock", "text": "New Trip Requested @{triggerOutputs()?['body/Title']}", "wrap": true }, { "type": "TextBlock", "text": "Reason for travel @{triggerOutputs()?['body/ReasonForTravel']}", "wrap": true }, { "type": "TextBlock", "text": "Submitted by @{triggerOutputs()?['body/Requester/DisplayName']}", "wrap": true }, { "type": "TextBlock", "text": "Destination: @{triggerOutputs()?['body/Destination']}", "wrap": true }, { "type": "ActionSet", "actions": [ { "type": "Action.OpenUrl", "title": "Open Request", "url": "@{triggerOutputs()?['body/{Link}']}" } ] }, { "type": "Input.Text", "placeholder": "Comments", "label": "Add the reason of your choice below:", "id": "_comments", "isRequired": true, "errorMessage": "The reason for the approval or rejection must be provided" }, { "type": "ActionSet", "actions": [ { "type": "Action.Submit", "title": "Approve", "id": "_approve", "data": { "Action": "Approved", "SPListItemID": "@{triggerOutputs()?['body/ID']}" }, "style": "positive" }, { "type": "Action.Submit", "title": "Reject", "id": "_reject", "style": "destructive", "data": { "Action": "Rejected", "SPListItemID": "@{triggerOutputs()?['body/ID']}" } }, { "type": "Action.ShowCard", "title": "Reassign", "card": { "type": "AdaptiveCard", "body": [ { "type": "Input.ChoiceSet", "id": "peoplepicker", "isRequired": true, "isMultiSelect": true, "label": "Select who to assign the approval to:", "errorMessage": "Select the user to reassign the workflow", "choices": [ { "title": "Custom Profile 1", "value": "Profile1" }, { "title": "Custom Profile 2", "value": "Profile2" } ], "choices.data": { "type": "Data.Query", "dataset": "graph.microsoft.com/users" } } ], "actions": [ { "type": "Action.Submit", "title": "Send", "data": { "Action": "Reassigned", "SPListItemID": "@{triggerOutputs()?['body/ID']}" } } ], "$schema": "adaptivecards.io/schemas/adaptive-card.json" } } ] } ], "id": "ac_travelrequest" }
@anjelotorres5967
@anjelotorres5967 Год назад
@@DeLucaGiulian Can you provide also the work flow for Reassigned?
@simrankhan3375
@simrankhan3375 Год назад
John
@dileshwarnirmlkar3394
@dileshwarnirmlkar3394 Год назад
a
Далее
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
PERFECT PITCH FILTER.. (CR7 EDITION) 🙈😅
00:21
Просмотров 3,5 млн
How to Manage Tasks using Microsoft Teams
15:18
Просмотров 51 тыс.
👤How to add a People Picker to an Adaptive Card
12:32
Power Automate - Adaptive Cards for Teams!
24:10
Просмотров 1,8 тыс.
CED: часть 1
23:37
Просмотров 97 тыс.