Has anyone created an integration via chatgpt and parsed the returned string into a JSON object?
I’m sending a request to chatgpt to do some matching of data, and below is an example of the response:
{
“matches”: [
{
“job_experience_id”: “1689329367501x788314122069369000”,
“job_requirement_id”: “1689348552446x342489591321560000”
}
However since its returned as a string, I can’t do much with it in the backend. Anyone have a plugin or workaround?
Send this string to another backend API and now it’s a json
String should be valid json format though
Do you have an example? Otherwise I’m just sending a string formatted like JSON to another backend workflow
- Create new backend api with ‘detect request data’
- Go to api connector and create new post api call with
<body>in it.
- Initialise endpoint from step one from API connector with string that you have
- Use api call from step 2 in backend workflow that gets you this string
Now you have json data in step 1 and you can do anything with it.
4 Likes
Thank you so much! Going to try this when I’m home from work. I’ll let you know how I get on 
1 Like
Quick update, no data is shown as part of the initialisation
{
“matches”: [
{
“job_experience_id”: “1689329367501x788314122069369000”,
“job_requirement_id”: “1689348552446x342489591321560000”
},
{
“job_experience_id”: “1689329382817x868517141105058600”,
“job_requirement_id”: “1689348558516x187528149109115420”
},
{
“job_experience_id”: “1689329395033x751874060828652300”,
“job_requirement_id”: “1689348558516x187528149109115420”
},
{
“job_experience_id”: “1689329478787x232571213811550980”,
“job_requirement_id”: “1689348556507x535121829031699700”
},
{
“job_experience_id”: “1689329490118x486318894036187800”,
“job_requirement_id”: “1689348556507x535121829031699700”
},
{
“job_experience_id”: “1689329537449x349308369656386560”,
“job_requirement_id”: “1689348542407x574418429502157700”
},
{
“job_experience_id”: “1689329564153x138826878674465080”,
“job_requirement_id”: “1689348542407x574418429502157700”
},
{
“job_experience_id”: “1689330028408x198518256244571520”,
“job_requirement_id”: “1689348544382x976954643289034800”
},
{
“job_experience_id”: “1689330040260x407716864682647900”,
“job_requirement_id”: “1689348546594x977863171386363500”
},
{
“job_experience_id”: “1689330051246x756507468524933400”,
“job_requirement_id”: “1689348548694x496448285847838300”
}
]
}
This is not a valid string for json
replace every ” with "
{
"matches": [
{
"job_experience_id": "1689329367501x788314122069369000",
"job_requirement_id": "1689348552446x342489591321560000"
},
{
"job_experience_id": "1689329382817x868517141105058600",
"job_requirement_id": "1689348558516x187528149109115420"
},
{
"job_experience_id": "1689329395033x751874060828652300",
"job_requirement_id": "1689348558516x187528149109115420"
},
{
"job_experience_id": "1689329478787x232571213811550980",
"job_requirement_id": "1689348556507x535121829031699700"
},
{
"job_experience_id": "1689329490118x486318894036187800",
"job_requirement_id": "1689348556507x535121829031699700"
},
{
"job_experience_id": "1689329537449x349308369656386560",
"job_requirement_id": "1689348542407x574418429502157700"
},
{
"job_experience_id": "1689329564153x138826878674465080",
"job_requirement_id": "1689348542407x574418429502157700"
},
{
"job_experience_id": "1689330028408x198518256244571520",
"job_requirement_id": "1689348544382x976954643289034800"
},
{
"job_experience_id": "1689330040260x407716864682647900",
"job_requirement_id": "1689348546594x977863171386363500"
},
{
"job_experience_id": "1689330051246x756507468524933400",
"job_requirement_id": "1689348548694x496448285847838300"
}
]
}
You can use it to initialise the endpoint, but on backend you will need to find&replace every ” with " before sending this string
Did you get this to work? I tried submitting this a JSON via the API connector and got the same empty response.
(really appreciate your help on this)
I did, do it like this and add Content-Type application/json
That worked! Thats amazing! Thank you so much.
I just need to figure out how to schedule an api call on this list.
Hey @sat_miha !
I seem to have some trouble getting the data to be used in a workflow. I’ve got the API connector to send the call and detect the data correctly. But whenever I want to create a list of things from it, nothing seems to happen. Do you know why this could be?
I got it working! I had to basically convert the response to raw text and then do the find and replace.
Massive help here, honestly this was the biggest blocker I was facing. Thank you a ton!!
1 Like