Send a message/notification on Microsoft Teams as soon as an Opportunity is created in Dynamics 365 via Azure Logic Apps.
In this blog we will see the steps in order to send a automated message via Teams as soon as an Opportunity is created in Microsoft Dynamics 365.
Step 1: Go to portal.azure.com and select the Azure Logic App Resource.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-14.png)
Step 2: Enter all the details such as the Name, Resource Group, Subscription, Region, etc. required while creating a Logic App.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-15.png)
Step 3: Select the Dynamics 365 trigger When a record is updated.
Step 4: Select Opportunities entity after setting by the Dynamics 365 CRM connection
Step 5: Set the data refresh time as required.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-16.png)
Step 6: Select the IF action in the next step and the condition would be status_label=won for true.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-17.png)
Step 7: Inside True Block select Post a message in a chat or channel option. You can also handle the condition for False block, but in this case we can leave it blank.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-18.png)
Step 8: You can post this message in a Group, Channel or send it as a Personal chat.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-19.png)
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-20.png)
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-21.png)
Step 10: Wait for the trigger successful notification.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-22.png)
Step 11: Go to Dynamics 365 CRM and navigate to opportunities entity.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-23-304x1024.png)
Step 12: Open a test opportunity or create one if doesn’t exist and close the opportunity as won.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-26.png)
Step 13: As soon as you closed this opportunity you may have received the following message.
![](https://www.cloudfronts.com/wp-content/uploads/2022/01/image-28.png)
Hence in this blog we saw how we can send messages on MS Teams using Azure Logic Apps on triggering certain conditions. Hope this helped!