Help Needed: Issue with JSON String Double Escaping in Make.com Custom App
Hi everyone,
I’m currently working on a custom app in Make.com, where I’m trying to send a PDF editing request with annotations to an API. The annotations need to be passed as a JSON object. However, I’m running into an issue where the JSON string for annotations seems to be double escaped before it’s sent to the API, leading to errors when the API tries to process it.
Here’s a simplified summary of my setup:
1. Action: I’m using the HTTP module in Make.com to send a POST request to an endpoint (/edit_pdf).
2. Parameters:
• url: The URL of the PDF file.
• annotations: A JSON string that specifies the annotations to be added to the PDF.
• fileName: The name of the file.
3. Problem: The annotations parameter is defined as a JSON string, but it seems to be double escaped when included in the HTTP request body. This causes the API (an AWS Lambda function) to fail when it tries to parse the annotations.
What I’ve Tried So Far:
• Using parseJson function in Make.com to parse the JSON string (but it seems this function isn’t available).
• Considering using a text field with multiline enabled to handle JSON input, but I’m not sure how to properly handle and parse the text to avoid double escaping.
What I’m Looking For:
• Advice on how to correctly handle JSON strings in Make.com to avoid double escaping.
• Any built-in Make.com functions or modules that can parse JSON strings properly.
• Best practices for sending JSON objects as part of an HTTP request in Make.com.
Any help or suggestions would be greatly appreciated and I am more than happy to purchase assistance here!
Thank you!