I have 3 code blocks where I am trying to set up a StoreClient on the first, from inside a loop, push an item onto a stack in the second, then with the 3rd, after a filter for the last iteration, output the full stack, then send it out in an email.
First block outside the Loop:
store = StoreClient('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')
store.set('codes', ])
Second block in the Loop: (codestr is Input Data from a Google Sheet lookup)
store = StoreClient('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')
codestr = str(input_dataa'codestr'])
store.list_push('codes',codestr)
Third block after the iteration filter:
output = store.get(‘codes’)
return output
I get this error testing the second step:
Failed to create a run python in Code by Zapier
Your code had an error! Traceback (most recent call last): File "<string>", line 10, in the_function File "/var/task/store_api.py", line 218, in list_push return self.call('patch', BASE_URL, json=data) File "/var/task/store_api.py", line 74, in call raise StoreCallException(json('error']) StoreCallException: Value is not a mapping
I’m pretty sure it’s an issue with the way I am storing them in the list_push(), but I couldn’t find anything in the docs that helped. Any ideas? Screenshot of overall Zap flow below.