{"id":246,"date":"2022-01-07T13:23:36","date_gmt":"2022-01-07T13:23:36","guid":{"rendered":"https:\/\/blog.citrus-lime.com\/crmc\/?p=246"},"modified":"2022-01-07T13:23:36","modified_gmt":"2022-01-07T13:23:36","slug":"using-power-automate-to-create-a-new-channel-for-a-record-in-dynamics","status":"publish","type":"post","link":"https:\/\/blog.citrus-lime.com\/crmc\/using-power-automate-to-create-a-new-channel-for-a-record-in-dynamics\/","title":{"rendered":"Using Power Automate to Create a New Channel for a Record in Dynamics"},"content":{"rendered":"\n<p>Power Automate is a fantastic tool for implementing Cloud Workflows by linking lots of different systems or platforms together using JSON Messages and REST Endpoints.<\/p>\n\n\n\n<p>This can be particularly effective in the Microsoft Cloud to help integrate Apps together into a single solution.<\/p>\n\n\n\n<p>In this example, we can build a Flow in Power Automate that creates a new Channel in Microsoft Teams for each Project Record added to Dynamics.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_213A9EDA.png\"><img decoding=\"async\" src=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_thumb_1CC41E13.png\" alt=\"image\" title=\"image\" \/><\/a><\/figure>\n\n\n\n<p>This is actually a pretty simple use of Power Automate:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>(1)&nbsp;<\/strong>Trigger a Flow whenever a New Project Record is created.<\/p><p><strong>(2)&nbsp;<\/strong>Find a particular existing Team with the Name \u2018Contonso\u2019<\/p><p><strong>(3)&nbsp;<\/strong>Create a new Channel in this Team titled after the Project Record.<\/p><p><strong>(4)&nbsp;<\/strong>update the Project Record to insert the ID of the Team and the ID of the newly created Channel back into the Record in Dynamics.<\/p><\/blockquote>\n\n\n\n<p>In action, this then looks like:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>We create the Project in Dynamics or Power Apps.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_3868AA09.png\"><img decoding=\"async\" src=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_thumb_4A453DD6.png\" alt=\"image\" title=\"image\" \/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>This creation event triggers our Flow and creates the Channel under our existing Team<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_50F84759.png\"><img decoding=\"async\" src=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_thumb_53A1030A.png\" alt=\"image\" title=\"image\" \/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>The Team ID and Channel ID being saved in the Project.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_136AE990.png\"><img decoding=\"async\" src=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_thumb_6C30A05A.png\" alt=\"image\" title=\"image\" \/><\/a><\/figure>\n\n\n\n<p>This gives us a simple way of driving Teams from Dynamics.<\/p>\n\n\n\n<p>The key element here is (4) in keeping a record of the Channel ID and Team ID in the Dynamics Record \u2013 as we can now use this to implement various communications from Teams to Dynamics, or from Dynamics to Teams.<\/p>\n\n\n\n<p>We can do this using Flow and the Flow Bot for Teams to post Messages to our new Channel, and this is available to us purely via Power Automate.<\/p>\n\n\n\n<p>But we can extend this much further by the use of a good Teams Bot.<\/p>\n\n\n\n<p>The Bot can exist in the Channel and then know that the context of this Channel is this particular Project \u2013 which means that Messages to the Bot in the Channel can then drive logic in Dynamics, or vice versa for changes in Dynamics or Power Automate to post messages to the Channel via our Bot.<\/p>\n\n\n\n<p>We can see more of this here in our series of articles dedicated to Developing a New Teams Bot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Power Automate is a fantastic tool for implementing Cloud Workflows by linking lots of different systems or platforms together using JSON Messages and REST Endpoints. This can be particularly effective in the Microsoft Cloud to help integrate Apps together into a single solution. In this example, we can build a Flow in Power Automate that<\/p>\n","protected":false},"author":43,"featured_media":35,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"footnotes":""},"categories":[3],"tags":[],"class_list":{"0":"post-246","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-crm"},"featured_image_src":"https:\/\/blog.citrus-lime.com\/crmc\/wp-content\/uploads\/sites\/30\/2021\/11\/Dynamics-365-Consultancy.jpg","author_info":{"display_name":"jadesmith","author_link":"https:\/\/blog.citrus-lime.com\/crmc\/author\/jadesmith\/"},"_links":{"self":[{"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/posts\/246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/comments?post=246"}],"version-history":[{"count":1,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/posts\/246\/revisions"}],"predecessor-version":[{"id":247,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/posts\/246\/revisions\/247"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/media\/35"}],"wp:attachment":[{"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/media?parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/categories?post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/tags?post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}