web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating and Updating ...
Power Automate
Suggested Answer

Creating and Updating records in Dataverse from SharePoint

(0) ShareShare
ReportReport
Posted on by 462
Hello All,
 
I have a SharePoint list that is connected to a Power App. I want to move that data to Dataverse. Eventually, we would like to connect directly to Dataverse but right now the data source for the app is SharePoint. I would like to create a flow that adds or updates data in the Dataverse when a record is created or updated in SharePoint. I have found multiple videos on how to import data from SharePoint to the Dataverse but that's not what I'm looking for. I would like to replicate something similar to Reza Dorrani's video Add & Update Excel Data to SharePoint List using Power Automate. If anyone can point me in the right direction, I would greatly appreciate it!
Categories:
I have the same question (0)
  • Suggested answer
    Ninjasabi Profile Picture
    122 on at

    To create a flow that adds or updates data in Dataverse when a record is created or updated in SharePoint, you can use Power Automate to achieve this. Here’s a step-by-step guide to help you set up the flow:

    1. Trigger the Flow:

      • Use the "When an item is created or modified" trigger for SharePoint.
      • Site Address: (your SharePoint site)
      • List Name: (your SharePoint list)
    2. Get the Item Details:

      • Action: Get item
      • Site Address: (your SharePoint site)
      • List Name: (your SharePoint list)
      • Id: ID (from the trigger)
    3. Check if the Record Exists in Dataverse:

      • Action: List rows (Dataverse)
      • Table Name: (your Dataverse table)
      • Filter Query: sharepoint_id eq 'ID' (assuming you have a column in Dataverse to store the SharePoint item ID)
    4. Condition to Check if Record Exists:

      • Action: Condition
      • Condition: length(body('List_rows')?['value']) is greater than 0
    5. If Record Exists, Update the Record:

      • Action: Update a row (Dataverse)
      • Table Name: (your Dataverse table)
      • Row ID: first(body('List_rows')?['value'])?['dataverse_id'] (assuming dataverse_id is the unique identifier in Dataverse)
      • Map the fields from SharePoint to Dataverse
    6. If Record Does Not Exist, Create a New Record:

      • Action: Add a new row (Dataverse)
      • Table Name: (your Dataverse table)
      • Map the fields from SharePoint to Dataverse, including the SharePoint item ID

    Here is a more detailed breakdown of the steps in Power Automate:

    1. Trigger:

      • Action: When an item is created or modified
      • Site Address: (your SharePoint site)
      • List Name: (your SharePoint list)
    2. Get Item:

      • Action: Get item
      • Site Address: (your SharePoint site)
      • List Name: (your SharePoint list)
      • Id: ID (from the trigger)
    3. List Rows (Dataverse):

      • Action: List rows
      • Table Name: (your Dataverse table)
      • Filter Query: sharepoint_id eq '@{triggerOutputs()?['body/ID']}'
    4. Condition:

      • Action: Condition
      • Condition: length(body('List_rows')?['value']) is greater than 0
    5. If Yes (Record Exists):

      • Action: Update a row
      • Table Name: (your Dataverse table)
      • Row ID: first(body('List_rows')?['value'])?['dataverse_id']
      • Map the fields from SharePoint to Dataverse
    6. If No (Record Does Not Exist):

      • Action: Add a new row
      • Table Name: (your Dataverse table)
      • Map the fields from SharePoint to Dataverse, including the SharePoint item ID

    This approach ensures that your Dataverse table is updated with the latest data from SharePoint, whether it’s a new record or an update to an existing record.

    If you need further clarification or run into any issues, please let me know!

  • nleuck_101 Profile Picture
    462 on at
    I'm getting the following error:


    It's not finding the column in my Dataverse named SharePoint_ID
  • nleuck_101 Profile Picture
    462 on at
    I solved my previous error but now I'm getting this error when I update a record. Any ideas?



  • nleuck_101 Profile Picture
    462 on at
    Nevermind I solved that issue as well. This part in your example was failing for me.

  • Ninjasabi Profile Picture
    122 on at
    Glad you came right! Nicely done 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 464

#2
Haque Profile Picture

Haque 416

#3
David_MA Profile Picture

David_MA 323 Super User 2026 Season 1

Last 30 days Overall leaderboard