Communicate with cards in Teams
The vacations season is approaching fast, and Managers may need to collect everyone’s leave dates to plan ahead. There are proven ways you would know to collect this data, manually or with simple automations. But what if you can just click a button and everyone gets a card in Teams, that collects this information and records it in a calendar inside Microsoft Teams?
Using Microsoft Lists, Power Automate and Adaptive cards you can set up an automated workflow that sends a card to each team member requesting their leave dates thereby simplifying this yearly exercise.
The card can be customized with specific fields for the team member to fill out, such as start and end dates, reason for leave, and any other relevant information.
Create an Adaptive card
Adaptive cards are a new way to exchange rich and contextual information in Teams and several other applications.
To design and create your card, head to the card designer https://adaptivecards.io/designer/
Create a new card, select from blank and copy paste the below JSON in the editor
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Leave dates",
"wrap": true,
"fontType": "Default",
"size": "Medium",
"weight": "Bolder",
"color": "Dark",
"isSubtle": false
}
]
}
]
}
],
"backgroundImage": {
"url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAHwA3AMBEQACEQEDEQH/xAAbAAACAwEBAQAAAAAAAAAAAAADBQACBAYBB//EAEQQAAEDAgMEBgYHBQcFAAAAAAEAAgMEEQUSIQYxQVETImFxgZEyQlKhscEUIzNicoLRFUNTkuEWJFRzg8LwJUSTovH/xAAaAQADAQEBAQAAAAAAAAAAAAAAAgMBBAUG/8QANhEAAgECAwQIBgICAgMAAAAAAAECAxEEITESE0FRBRQyYXGRofAiQlKBsdHB4T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BwYOQTRwkfmdxZ9KVLWppR8AJLnnrEk9pV404R0RwTr1amcmQMPAJ7krou2Bx4IEc0FZRucQLEd4RmG2F+hvZpk15os2Y6ljz6E/kVuyLvDw0TvYRsmb0o6h+6EbBqrWAyYffcpukUWIMklFI3cCpSpsvGtFmZ7JGbwVJprUsnFnjZXsNwSDzBWXN2c8hvRbRV1Ozo5Hioh/hzDMEaO6LKtNLZlmu8Zx41hr2h0kdRC472Rvu0d110RxFVLU53Rwsndprw0F72NvuXnxPdrGWZguNF1U0ePiXYa4dhlPNC2V+ck8AbBRr15021E7MFgqVWKlK44pqCmjv0cYb3DXz3rhlWqTV2z16eFo0+zFGmOFme1vHeUsIpysx6ktmLa4Ela2O9hcjidV2TjGlG8UcFGUsTK027dwrikkro5pJ3usw6MabA9/H3qUpSbV3qUhCMVNpae/ETV9dNG10cWWNgHosFh/VdUacVmeNWxNSctm9l3CqDNVm8z3a8AbBVoQVXtEp2p9lDKlpYWtJawCyXE1HRdoHf0fhaeJW3Vuywmdnyts0W9XRZRpRqLanmUxmJlhmqdFJLwByOLn9Y3XeoRgsjxJValTObuVHaVpMNDG1x1CUnKTQzp6KEgXBPigILa1GEdBTi3URctuomqOkh9hFzd3HkaG0kPsouNsRCMpYjvai5u7iX+iQ+ytubu4lHUkPsrUxdiICSlhB9AJ0TdOJllpIfZTJkZUYmOemiA3J9lM5prZeQuqaaK25TnTiPTqSFNRBGHGzVyThG53QqSsYnNDXWCg1Y6U7kutFP/Z",
"verticalAlignment": "Center"
},
"bleed": true
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "Input.Date",
"id": "startDate",
"isRequired": true,
"label": "From",
"errorMessage": "Required"
}
]
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "Input.Date",
"id": "endDate",
"isRequired": true,
"label": "To",
"errorMessage": "Required"
}
]
}
]
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"style": "positive"
}
]
}
]
}
This shows you how the card you just created looks.
Create a list of Team members
Open Microsoft Lists. Click on “New List” and select “Start from a blank list” from the given options. Name your list “Team members” and add the names of your team members.
Title is the system default and Person is a column of type person.
Create a list to record leave dates
Create a new list in your SharePoint teamsite with the below columns.
Title is the system default and from and to are date columns.
Create a Power Automate flow
Give your flow a name and set up the trigger and actions below.
The most obvious method to get a list of team members reporting to a manager is by using the “Office365 users” connector actions shown below.
But sometimes team members consists of people working on projects across teams, so I have shown an alternative method using lists.
The “Get items” action in the flow is to collect all team members details from the List.
The “Apply to each” is to send them each a card in Teams and then record their response in a SharePoint list.
Within the “apply to each”, the “Post adaptive card and wait for a response” action is the action which sends the card to the team member in a chat message in Teams
Paste that JSON from above into the message box of this action and set the recipient as “Person email”, one of the dynamic values you get the “Get items” action in the Power Automate flow.
Within the “apply to each”, add the next action to record the leave dates to the SharePoint list created above.
Select the site and list and set the columns in the list to get values dynamically from the adaptive card action in the Power Automate flow.
Save the flow.
Send the adaptive card
When you are ready to send everyone the card, run the flow.
This sends the adaptive card as a chat message in Microsoft teams to each of the team members in your list.
When everyone enters their leave dates and submit the information is recorded in the list.
With a bit of formatting of the list you can produce a calendar view shown below. You can follow this quick guide on how to create a calendar view
With a little bit more you can bring the leaves tracker into your Teamsite and Microsoft Teams for everyone’s quick access.
Overall, using Adaptive cards in Teams with Power Automate and Microsoft Lists can simplify the process of collecting and organizing leave dates for Managers, and ensure that everyone’s time is efficiently utilized when planning for the vacation season.