Fetching airtable long text into HTTP module

:bullseye: What is your goal?

Getting long text from airtabel into pdf

:thinking: What is the problem & what have you tried?

I’m using Make’s HTTP module with Body input method = JSON string.
The module fails when I map long Airtable text fields into JSON maybe because the mapped text includes line breaks/control characters.
I tried using a JSON-escaping function, but Make returned: Function ‘toJSON’ not found.
What is the correct method to get long text to work?

Hey Sofie,

there is no function called toJSON in Make, no idea where you got that from. You can either use a replace() funciton and escape all special characters or use one of the JSON modules to transform the data to a JSON first, before sending it to the HTTP module.

Thank you! that helped, my only issue now, is that it doesn’t understand bold text from the long text fields. It become normal text with ** around it. If you have a solution for that please let me know:)

That’s something to do with the specific API endpoint. Check the documentation and see if you can send it formatted text. Usually there is a variable you need to send as well specifying it’s markdown for example.