
Announcements
I created an automation to pull email data in Outlook being sent from a form on a WordPress website my company owns. In this automation, I need to parse a textarea where the message is just one JSON value in part of a key value pair.
You'll see below the value is one textarea with what looks like multiple key/value pairs, but not in JSON format. I'm trying to figure out if there's a way to cleanly pull each key/value pair in the textarea and parse it into JSON. Ultimately, I want to create a record in my database with these fields and their values.
Here's the "Body" value I'm returning in the flow:
-----------------------
[EXTERNAL SENDER]
Hello Administrator,
We have recorded the following "Message" form "Contact Us" page by Existing Customers for you:
Name: John Doe
Preferred Contact Method: Phone & Email
Phone: 8585555555
Email: john@gmail.com
Zip Code for Services: 92101
I am: A Hospital Provider
I’m interested in: Heart Surgery
Comments: Aenean vestibulum ut nunc quis ullamcorper. Nam tellus ipsum, aliquam in venenatis ut, tristique at tortor. Cras sapien metus, finibus vitae sagittis quis, elementum id velit.
Thanks
Company Name
-------------------------
I'd like to grab each key from "Name", down to "Comments", and each of these values and parse them into JSON. Is there a way to do this?
Here's my flow:
When I run this, I get an error at the Parse JSON step:
InvalidJSON. The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value cannot be parsed: 'Unexpected character encountered while parsing value: E. Path '', line 1, position 1.'.