cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Deleting a sharepoint item returns a 404

I am currently having this issue and I am not sure why this is happening.

 

In short, I am calling this flow on a PowerApp on a step where a user chooses to delete an entry on a Sharepoint list. Each Entry has a column with the path to an image.

 

With this in mind i figured that using a flow would be the friendliest  and quickest way to delete this file. As you can see below the steps are simple, one var for debugging sake and the deletion connector itself
delete photo from sharepoint.PNG

Here's where the trouble arises, whenever I try to run this I get a 404 error:

{
  "error": {
    "code": 404,
    "source": "europe-002.azure-apim.net",
    "clientRequestId": "ff47d7da-8bfa-4fd5-9482-b5decb9053d7",
    "message": "The response is not in a JSON format.",
    "innerError": "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
  }
}

delete photo from sharepoint fail 1.PNGdelete photo from sharepoint fail 2.PNG

I tried running the deletion connector by selecting the files manualy and it worked, I double checked the path text and they matched which left me confused.

Does anyone have an idea of what I am doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @MangoMan09 

 

You can't pass the filename as file identifier for deleting the file. You need the id of the file. You can get the id using 'Sharepoint - Get Items' flow action using the filter query matching the filename.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

4 REPLIES 4
Super User III
Super User III

Hi @MangoMan09 

 

You can't pass the filename as file identifier for deleting the file. You need the id of the file. You can get the id using 'Sharepoint - Get Items' flow action using the filter query matching the filename.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

Thanks @abm that really nudged me on the right path!

 

I was still unable to get the identifier to work directly after that but this tutorial helped me with the logic: https://powerusers.microsoft.com/t5/General-Discussion/Delete-SharePoint-document-library-document-u...

For those those who might need it here's the added steps:
delete photo from sharepoint fix.PNG

Hi @MangoMan09 

 

Good to know that you managed to resolve it. 

 

Please mark it as accepted answer and it help others in the community.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

old stuff for you but still : thanks so much for posting your findings - i've been struggling for ages ....

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (80,351)