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 / Reading just-created O...
Power Automate
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.

Categories:
I have the same question (0)
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    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

     

     

  • Fradantim Profile Picture
    3 on at

    Sorry for the delay, indeed this was a solution.

    Thx!!!

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 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard