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

NotFound - The response is not in a JSON format.

Hi,

 

I have a problem with my Flow, i get the following error message: NotFound - The response is not in a JSON format.
See screenshot below:

UHKOfo1

Flow ErrorFlow Error

 

Even though the file does exists in the document library.

 

7tIwMae

 

Can someone tell me what i'm doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @JakobDahl,

 

Because when delete file will send an HTTP request to SharePoint, so the Identifier of the file should encode to URL formate, so you should replace these "/" to "%2F". So you could use the replace() function to process the file path, for example:

Annotation 2019-12-11 172200.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Community Support
Community Support

Hi @JakobDahl,

 

Could you please share the screenshot of Flow configuration?

What's the action you are using?

This field should be an identifier of the file? sorry for the reason of language, I am not sure, maybe it should be the ID of file. 

Annotation 2019-12-11 110348.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is the flow configuration,

 

I'm getting a value from PowerApps which corresponds to a filename in my document library in sharepoint, and then i proceed to delete the file (Slet fil) from the document librarry

 

d20YIUy

Hi @JakobDahl,

 

Because when delete file will send an HTTP request to SharePoint, so the Identifier of the file should encode to URL formate, so you should replace these "/" to "%2F". So you could use the replace() function to process the file path, for example:

Annotation 2019-12-11 172200.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Perfect! That did the job.

 xSzptwR

Thank you alot @v-litu-msft 

You solved an issue which I am struggling for 20hrs now.

Thank you! Solved my issue as well. 

 

Can't see how to upload any pics to this forum but I am sharing with you my solution, in case anyone else gets the same issue:

 

https://riveratec1-my.sharepoint.com/:i:/g/personal/jrivera_riveratec_com/EQvPBZDmAmdMnPSfiuuptM8BSD...

 

Regards,

 

Jose Angel Rivera

Regular Visitor

Thank you for this information, I am sure it is going to help, but how do covert it when the file name is dynamic?

 

Where would you put the command to to replace?

 

ocmcadams_0-1600215385158.png

 

Hello, thank you for posting, this is very helpful.  I am still having a problem with getting this JSON error.  My question is the "compose_2" the actual file name?  I don't have a compose, but I have a Create File that I am using.  The file name is using dynamic information from a Form submitted.

Thank you for identifying the issue which is clearly a bug in the implementation of this action as no others require the path to be URL encoded.

 

Your solution however is incomplete, as it does not provide full encoding of all required characters.

 

Instead you should use encodeUriComponent() which has full URL encode logic thus:

encodeUriComponent(outputs('Document')?['body/{FullPath}'])
 

Helpful resources

Announcements
New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

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 (108,787)