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 / ics attachment to pars...
Power Automate
Unanswered

ics attachment to parse JSON, unexpected character in B. Path

(0) ShareShare
ReportReport
Posted on by 8

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 to make it a comma, but I can't even update my compose function because it's those were 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:

Marissa_A_0-1707853905463.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:
Marissa_A_1-1707853905449.png

 

Marissa_A_2-1707853905453.png

*Compose 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 flow not supporting it, so here's the meat of that:
Screenshot 2024-02-19 150938.png
 
 
If it makes a difference, the data I'm decoding is an ics email attachment that was in binary. It opened a link, but was technically in JSON format rather than html like similar examples I've seen. This is my attempt at accepting an ics email attachment into my calendar. This is the thread that gave me the idea to use the replace function, but it's formatted in html: Unexpected character encountered while parsing value: E. Path 
Categories:
I have the same question (0)
  • Marissa_A Profile Picture
    8 on at

    @ekarim2020 I just saw a similar issue you helped with. Any idea what I can do here?

  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    Hi @Marissa_A ,

     

    I don't think it is possible to read and then import the ics file attachment into Outlook. The content of the ics file when read will also not be in JSON format. Please see  Re: .ics in main calendar Outlook - MS Power Autom... - Power Platform Community (microsoft.com):

    "Unfortunately, there is no built-in action for importing an ICS file through Power Apps.  It is possbile to read the raw ICS file and create an event, but it is difficult.  I've seen some blogs on creating ICS files, but haven't seen any on how to read and import them using Power Automate.  Please post any that you have seen. " @Pstork1 

     

    Having said that if you still want to split the content of the ics file at the CRLF (carriage return line feed) character:

     

    Snag_28c635a.png

     

    The Attachments property is an array:

    Snag_28c9af4.png

    Get the content converted to string:

    Snag_28ccef5.png

    Split the content at the CRLF character

    Snag_28d0363.png

    split(outputs('Compose'),decodeUriComponent('%0D%0A'))
     
    Snag_28fb0b0.png
    This is an ics file showing the CRLF characters at the end of each line:
    Snag_2954789.png

     

    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

     

  • Marissa_A Profile Picture
    8 on at

    Thank you, I've gotten closer. The "%0D%0A" code didn't work, but "\n" almost did.

     

    Screenshot 2024-02-20 193201.png

    This is the input code for parse JSON. There are " " lines where info should be, and the lost info is preventing my schema from working. You can also still see some "\n"s in there.

     

    Screenshot 2024-02-20 194042.png

    This is what the decoding outputs, and this is the info my schema needs. Most of the properties occupy their own line with "\n" showing up in the body, so I suppose it is double-dipping a bit with the "\n" phrase. It actually looks like it's removing lines from the DESCRIPTION property but leaving it between properties.

     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard