cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
E_S
Frequent Visitor

Error: Http request failed: the content was not a valid JSON. Error while parsing JSON: 'Unexpected character encountered while parsing value: R. Path '', line 0, position 0.'

I am trying to write a flow and I get this error:

Http request failed: the content was not a valid JSON. Error while parsing JSON: 'Unexpected character encountered while parsing value: R. Path '', line 0, position 0.'

 

The flow it's really simple, variables and an execute query.

I am trying to get texts from power app and use them to modify a string variable in power automate. Then I use the modified string variable as a query. 

 

I start with a trigger from power apps and I specify what I want to save as a variable and use in power automate:

E_S_1-1645110265128.png

Then I have a variable to save my query as a string and I use the previous variable to modify it (I find it in the required fields). 

E_S_3-1645110912629.png

 

E_S_2-1645110825738.png

 

Here it seems that everything works, but I do not understand what  is "Impostavariabile_valore". 

E_S_4-1645111019801.png

 

E_S_5-1645111047965.png

 

The error appears in the last step, when I try to execute the query

E_S_7-1645111249504.png

 

 

E_S_6-1645111140810.png

 

Can you give me some advice? 

 

 

54 REPLIES 54
AnnRGM
Advocate I
Advocate I

I submitted a ticket yesterday. This is so frustrating because it's happening on a multi-approval flow that creates an audit trail for SOX compliance. Resubmitting a flow after emails have already been sent and approvals have been made is not just time-consuming, it feels very unprofessional. I guess I will also have to improve the error handling in the flow (but why should I need error handling for sending an email when I've already validated recipient, etc.?)

 

Has this occurred for anyone since Nov 7?

 

One thing that has helped tremendously is the ability to show custom columns in the Power Automate history of flow runs. I can now tell at a glance which flow goes to which SharePoint list item.

Anonymous
Not applicable

@AnnRGM - yes, seeing the columns is an incredible improvement!!  How are you validating email recipient?  
Thank you!  

Thank you @AnnRGM ! That's probably what caused the failures to stop. Haven't had any since ~ 10 PST on 11/7. We use email primarily to communicate rather than approve, thankfully, so most of the impact of this bug was superficial.

Our process is completely internal, so the users are all in our Active Directory. BUT, I found out that just because a user is in AD doesn't mean they are a valid user according to Approvals or Outlook, so I always validate via Office 365.

Had another failures today at 3:55 PST. We use confirmation emails internally and when reps don't get em they're trained to resubmit. the reps resubmit went thru so I didnt have to. MSFT please fix ❤️

Thanks for filing the ticket, @AnnRGM . If Microsoft has any explanation for the issue, that’d be interesting.

 

I don’t think that email recipient verification is related to this issue at all. I am pretty sure that the action for sending an email does not in any way care about the success of the email’s delivery. All it does is queue a message for sending in Outlook. If it waited for delivery confirmation of some sort, you’d see very long action runtimes. That’s simply not how email normally works.

 

@David_PezzoliI am using “Reply_to_email_(V3)'”. That is the latest version of the action, not one of the deprecated ones. I got the error once. It is in a flow which runs periodically, so there was no surge in volume and my flows do not get close to any of the resource limits, so it being a limit issue specific to my account is out of the question. This appears to be a global service outage of some sort, though it was random and transient enough that it likely only affected a small percentage of calls while it was occurring, making it harder to be noticed.

 

@David_PezzoliFor this error, checking common errors does not make sense. The error itself is “Http request failed: the content was not a valid JSON. Error while parsing JSON: 'Unexpected character encountered while parsing value: R. Path '', line 0, position 0.'”. For me, the error occurred on the action after it was only running for 1 second. So it is not like a timeout in the request caused the request to be truncated. It is more like the service had an internal error and returned an HTML error response when the connector was expecting JSON—or something of that nature. The letter “R” doesn’t make sense if the issue is actually the server returning an HTML error instead of a JSON one. Maybe the server returned a textual error saying something like “Request failed” and the connector doesn’t even check the Content-Type of the response or HTTP status code before trying to parse the result as JSON. Maybe the connector sent invalid data due to, as I suggested above, writing the headers out of order (the fact that the bad character is a capital letter R suggests either that it is the beginning of the sentence or an HTTP header), or some debug logging making it into the request body.

 

Maybe, just maybe, the “REST API is not yet supported for this mailbox” is the error we are seeing. If the response were a text/plain response with just that message but the connector doesn’t check the response type and just blindly tries to parse it as JSON, one would get the error shown above. However, the explanation for this error clearly describes this as a non-transient error. If the service temporarily incorrectly returned this error (but the connector obscured the error), then there must have been some other service outage or incorrect error handling in the connector or API itself which resulted in the API incorrectly assuming that the user’s account was not set up for RESET access even though it was actually some other transient issue. E.g., maybe Microsoft was deploying an update and, while the REST API was not working, the connector assumed that the seen error indicated that the REST API was disabled when it was really just temporarily down. But, again, how are we supposed to know this was the error from the error message we saw?

 

That is very unlike the nature of the common errors we are supposed to be handling. A proper error should still have a well-formed response or a clear “connection reset” error message if there was actually a lower-layer communication error. If such an error occurred but the connector’s own error handling was failing and, in trying to display the error, encountered this error related to JSON parsing, then we cannot know the actual error because the JSON parsing error is obscuring the actual error. If, as in the OP’s post, there is malformed OData, then the server should respond with a clear message saying so—not give some error which looks like an internal error that is not properly handled and labeled as such. I.e., this is not something that we can solve or fix from our end. Microsoft needs to fix error handling somewhere before we can actually see what is wrong. But this is hard if it is a transient error which is no longer happening.

 

If I need to have retry loops in my flows for this type of thing, that would be just silly. I would expect the action to automatically retry calls that are safe to retry. If the call is expected to fail transiently, the API documentation should clearly explain that for the action and give an explanation of how to detect a transient error and how to retry it. I don’t see this in the Outlook connector documentation. But… if the action is actually safe to retry, that means I have to add a retry loop to many of my flows, complicating them. Again, this complication should be hidden from me. And, this very error is not well-formed enough to determine that it even is a transient error or that retrying is safe.

@nerfherder Thanks for the update...very disappointing to hear that you experienced another failure yesterday.

 

@binki-dcx I agree that the email recipient is not causing the problem. My point is that I shouldn't have to check for an error on a "Send email" step...I've already handled possible error cases before I send the email. Even if I do check for an error, I can't solve the problem in the flow. Not in this particular case, where we have multiple approvals required. Resubmitting the flow generates new approval ids and redundant emails.

 

Just to vent, this error causes me headaches even if we get through the approval steps. If an email near the end of the process fails, SharePoint can't update statuses and the whole audit trail is broken.

 

I'll update this thread when I hear back from Microsoft.

 

@AnnRGM best practice would be to avoid email for any important organizational function other than notifications, as a fall back. That's essentially how we're using it, but may rely heavier on it in future. Not sure if it would work for your org, but there are plenty of vendors with Power Automate connectors for sending text messages.

 

I am facing same error with below connector:

Send an email (V2)

Office 365 Outlook

Please help me out. This issue is occurring frequently.

 

@Dharam2 seems like this is something that Microsoft needs to fix. Quick question though for you and @AnnRGM , are you all using the same connection across many flows? Or have you used multiple different Outlook connections throughout your flows?

@nerfherder 

Are you all using the same connection across many flows?

Yes

Or have you used multiple different Outlook connections throughout your flows?

Yes

@Dharam2Please see if you can open a support ticket with Microsoft. I do not expect them to be monitoring this thread, but we need their input. If the issue is happening frequently for you (I only saw it once on November 7 myself), that might help them in identifying the issue. And, more importantly, it raises their awareness. Thanks!

@binki-dcx Thank you for your reply. I will try to open a ticket with Microsoft.

Are you all using the same connection across many flows?

Our organization has 40,000 employees, so I have no way of knowing if other flows are failing. I only have one flow that is failing but my other flows run infrequently.

 

Or have you used multiple different Outlook connections throughout your flows?

This flow uses the Send an email (V2) connector six different times throughout the approval process. Sometimes the email is a notification, sometimes the email contains approval links. The email always contains an HTML table of data.

 

I shared this thread with the Microsoft engineer assigned to my ticket. I've just sent an email requesting an update and requesting they view this thread again.

Are you all using the same connection across many flows?

Our organization has 40,000 employees, so I have no way of knowing if other flows are failing. I only have one flow that is failing but my other flows run infrequently.

 

Or have you used multiple different Outlook connections throughout your flows?

This flow uses the Send an email (V2) connector six different times throughout the approval process. Sometimes the email is a notification, sometimes the email contains approval links. The email always contains an HTML table of data.

 

I shared this thread with the Microsoft engineer assigned to my ticket. I've just sent an email requesting an update and requesting they view this thread again.

AnnRGM
Advocate I
Advocate I

The MS rep I'm working with has reviewed this thread and replied to me "I haven’t seen any mentions of an uptick in cases related to this issue you are experiencing." They have a meeting on this topic today with other MS resources. 

 

@Dharam2 Could you share which dates this occurred on? And what you mean by frequent? Were you able to open a ticket? Thanks.

 

Again, I'll update this thread if I get more information.

Anonymous
Not applicable

Thank you for your efforts, @AnnRGM

 

All of our errors of this type have come from simple Outlook Send an Email, V2 actions.  Re-submitting the workflow from the PA interface ALWAYS works.  We have about 40 simple and frequently-run workflows that just send notifications.  We've had about 20 of these errors (on 4 or 5 different workflows) since 11/3, including one so far today.    

nerfherder_0-1668115006202.png

@AnnRGM / @Dharam2 / @Anonymous / @binki-dcx - I am using the same "connection" (api key?) across 80+ flows. I used to have about a dozen options under "My connections" here and would spread them out across flows. I stopped doing that when I realized I didn't need to, but now I'm reconsidering and thinking maybe this is a design flaw we can correct by splitting the work of our flows across multiple connections? Not sure, haven't had a failure yet today (related to this), have refreshed the credentials on my one connection but experienced another type R failure after.

I am quite certain that sharing a connection is unrelated to this issue. I encountered the error and my account has very little activity. Making more connections when you don’t need to means more maintenance/work for you…

David_Pezzoli
Kudo Collector
Kudo Collector

Hi folks, it's time to open a ticket to Microsoft about this generic error. At the moment I think it is the only solution. 

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,262)