Hi everyone,
I’m working on an automation where I receive a response from the OpenAI module in Make.com, which outputs data in the following format:
{
“job_title”: “Connect Line bot to already existing line channel”,
“job_description”: “Hey, Context: I’m trying to create an integration between Line and Monday.com using Make.com. The setup is supposed to trigger whenever someone sends me a message via Line, and the webhook sends the data to Make.com, which then creates an item in Monday.com…”
}
The issue:
- The response sometimes includes unwanted characters like ````json` and newline characters, which need to be removed.
- I want the JSON object to be correctly formatted and parsed so that I can work with it in Airtable.
What I’ve tried:
- I used
replace()
functions to remove the unwanted text, but I’m still running into issues when parsing the JSON.
My goal:
- I want to extract the JSON from the OpenAI response, ensure it’s in valid JSON format, and then pass it to the Airtable module without errors.
I need to extract this JSON data, remove the extra backticks (json and
), and then parse the JSON so I can send it to Airtable.
I’ve tried using the following formula in the JSON Parse module:
replace(replace(3.Result; "```json\n"; ""); "```"; "")
Has anyone encountered a similar issue or have advice on the best way to handle this?
Thanks in advance!