Invalid JSON when sending content generated by OpenAI to WordPress

Not open for further replies.



I have set a Pabbly Connect automation to create text using OpenAI and then send this text to my WordPress site.

I have seen this video:

And I have set up everything accordingly and everything seems to be running fine... apart from the fact that WordPress does not want to received the text created by OpenAI due to a JSON issue:

The response received from the WordPress step in the autiomation is shown below:

Code: rest_invalid_json
Message: Invalid JSON body passed.
Data Status: 400
Data Json Error Code: 3
Data Json Error Message: Control character error, possibly incorrectly encoded

I understand that this means that there are some characters in the content created by OpenAI that are in conflict with JSON and thus I have to remove them.

I read about a similar issue at, where you suggested using the Text Formatter and search/replace function.

But this would have to be done for all JSON special characters,

I also read the solution to include a Text Formatter HTML > Markdown at, but when I tried that, it didn´t work: WordPress did not wan to accept the incoming text due to "content empty".

So my question is: How do I accept data from OpenAI that includes the JSON special characters (quotation marks, etc.)?


Well-known member
Staff member
In the Category ID, Tag, and Featured Media Id you need to pass the individual's ID from WordPress.


Whereas to pass the tag Id in the fields, you can use the "Search Tag" action step of WordPress in your workflow to give the Id dynamically.
Not open for further replies.