web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error: The response is...
Power Automate
Unanswered

Error: The response is not in a JSON format. - Folder Metadata

(0) ShareShare
ReportReport
Posted on by 4

I am building an automated workflow to house a central request list that triggers new MS Teams/SP sites to be created with curated content. I have the flow working... most of the time. However, there seems to be an issue with the way I am using the action "Get Folder Metadata using Path". The action uses two composed variables that I use to dynamically set the Destination Site Address and Folder Path. image.png

The issue is that it works 50% of the time. Does anyone have any idea why I would receive an error "The response is not in a JSON format." intermittently? It's puzzling because there doesn't seem to be any pattern behind the issue, and I've checked the outputs and because it works 50% of the time, I'm now unsure what the issue would be. 

 

Thank you in advance for your help!

Categories:
I have the same question (2)
  • Kevopoly Profile Picture
    4 on at

    Would a delay help fix this issue? Could there be an issue with JSON format due to race condition?

  • WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    Is the SharePoint API returning an HTML error response that isn't be interpreted properly by the Power Platform connector? The connector is really just a bit of middleware between you and the upstream API. It might be that the inputs into the action are causing an error to be returned which is not being correctly processed by the connector. Could be special character in the dynamic content or something? What is common across the ones that fail?

  • Kevopoly Profile Picture
    4 on at

    Hey Will, 

     

    Thank you for your reply. I have tried to look for common faults across the different errors, but the 404 error code is the only thing I see as a pattern. I have a SharePoint list that acts as a trigger, and I will use the same record for testing and it will work the first pass, and fail the next, then pass, etc. I've tried to use encodeURIComponent on the dynamic variable, but the link I'm passing is always consistently generated as I'm combining the webURL on the channel I want to copy to from MS Graph API. I do add a "-" in the URL, but I have tried encoding the entire string through a compose action but still no luck. 

     

    Also, I have tried to remove the scoped actions, remove the Folder Metadata Using Path action and tried using the steps in different sequence but no luck. I had originally thought maybe it was an issue with the scoped actions failing or the folder metadata action failing, but neither were the core issue. The flow will consistently fail at this point in the sequence. Here's a photo of the full flow... maybe this can help? I'm sure there's optimization to add to this flow, I am somewhat new to this space and still learning.

    Kevopoly_1-1651201915323.png

    Kevopoly_2-1651201950261.png

     

     

    Here's a screenshot of the error:

    Kevopoly_0-1651201407886.png

     

  • WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    You could try putting the action inside an Until loop and set the loop condition to be string(body('Get_metadata_using_path')) does not contain 404 FILE NOT FOUND and put a 5 second delay in there with it and its run after set to the SP action Failed. The next action outside the loop also run after Success or Failed.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard