Uploading Data To Dynamics 365 Using Microsoft Flow

Introduction

In this article, we will discuss how we can upload data from an Excel File to Dynamics 365 CE using Microsoft Flow.

Requirement

Let’s say we have a requirement to read an Excel file from One Drive for Business and create the Dynamics 365 CE contacts. We have a contact.xlsx file on the One Drive for Business having the following fields.


Solution

We can easily implement this using Microsoft Flow by just following these quick steps to use Flow to read a file and create contact records.
  1. Navigate to Flow from Dynamics 365 CE and select "Create" from the blank option.

  2. First, we will be adding "One Drive for Business" trigger to check if the file is created to a specific folder. We will be using the root folder of One Drive for Business, so let’s select the below trigger.

  3. Once we have a trigger defined, we need to add an action to get the rows from the Excel file and need to select the file and write our table name from excel.

     
     
     
  4. Now, we need to add "Apply" to each step to process the rows.

  5. After processing the rows, we need to get values and need to create a contact record.


    After selecting our Dynamics 365 Organization and Contacts, we need to set the field using an expression like below, based on the column name in the Excel file.

  6. Finally, delete the file after the record is processed


    After configuring all the steps, it should look like the following.


    Currently, in Dynamics 365, we don’t have any records under "My Active Contacts".

     

    Once we upload the file to One Drive for Business, we can see the records after a few minutes.

Stay tuned for more Dynamics 365 content!!


Similar Articles
HIMBAP
We are expert in Microsoft Power Platform.