cancel
Showing results for 
Search instead for 
Did you mean: 
DeviKrishna

Get Files from File Column in Data Verse using Power Automate

Pre-requisites:

 Create a SharePoint Site and a document folder to place the documents.

https://bgsw2022.sharepoint.com/sites/demo/Shared%20Documents/Forms/AllItems.aspx

 

  • Login to https://make.powerapps.com
  • Create a table in Data Verse ‘ProfileDetails’
  • Add a Column(‘ProfileDoc’) of Data type ‘File’

DeviKrishna_0-1650381595658.png

Create few sample records.

DeviKrishna_1-1650381628306.png

 

DeviKrishna_2-1650381638724.png

  • The record got created successfully and the attachment is seen on the file column.
  • Now let’s create a Power Automate flow that will be triggered on create/update of the entity ProfileDetails.
  • Navigate to Solutions-> Create new Solution->Add New->Cloud Flow
  • Follow the below steps,
  • DeviKrishna_3-1650381688454.png

     

  • Click on Save and Test.
  • Open the Run History of Flow. Click on the latest record and open it.

DeviKrishna_4-1650381741011.png

  • Navigate to Get a Row by ID step ->Outputs.
  • Copy the body completely.

DeviKrishna_5-1650381766356.png

  • Add a new step below Get a Row by ID to Parse JSON,
  • Click on Generate from Sample. Copy the body from above step and click on done.
  • Pass the body(‘Get_a_Row_by_ID’) to content

DeviKrishna_6-1650381791144.pngDeviKrishna_7-1650381801119.png

 

  • Add the next step as Microsoft Dataverse trigger , ‘Download a file or an image’
  • Pass the Entity name that has the file column as Table Name.
  • Pass the Row ID that we received from previous step.
  • Choose the column name (File Column).

DeviKrishna_8-1650381828239.png

  • Add the next step as SharePoint trigger – Create File.
  • Pass the Site Address and folder path.
  • Search for the FileName from Dynamic Content parse JSON step.

DeviKrishna_9-1650381855007.png

  • Pass the body(‘Download_a_file_or_an_image’) to the file content.
  • Now save the flow.
  • Create a record to ProfileDetails table. Upload attachment to file column.
  • The flow gets triggered and creates the document in SharePoint.
  • DeviKrishna_10-1650381887021.png

    Flow Complete steps:

  • DeviKrishna_11-1650381903712.png

     

    The flow to get Files from File Column in Data Verse using Power Automate is successfully created.