Handling Double Quotes in JSON Payload for Custom Actions

Hello Adalo Community,

I’m currently facing an issue with a custom action in my Adalo app and would appreciate any guidance or advice you can offer.

Issue Description:

I’m using AskChatGPT in my app to manipulate user-submitted text and then return the output via GPT response. It all works well, however, I’ve encountered a problem when the input text contains double quotes, backslashes, or control characters.

For instance, take a look at the following text:

The chapter discusses the concept of “entering the conversation” by acknowledging existing ideas…

The double quotes around the phrase “entering the conversation” are causing formatting issues in the JSON payload, so the response comes out blank.

Challenge:

I’m finding it difficult to implement a method to automatically escape these double quotes in the user’s input. The JSON payload needs to have these double quotes escaped to maintain proper formatting, like so:

\"entering the conversation\"

Request for Assistance:

Has anyone in the community dealt with a similar issue, or does anyone have suggestions on how to handle special characters in JSON payloads within Adalo? Any tips on escaping characters, or alternative methods to ensure the API receives a correctly formatted request, would be incredibly helpful.

I’m open to creative solutions or workarounds that are feasible within the Adalo platform’s capabilities.

Thank you in advance for your time and assistance!

Best regards,
Arpit

Hi @Ajax,

I had similar cases and I ended up getting record from Adalo Collection with an API call from Make scenario, and then working with the payload from this record.
Nowadays API calls available only on Team plan, unfortunately :frowning:

Best,
Victor.

Hi @Victor ,

Thanks for your reply. It’s a shame that we can no longer use API calls on the Profesional plan :frowning:

I will probably need to park this use case for now.

Thanks
Arpit

1 Like

@Ajax You can get round this by writing the text to an Airtable record and then triggering a Make.com call to pull the record from there and send it to ChatGPT.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.