Integration of Microsoft Teams with Dynamics 365 (Part II)
Today’s article is a second part related to the integration of Dynamics 365 and Microsoft Teams. Remember, in my previous article, I put in the picture how to set basic integration that enables seeing views and forms from Dynamics365 in Teams directly?
This article explains other enhancements of Teams and Dynamics365 integration. More specifically - I will observe the settings that allow to:
Display user tasks from Dynamics 365 in Teams Planner.
Receive automatically created posts notifying that a new case for a contact has been created.
Let's proceed to find out how to build these two features.
Feature 1
First, add Planner App to Teams Channel. Click plus button
Select Planner App and specify Tab Name
Click Save
Planner appears as a tab in Team Channel. Find an existing template and open up the flow (Dynamics Activities to Planner Tasks)
Select and click Continue. Now we need to customize existing connectors and actions. (Remember that you need to reset all fields in this flow with your organizations' attributes even if they are filled, otherwise, the flow will not run successfully). Select Organization Name.
Select Task from the list as a primary entity. Get record and define Item Identifier as a Task
Enter the email to specify a valid Office 365 user in the Get user profile connector. Specify parameters as needed for the Planner connectors.
Plan Id - select Task Bucket Id - select To Do Start Date - reset Start Date Due Date - reset Due Date Assigned User Ids - set Mail
The same for no assignment - leave Assigned User Ids empty. Click Save and Test.
Select - I’ll perform the trigger action. Click Save and Test.
Navigate to Dynamics. Create a new Task and navigate to Run History of the flowYou can try another way and add tasks directly from Teams using the Dynamics record tab. Click plus ‘button’ on Timeline and select Task.
Specify all parameters as needed and click ‘Save’
You have created a new task for this Account. It might take a few minutes for the flow to get applied. Navigate to Flow and check Run History. A new item has appeared. Return to Teams Planner - a new task has been automatically created as well.
Feature 2
The next goal is to receive posts (including the Title and Name of the associated Contact) notifying that a new case has been created for Contacts (Accounts). These posts will get formed in the Teams Channel automatically.
To set this feature - Create a simple flow process in Power Automate Portal. Create a new automated flow
To set this feature - Create a simple flow process in Power Automate Portal. Select When a record is created trigger for that.
Build Flow
A New Case record has been created.
Select Cases entity from the list here. Add the next step to get the Contact details - our related Contact Full Name – Get record. Select Contacts as an entity. Choose Customer field as the Item Identifier to get the exact lookup record from the Case.
Make sure this Customer field is not empty – add a short Condition step. In this condition, we check our Customer field from “When a record is created” section using an Expression to make sure it is not null. If the result of the condition is True – add a Post a message step, and specify Teams members (Consulting). Channel - Sales Team. Write a custom message for the post in the Message field.
Click Save and Test Select I’ll Perform trigger action, Save, and Test. Create a new Case directly from Teams (already added Contact tab). Select Cases and click New Case. Specify all needed attributes for your Case.
The flow will run successfully. If you go back to Teams, you will see that an automatic post (with Title and Contact name) has been created. Another example: Create a case for a different contact in Dynamics CRM Hub. Repeat the same procedure as we did in the Teams tab (create a Case). Save a new Case and go back to Teams Channel. It might take time for a flow to get applied. The new post has appeared in the Teams Channel.
Checked
That is all. I hope this information was useful. As you can see, the procedure is not that difficult. Yet, if you have any questions - contact us, and we will be glad to help you.