• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

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 https://forum.pabbly.com/threads/json-error-while-trying-to-connect-to-wordpress-and-post.8927/, where you suggested using the Text Formatter and search/replace function.

But this would have to be done for all JSON special characters, https://www.tutorialspoint.com/json_simple/json_simple_escape_characters.htm

I also read the solution to include a Text Formatter HTML > Markdown at https://forum.pabbly.com/threads/remove-json-control-characters.5910/, 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.