Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

(4) ShareShare
ReportReport
Posted on by

I currently have a flow which:

- Receives email. 

- Saves attachment to SharePoint as .xlsx.

- Runs an excel script to convert the XLSX range to a table.

 

This works fine up to the execution of the script where I receive the error message:

"Graph Item not found, was it unshared or deleted?\r\nclientRequestId: ab7d8b91-be2c-4e96-973c-e7c7ffadaf37"
 
Manually opening the .xlsx file within Sharepoint and executing the script works with no issues.

 

Is anyone able to assist with troubleshooting?

 

 

  • waytu Profile Picture
    6 on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    It could be the case that you browsed to the script file in the script location box on the script Flow step and selected it, saved the Flow and then, afterwards, updated the script file? This may cause the step to no longer be able to find the script file. If you have updated that script file the Flow step may be looking for its original SharePoint DocumentId and that could have altered when the script file was updated. I had a similar issue but it was with File in the script Flow step because I replace the File every time the Flow runs. I overcoming this by putting the File value for the script job step into a variable and using the variable in the script Flow step File input box (see image).

  • RP5 Profile Picture
    on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    Can you share what this looked like?

    I'm having the same issue-

    Converted MS form response to a multi-sheet workbook.  Save it under a new name, run a script to delete the un-needed input sheets, and email the complete sheet back out.

    It worked fine up until last Fri, now the run script flow step fails even though the script itself runs fine in a web browser.

  • Dazza_Aus Profile Picture
    30 on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    Hi everyone,

    I just re "addressed" the file location and this fixed the flow. (once anyway!!!)

    Will test again tomorrow!

    cheers

  • waytu Profile Picture
    6 on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    I ran into this issue and it took a few hours to determine the cause. In my case I was copying an Excel workbook in SharePoint online and then completing processing on that copied file, importing data from it and then deleting it. I determined the cause to be that I had browsed to a copy of that temporary file and selected it within my Flow steps and then saved the Flow. As far I can determine when you do that what is actually saved is the SharePoint DocumentId. Because my Flow created and deleted the file that DocumentId changed every time it ran so it could not find the Workbook. I fixed it by initialising a string variable and storing the document location within it, I guess, forcing it to parse at runtime as opposed to save time. I guess that is how MattLincoln solution works too.

  • PaulMc1 Profile Picture
    3 on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    This worked perfectly for me. Thank you for posting!

  • GetsugaTenshou Profile Picture
    7 on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    Hello Matt,

    Please share some guidance on how I get the file name to concatenate, the file name that I get when I view the file on OneDrive online vs when using OneDrive via my file explorer window, differs and I can't seem to get it to work. 

  • Munyiva Profile Picture
    35 on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    I got the file properties then used the Full Path output to ran my script.

    Munyiva_0-1689923480268.png

    Munyiva_1-1689923551419.png

     

     

  • davidparsons Profile Picture
    2 on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    This can be caused if the location you are referencing has more than 100 items within the folder. I resolved by creating a new folder within the library and moving the script to there then running it within my power flow. 

  • Community Power Platform Member Profile Picture
    on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    I too have same error

  • Corbitbeeler Profile Picture
    47 on at
    Re: Excel Online (Business) - Run Script Error - Graph Item not found, was it unshared or deleted?

    For a heads up with people if you wish to try and use a Script from a Sharepoint site it looks to be available now. You can now run scripts directly from Sharepoint sites which has worked greatly for me.

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