Power Automate Creating a List of Gifts Added Yesterday

I'm trying to replicate a query we have in database view using Power Automate. The query simply gets all the gifts entered into the database yesterday.

Everything goes fine until the final step, the actual list creation. The array of Gift IDs I generate is not directly available to use in the IDs section of the Create List box for some reason, so I tried to use the output from a Compose box instead. It looks like, however, it's creating some sort of looped or nested array (note the [[ in the output of IDs). It is an array of integers.

Any advice or insight? Screenshots are below

The error:

[{"Message":"One or more identifiers provided were not in the expected format. All identifiers should have a type of 'integer'","ErrorName":"AppendIdsToListRequestInvalidNumberOfIds","ErrorCode":400,"RawMessage":"One or more identifiers provided were not in the expected format. All identifiers should have a type of 'integer'","ErrorArgs":[]}]

7bf28a7fe98dca811c01d586ad8383a5-huge-im

The flow itself (skipping the recurrence box at the beginning):

7e409d8eaef90aa0e7bdb1638f677e4a-huge-im
7d3502a7c267601ada3edda13e2e67ef-huge-im
57d31a07e87d158df605db8443059d83-huge-im
77562cf5c3aec418fba087420d610fdc-huge-im

TY in advance!

Comments

  • Hey @Emmet OConlon, looks like you're converting your ID's to integers. The parameter for the ID's is an array of string values.

    b344826778872317edd100b942050577-huge-im


  • Alex Wong
    Alex Wong Community All-Star
    Tenth Anniversary Kudos 5 Facilitator 4 bbcon 2025 Attendee Badge

    @Emmet OConlon
    A few issue you have here, but i'm going to touch on only the error you got. So either you can fix that error or read the bottom for a more efficient way to do this without looping each gift.

    The Create a list from a set of records expects an array of STRING, not integer. But that's not your first issue. Your first issue is, you passed in an ARRAY of ARRAY of integers.

    [[1,2]]

    Instead, it is expecting an ARRAY of STRING only

    ["1", “2”]

    So you can fix your flow to have array of string (basically just need 1 variable, and append to that 1 array variable the “ID” property which is STRING already.

    OR

    You can easily do this with the SELECT data action of flow:

    682221eb5a8596a4514a3de6133ff4a2-huge-im
    3 steps and you are done
  • @Alex Wong @Matt Thacker Thank you both! I have it working now. I didn't realize I had to toggle the options on the ID(s) list. That's why I was getting the array of array error. Alex, your solution though is so much better and more elegant :-)

    Weird that Microsoft gave me that error message about integers needed, but hey…

Categories