{"id":2991,"date":"2018-08-27T08:00:57","date_gmt":"2018-08-27T08:00:57","guid":{"rendered":"http:\/\/himbap.com\/blog\/?p=2991"},"modified":"2018-09-03T09:21:01","modified_gmt":"2018-09-03T09:21:01","slug":"uploading-data-to-dynamics-365-using-microsoft-flow","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=2991","title":{"rendered":"Uploading data to Dynamics 365 using Microsoft Flow"},"content":{"rendered":"<p><strong>Introduction<\/strong><br \/>\nIn this article we will discuss how we can create data in Dynamics 365 CE using Microsoft Flow using excel file.<\/p>\n<p><strong>Requirement<\/strong>: Let\u2019s say we have requirement to read excel file from one drive for business and create Dynamics 365 CE contacts. We have contact.xlsx file in one drive for business having following fields<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3239 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload1-300x138.png\" alt=\"upload1\" width=\"300\" height=\"138\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload1-300x138.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload1.png 414w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Solution<\/strong>: We can easily implement this using Microsoft Flow using following quick steps. let&#8217;s follow below steps to use Flow to read file and create contact records.<br \/>\n1. Navigate to Flow from Dynamics 365 CE and select Create from blank option.<br \/>\n2. First we will be adding a one drive for business trigger to check if file is created to specific one drive for business folder, we will be using root folder of one drive for business, so let&#8217;s select below trigger<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3240 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload2-300x188.png\" alt=\"upload2\" width=\"300\" height=\"188\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload2-300x188.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload2.png 426w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n3. Once we have trigger defined, we need to add action to get rows from the excel file and need to select file and write our table name from excel<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3241 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload3-300x171.png\" alt=\"upload3\" width=\"300\" height=\"171\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload3-300x171.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload3.png 584w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload11.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3260 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload11-300x144.png\" alt=\"upload11\" width=\"300\" height=\"144\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload11-300x144.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload11-624x300.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload11.png 886w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n4. Now we need to add Apply to each steps to process rows, so add Apply to each from\u00a0more actions<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3242 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload4-300x79.png\" alt=\"upload4\" width=\"300\" height=\"79\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload4-300x79.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload4-624x164.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload4.png 844w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n5. After process rows, we need to get values and need to create contact record<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload5.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3243 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload5-300x159.png\" alt=\"upload5\" width=\"300\" height=\"159\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload5-300x159.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload5.png 577w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nAfter selecting our Dynamics 365 organization and Contacts, we need to set field using expression like below based on the column name in excel file<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload6.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3244 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload6-300x62.png\" alt=\"upload6\" width=\"300\" height=\"62\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload6-300x62.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload6-624x129.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload6.png 985w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n6. Finally, delete file once record is processed<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload7.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3245 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload7-300x58.png\" alt=\"upload7\" width=\"300\" height=\"58\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload7-300x58.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload7.png 546w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>After configuring all the steps it should like following<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload8.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3246 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload8-300x267.png\" alt=\"upload8\" width=\"300\" height=\"267\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload8-300x267.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload8.png 563w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Currently in Dynamics 365, We don&#8217;t have any records under My Active Contacts<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload9.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3247 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload9-300x67.png\" alt=\"upload9\" width=\"300\" height=\"67\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload9-300x67.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload9-624x139.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload9.png 811w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nOnce we will upload file to one drive for business, we can see records after few mints<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload10.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3248 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload10-300x147.png\" alt=\"upload10\" width=\"300\" height=\"147\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload10-300x147.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/upload10.png 513w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this article we will discuss how we can create data in Dynamics 365 CE using Microsoft Flow using excel file. Requirement: Let\u2019s say we have requirement to read excel file from one drive for business and create Dynamics 365 CE contacts. We have contact.xlsx file in one drive for business having following fields Solution: We can easily implement&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=2991\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":3231,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,402,522,593],"tags":[605,602,607,600,603,606,604],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2991"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2991"}],"version-history":[{"count":8,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2991\/revisions"}],"predecessor-version":[{"id":3263,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2991\/revisions\/3263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/3231"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}