Exporting JSON to Make.com

Hi,

I have created a pack to export a JSON field to Make.com.
The JSON field is built with a formula and currently contains 500 lines (JSON objects).
But when exporting this JSON, Coda always reduces my JSON length to 200 objects. I have tried using the folowing to contain my JSON :

  • formula control
  • text control
  • cell inside a table
    But everytime Coda shortens the JSON.

This is the code I use to send data :

   execute: async function ([webhookUrl, jsonData], context) {
    try{
      const response = await context.fetcher.fetch({
        method: "POST",
        url: webhookUrl,
        headers: {
          "Content-Type": "application/json",
        },
        body: jsonData,
      });
      if (response.status  == 200)
        return "Accepted";
      else
        return "Error sending to Make webhook: " + response
    } catch(error) {
      return "Error in Make webhook send"
    }
  },

knowing that jsonData is defined as a coda.ParameterType.String

Any clue why Coda messes with my data ?

Hello @Seine_Avenue

If I understand correctly, you’re passing the JSON string from the Coda doc to the pack as a parameter of the formula, right?

In that case, where exactly is the JSON being shortened?

  • Is it getting truncated from the doc to the pack?
  • Or is it happening during the fetch operation?

Also, how long is the JSON string (in characters)?

It could be exceeding a limit—either in the doc-to-pack transfer or during the fetch operation.

Best regards
Arnhold

1 Like

Yes the JSON string is passed as a parameter to the pack.
The JSON is being shortened after 200 objects.There is no fetch operation between the doc and the pack, simply a parameter.
The JSON string length is 520.000 characters.

EDIT : OK it actually worked with a “formula” control. My JSON does no longer get shortened.
Thanks @Felipe_Arnhold for your help !

1 Like

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