Home > Blockchain >  Power Automate: Create SharePoint Folder - Response not in JSON Format
Power Automate: Create SharePoint Folder - Response not in JSON Format

Time:10-17

I am working on a Power Automate flow....and beating my head against a wall as well. It seems so easy, but it is failing with an error "The Response is not in a JSON format"

The intention of the flow is to set up standard folders in some 200 SharePoint sites within my company. In two files on each of these sites, I want to add a Year Folder (i.e. 2022) and a Month Folder (10-Oct). Seems straight forward.

I have a SharePoint list that contains all the SharePoint sites. After manually triggering this flow, it references the SharePoint List (Get Items). Then working down the list of SharePoint site (Apply to Each), Create the new folders. Been researching & tinkering with this for a couple of hours.

First Part of the Script

The "Directory" is pulled from the SP List as well: for this example assume it is "Share Documents1" thou it does vary slightly around the company...

First part of the error - Inputs

The naming is all correct....

Here is the Error output. I am at a loss...

Error Output

CodePudding user response:

I see there are some strange characters in your site address value. :f:/r/ Can you remove that part from the value?

CodePudding user response:

This error was thrown due to extra characters in the SharePoint Site Address. When using the "Copy Link" feature within SharePoint, it adds extra characters that are not required, in this case they were :f:/r/.

Once removed, the JSON error was resolved and the flow worked perfectly. Lesson learned, inspect the address for additional strings that are not truly required, remove those, test the link to ensure still valid, then utilize the streamlined link.

  • Related