Can anyone help me with removing special characters in API

I am trying to filter out special characters that interfere with the Open AI ChatGPT API before sending over user-provided input. Ideally, I want to achieve this without having to create a new thing in the database.

Does anyone have any ideas on how to achieve this?

I am stuck. Here is my JSON BPI Connector Body
“model”: “gpt-3.5-turbo-16k”,
“messages”: [
{“role”: “user”, “content”: " }
“temperature” : ,
“top_p” : <top_p>,
“frequency_penalty” : 0,
“presence_penalty” : 0,
“max_tokens”: ,


Here is how it looks in my workflows:

Thanks all!

Why don’t you use :find & replace?

I tried :find & replace and regex extract and neither of them worked.

I must be doing it wrong or missing something.

Input 1 (API)'s Value :find & replace
Find: "
Replace: forward slash "

But you want to replace or remove?

To remove you just need to use :find & replace and replace the quotation marks (") by nothing.
Leave the field empty.

So just leave it blank instead of the forward slash. So, would it :find & replace without having to store the user’s input into the form?

Just use :format as JSON safe.

Example:formatted as JSON safe becomes “Example” and “Example” formatted as JSON safe becomes “\”Example\””