How do you access the webhook payload details from an action?
I've setup a webhook as a trigger for my action. I'm wondering how to access the details of the webhook payload in my action?

5 Replies
Hello,
Have you looked at the trigger action context?
https://docs.gadget.dev/reference/gadget-server#trigger
Gadget Server - Developer Docs - Gadget
Gadget Docs
No I googled this but nothing came up. I'm not sure the trigger action context is exactly what I needed.
I ended up seeing that the params are populated automatically with the webhook payload details so I figured it out.
Would be good if that was in the docs somewhere.
I was assuming params would have to be defined inidividually which is usually the case with actions.


I'm not sure that I understand what you mean. The trigger object has a payload object on it that gives you the exact payload that was sent by Shopify. The params are how we processed the data for the current record. params and record match after applyParams is run.
I see - I guess there are two ways to get at the payload. Thanks.
No problem