Have a simple python code that builds a dictionary, and need to create multiple sheet rows based on the number of items in the dictionary.
Pretty straightforward, but I get this error when testing the sheets module. Unexpected token o in JSON at position 1
The code runs and returns results just fine
May I ask what is the value for {{steps.python.$return_value}} in your workflow?
In the Row Values description, the value should be a string that can be parsed to a JSON. So I would expect the value is a string with the value [[ "Foo", 1, 2 ], ["Bar", 3, 4]]
@giladl, I would suggest you to transform your dictionary into the nested array structure that is accepted by the Google sheet action in your Python code. I’m not really familiar with Python, but I think the logic is pretty straight forward:
Create the outer array
Then for each key - value in the dict, add a new array as an item into the outer array. The new array should have 2 elements, the first one is the key, and the second one is the value