Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

How to update a dataverse table with data coming from an external API ?

(0) ShareShare
ReportReport
Posted on by 16

Hi all, 

 

i have a shceduled cloud flow that triggers every 2 days, in the first action a get currencies exchange rates from a custom connector, in the dataverse side i have a table named currency_list (columns : name, code, rate), i would like to update every row of my column with the correct exchange rates, but the two only way i found are : 

1  - Doing a apply to each inside an appy to each (looping through thr rows and also looping through the data)

2 - "Doing update a row" one after another and harcoding the row ID (i need only 8 currencies...)

i also tried to "apply for each" on the table rows then accessing the json data dinamically but i found out that it is not possible.

 

Is there a nice and clean way to do the job without using an "Apply to each" inside another one ? 

Is there a data type that i can generate with a compose that can be accessed dynamically (using a variable) ? 

Thanks for your help !

  • PowerNooob Profile Picture
    16 on at
    Re: How to update a dataverse table with data coming from an external API ?

    I like your idea ! And yes i have only a few rows to update and i know the id in advance, but imagine i have to update 100 rows...

    When i try to "list rows" then "apply to each", i can update the current row with the corresponding rate inside a "update row" by referencing the result of my compose or parse json this way : Outputs('compose')[item()['theCurrencyCodeColumn'] (inside the update row rate filed), but i have an error inside the "update a row" saying that "File or directory not found", knoing that i got the ID from the current element of the "apply to each" (over "list rows"), i also tested that the table column names i'm trying to deal with are correct by trying to select and filter the data inside the list rows (i also have the same error when i try to "get a row by ID" using dynamic data !)

     

  • Chriddle Profile Picture
    7,932 Super User 2025 Season 1 on at
    Re: How to update a dataverse table with data coming from an external API ?

    If you have only a few rows to update (and you already know their Ids) your plan 2 is the way to go (IMHO).

    But I would not add multiple update connectors but create an additional array of objects with row Id and exchange rate (here "DataverseRows") and loop over them.

     

    This looks like this:

    Chriddle_0-1705489739033.png

    Of course, depending on the data structure of the API response, additional steps may be required.

     

  • PowerNooob Profile Picture
    16 on at
    Re: How to update a dataverse table with data coming from an external API ?

    Using your method, i have two additional "for each" that appers in my code ! (screenshot attached)...

  • PowerNooob Profile Picture
    16 on at
    Re: How to update a dataverse table with data coming from an external API ?

    What do you have inside of you Parse Json pease ? In other words what is the structure of your json / array ?

     

  • v-jefferni Profile Picture
    on at
    Re: How to update a dataverse table with data coming from an external API ?

    Hi @PowerNooob ,

     

    Sure. You can use expression to reference GUID of the only row:

    vjefferni_0-1705483540423.png

     

    For other fields, you should be able to select from dynamic contents of Parse JSON.

     

    Just in case that there is no item matching the name in Dataverse table, you will need to use a Condition to check the outputs of List rows:

    length(outputs('List_rows')?['body/value']) is equal to 1
    vjefferni_1-1705483828862.png

     

    Best regards,

  • PowerNooob Profile Picture
    16 on at
    Re: How to update a dataverse table with data coming from an external API ?

    I would like to use only one apply for each if possible, and reference the currency code dynamically in the "update a row" like this Outputs('compose')[item()['code']].

  • v-jefferni Profile Picture
    on at
    Re: How to update a dataverse table with data coming from an external API ?

    Hi @PowerNooob ,

     

    First you can use Parse JSON action to convert the JSON string to an array. In the first Apply to each where looping on this array, Filter array on Dataverse table based on name or code to get the row, then in child Apply to each 2 on this row to Update a row, row id would be:

    items('Applu_to_each_2')?['currency_list']

    currency_list is the unique identifier column in the currency_list table.

     

    Best regards,

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1