Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Reading just-created One Drive excel

(0) ShareShare
ReportReport
Posted on by 3

Hello There!

Im having some issues trying to read a file which has just been created in the same flow.
The full context is: I need to fill a Sharepoint List with excel content (either attached via Form or another Sharepoint List) (if someone knows a better way plz tell me)

So far the flow is:

  1. A user creates an item in Sharepoint List "1" with an Excel attachment.
  2. A flow is triggered, downloads the attachment (and as it cant read it as-is)
  3. Uploads the file to OneDrive
  4. Open and reads that file from OneDrive
  5. Iterates the rows
  6. Each of those rows ar parsed as Json to work with the elements (hardcoded column names as those are unknown at this point)
  7. With the row info insert a new item in Sharepoint List "2"

Im having some trouble implementing points 6 and 7, so far this is what i got:

 

Fradantim_0-1654810407868.png

{
 "type": "object",
 "properties": {
 "body": {
 "type": "object",
 "properties": {
 "value": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "@@odata.etag": {
 "type": "string"
 },
 "colA": {
 "type": "string"
 },
 "colB": {
 "type": "string"
 },
 "colC": {
 "type": "string"
 },
 "colD": {
 "type": "string"
 },
 "ColE": {
 "type": "string"
 },
 "colF": {
 "type": "string"
 },
 "colG": {
 "type": "string"
 },
 "colH": {
 "type": "string"
 },
 "colI": {
 "type": "string"
 }
 },
 "required": [
 "@@odata.etag",
 "colA",
 "colB",
 "colC",
 "colD",
 "colE",
 "colF",
 "colG",
 "colH",
 "colI"
 ]
 }
 }
 }
 }
 }
}

Output from List rows present in a Table is sent to Parse JSON and maps it:

 

Example when I run it;

Fradantim_1-1654810798045.png


And next operation where I need to use the row info:

Fradantim_2-1654810860202.png

Fails with:

ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON')?['body']?['value']' is of type 'Null'. The result must be a valid array.


Hope someone can nail down the problem.

Thanks in advance fot your time.

  • Fradantim Profile Picture
    3 on at
    Re: Reading just-created One Drive excel

    Sorry for the delay, indeed this was a solution.

    Thx!!!

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at
    Re: Reading just-created One Drive excel

    Hi @Fradantim,

    Do you want to save the new created/modified attachment to OneDrive and sync the data with another SharePoint list?

     

    If so, I think you could directly create item based on the excel file you created in the OneDrive, please check the following flow demo:

    vqiaqimsft_3-1655108420638.png

    Add Get attachments and Get attachment content to get the attachment name and attachment content:

    vqiaqimsft_5-1655108739615.png

    vqiaqimsft_6-1655108889524.png

    vqiaqimsft_7-1655109056285.png

    vqiaqimsft_8-1655109129191.png

    items('Apply_to_each_3')?['Name']

    Note that I want to save the Name column within excel table to the Title column in the SP list.

    Here is the testing result.

    vqiaqimsft_0-1655108238774.png

    vqiaqimsft_1-1655108357385.png

    vqiaqimsft_2-1655108380466.png

     

     

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