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

Community site session details

Session Id : FdMVjY6YuoTsAP6Esqfk9s
Power Automate - Building Flows
Unanswered

Unexpected character encountered while parsing value: E. Path

Like (0) ShareShare
ReportReport
Posted on 14 Feb 2021 11:18:25 by 329

Hello everybody,

 

Before going into the details of my issue, I have looked into other posts on this community but I could not find the answer there.

I have a quite simple flow.

 

When a new news post has been created on a specific SharePoint site, the flow should trigger.

In the end, the flow should post a message into a Teams channel and it should mention all the team members for visibility.

 

How I do that?

It triggers when a new item has been created. 

trigger.png

A trigger condition is specified to only start when the PromotedState value equals 2.

 

@equals(triggerBody()?['PromotedState'],2)

 

So far so good. The trigger works fine.

 

Next step, retrieving the Microsoft 365 group members of the team where I will post a message, and putting these members in a string type variable:

groupmembers.png

 

Still working as expected.

Last step, posting the message.

PostMessage.png

This steps results in an error.

 

Error details

 

Unexpected character encountered while parsing value: E. Path '', line 0, position 0.
 at Newtonsoft.Json.JsonTextReader.ParseValue()
 at Newtonsoft.Json.Linq.JArray.Load(JsonReader reader, JsonLoadSettings settings)
 at Newtonsoft.Json.Linq.JArray.Parse(String json, JsonLoadSettings settings)

 

 

Please find the body of the Post a Message (Teams) action card below.

I checked the body of the message and put it in jsonlint, no validation errors.

I hope that someone could help me understand what's going on here!

 

Thanks a lot.

Joost

 

Body

 

{
 "recipient": {
 "groupId": "0481xxxx-xxxx-xxxx-xxxx-xxxx3a7d055a",
 "channelId": "19:xxxxxxxxxxxxxxxxxxxxf4a6d944xxxx@thread.tacv2"
 },
 "messageBody": "<p>\n<b>Er staat directienieuws voor je klaar!</b><br>\n<a href=\"https://orgname.sharepoint.com/sites/Directienieuws/SitePages/Directienieuws-week-6---2021.aspx\">Klik hier</a> om het nieuwsbericht te openen.</p>\n<at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at><at>username@org.nl</at>"
}

 

  • Marissa_A Profile Picture
    8 on 13 Feb 2024 at 19:49:10
    Re: Unexpected character encountered while parsing value: E. Path

    That's fair, thank you

  • Pstork1 Profile Picture
    67,176 Most Valuable Professional on 13 Feb 2024 at 05:36:25
    Re: Unexpected character encountered while parsing value: E. Path

    Please post this as a new question.  You'll get more responses and others will be able to find the answer more easily later.

  • Marissa_A Profile Picture
    8 on 12 Feb 2024 at 22:38:59
    Re: Unexpected character encountered while parsing value: E. Path

    I have an issue with Parse JSON processing \n in the body content. I tried to use split to make the \n a comma, and I tried using replace as you suggested, but I can't even update the function because it's invalid. The ai says that my flow doesn't support split or replace, and when I ask it to help it gives me another blank compose action and throws a send email onto the end of my flow. Not helpful, and I haven't seen anyone else with quite the same problem.

     

    Here is my compose function:

    Screenshot 2024-02-12 172308.png

     

     

     

     

     

     

    Here is an excerpt of the output content the Parse JSON needs to process:

        "content""BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Racarie Software//ApplicantStack//EN\nCALSCALE:GREGORIAN\nMETHOD:PUBLISH\nBEGIN:VEVENT\nSUMMARY:Interview- Teams\nX-MICROSOFT-CDO-BUSYSTATUS:BUSY\nURL:https://allweathersealofwestmichigan.applicantstack.com/events/view/aneinqs9hr4p\nLOCATION:Teams Call\nDESCRIPTION:Candidate....."
     
    The builder ai said the unexpected character we were running into is the /n, so these are the functions I thought I could use:
    Screenshot 2024-02-12 172822.pngCompose being the original Compose action I mentioned at the beginningCompose being the original Compose action I mentioned at the beginning
     
     
     
     
     
     
     
    When the function tool told me those were invalid, the ai kept insisting that the problem was the whole flow not supporting it, so here's a picture of that:
    Screenshot 2024-02-12 173439.png
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    If it makes a difference, the data I'm decoding is a .ics email attachment that was in binary. It opened a link, but was technically a JSON format rather than html like the example above. This is my method of accepting a .ics attachment into my calendar.
  • jvdlinden Profile Picture
    329 on 16 Sep 2021 at 07:04:29
    Re: Unexpected character encountered while parsing value: E. Path

    Hi @twlarrywu unfortunately not for mentioning multiple users individually.

    I basically worked around my issue by mentioning the channel instead.

    Hope someone else can help us out with that.

  • twlarrywu Profile Picture
    4 on 16 Sep 2021 at 02:59:54
    Re: Unexpected character encountered while parsing value: E. Path

    Hi, 

     

    I have the same issue.(worked fine on 4 or 5 recipients, it will be failed easily if we have <at>xxx </at> more than 10 email.

    Do you or anyone find the workaround or solution?

     

     

  • jvdlinden Profile Picture
    329 on 26 Aug 2021 at 15:35:08
    Re: Unexpected character encountered while parsing value: E. Path

    Hi @simorav if you break your flow down by trying to mention several users manually. Does it work for some users? That might indicate a provisioning issue.

     

    I notice that your input for action "Get @mention token for a user" contains a variable. What is the value of that variable? Because here I see that the email address of a user is used as input: Tag a User in a Microsoft Teams post made using Power Automate | D365 Demystified

     

    Maybe first you can get all group members and then for each user and get the token for each member:

    get_group_members.png

     

    This would be the output:

    output.png

     

    Of course you can filter out users from within the apply to each action.

    Hope this helps

  • simorav Profile Picture
    6 on 26 Aug 2021 at 12:25:28
    Re: Unexpected character encountered while parsing value: E. Path

    Hi @jvdlinden

    I receive in input the list of users to be mentioned, then I get the mention token and then I use these token in the  message (see the screen below). 

     

    simorav_0-1629963400945.png

     

    For some users (e.g. guests) I'm not able to retrieve the token, then I added the try catch block to avoid flow failure. In this way I suppose that remaining mentions should be ok. Unfortunately, when I try to set mentions in the message, the task fail with this error:

     

    {
      "error": {
        "code"500,
        "message""Unexpected character encountered while parsing value: E. Path '', line 0, position 0.\r\n   at Newtonsoft.Json.JsonTextReader.ParseValue()\r\n   at Newtonsoft.Json.Linq.JArray.Load(JsonReader reader, JsonLoadSettings settings)\r\n   at Newtonsoft.Json.Linq.JArray.Parse(String json, JsonLoadSettings settings)",
        "source""flow-apim-europe-001-northeurope-01.azure-apim.net",
        "path""choose[19]\\when[1]\\choose\\when[1]",
        "policyId""",
        "clientRequestId""xxxxx"
      }
    }
     
    I think that some of the users mentioned haven't access to the teams/channel, then the task fails. Any other idea?
    Thanks, regards
  • jvdlinden Profile Picture
    329 on 26 Aug 2021 at 07:33:05
    Re: Unexpected character encountered while parsing value: E. Path

    Hi @simorav can you share some additional details (print screen) of what you are using in your flow right now?

  • simorav Profile Picture
    6 on 25 Aug 2021 at 16:06:33
    Re: Unexpected character encountered while parsing value: E. Path

    Hi @jvdlinden ,

    thanks for the quick response đꙂ

    I cannot mention the channel, but I need to mention a list of users. Unfortunately I'm not sure that all the users are mentionable, in fact I cannot find some of these users with a manual mention too. Can I check in some way these situation and remove broken mentions?

     

    Thansk, regards

  • jvdlinden Profile Picture
    329 on 25 Aug 2021 at 15:44:44
    Re: Unexpected character encountered while parsing value: E. Path

    Hi @simorav ,

    I was able to find a solution. Sorry for not updating this post.

    Currently you cannot mention the team. You can mention a channel or an individual user with Power Automate / Logic apps. Please take a look here: Mention a channel with Flow – Expiscornovus

     

    In my case I mention the "General" channel of the team (this includes all team members). 

    PS: you can use the v1.0 endpoint from Microsoft Graph instead of the beta endpoint.

     

    If you need additional info just reply 🙂

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete