Why am I receiving a JSON error on the Grist Add or Update Records node despite having correct Data Records?

This topic was automatically generated from Slack. You can find the original thread here.

I am on a Grist > Add or Update Records node; I’m 99% sure my “Data Records” is OK, but I get this error about JSON ¿?

Hi Marc, can you share the configuration of your step?

It seems like the step is expecting JSON, but it’s being passed a JavaScript object instead.

For example, if you’re referencing another step’s exports like:

{{ steps.nodejs.$return_value }}

You might need to stringify the object:

{{ JSON.stringify(steps.nodejs.$return_value) }}

I went ahead and did what I needed from a Python block (it also made sense for that use case) I was just putting something quick & dirty together for Slack

Will take note of your suggestion shall I hit that wall again

Ah got it, so there’s a compression/encoding step needed for this template to work