Question

Unable to pass entire value from payload to input data of python code

  • 2 December 2022
  • 1 reply
  • 329 views

Hi All,

I am trying to work on the request data in a downstream Python code zapier snippet. In the payload of webhook trigger, json comes as

{“K1”:”V1”, “K2”:{“K21”: “V2”, “K22”, “V3”}}.

Want to work on the entire value of key “K2” of payload, that is 

{“K21”: “V2”, “K22”, “V3”}

. But in the input data of ‘Setup action part’ in ‘Python code action’ there is no option for “K2”, the options are “K2 K21”, “K2 K22”. How to solve this.

 

Attaching screenshots for reference

Request data
Python code action

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +12

@paertools 

Try changing your trigger wehbook to a Catch RAW hook

Catch Hook Raw is unparsed data from the trigger app VS Catch Hook is parsed data from the trigger app. You can find more webhook help here: https://zapier.com/apps/webhook/help 

Once Zapier parses JSON its hard to rebuild it. There are two ways i’ve found you can rebuild raw json. 

1. Use an empty POST request step after the step you want to rebuild and send it to a catch raw hook trigger. This way works very well but sends it to another zap. 

2. Simple JSON structures (not nested arrays) can be rebuilt using a formatter step: