Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Unanswered

Flow hangs trying to read Excel Document on OneDrive

(0) ShareShare
ReportReport
Posted on by 10

I'm trying to create a flow that accomplishes the following:

 

1) Users e-mail a .xlsx to a monitored e-mail address. They will use a template worksheet that has a data table so the table name will be consistent with every submission.

2) When a new e-mail arrives, if there is an attachment with "Confirmation" in the name, that attachment is copied to a OneDrive for Business Folder.

3) A "when a new file is created" trigger is monitoring for when the file is created in OneDrive and then Get Rows is used to read the file and enter the contents of that attachment to a SharePoint List.

4) After the data from the .xlsx is loaded to the SharePoint list, the file is duplicated in an archive folder and the original is deleted. 

 

The issue is the flow will work very randomly.  It keeps get hung on the "When a file is created" step. See the second screenshot below, I deleted the file after it was running for over 45 minutes to capture the error.  We're only dealing with 2 records in the spreadsheet - so not a ton of data.

 

What should I do to avoid the issue it's having getting stuck on "When A File Is Created"?

 

1) Flow layout:

Flow 1.jpg

 

2) Flow stuck on file creation - it shows an error on apply to each, but that happens when I deleted the file from OneDrive:

Flow 1.jpg

  • GabrielStJohn Profile Picture
    on at
    Re: Flow hangs trying to read Excel Document on OneDrive

    Hey, @MW630!

     

    Thank you for posting on the Flow Community Forum! It appears as though @v-yamao-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!

     

    Thank you for being an active member of the Flow Community!

     

    -Gabriel
    Flow Community Manager

  • v-yamao-msft Profile Picture
    on at
    Re: Flow hangs trying to read Excel Document on OneDrive

    Hi @MW630,

     

    Could you share a screenshot of your current flow?

     

    In the action Create item, are you trying to populate value into a library but not a list?

     

    Best regards,

    Mabel Mao

  • MW630 Profile Picture
    10 on at
    Re: Flow hangs trying to read Excel Document on OneDrive

    @v-yamao-msft Thank you for the suggestions.  

     

    I am receiving the following error when it tries to create the SharePoint List item.  Any suggestions?

     

      "status"400,
      "message""To add an item to a document library, use SPFileCollection.Add()\r\nclientRequestId: 26368ef2-88ac-4cdc-b392-a3ce59ecbbc6\r\nserviceRequestId: e02c899e-a097-6000-ee8a-3eaf83c71d38"

  • v-yamao-msft Profile Picture
    on at
    Re: Flow hangs trying to read Excel Document on OneDrive

    Hi @MW630,

     

    Thanks for giving the detailed scenario on your flow. According to your description, I have made the following flow for your reference.

     

    Please just remove the trigger When a file is created from your flow. After the action Create file, add the action Create item directly.

     

    As you mentioned that all the attachments have the same table name, do they have the same column names?

     

    If yes, then in the action Create item, use the following functions to get items:

    For Title: item()?['name']

    For date: item()?['date']

     

    The items will be created successfully in the SharePoint list.

    1.PNG2.PNG

     

     

    Please try it on your side and feel free post back if you need more help.

     

     

    Best regards,

    Mabel Mao

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492

Featured topics