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?
No description
5 Replies
Chocci_Milk
Chocci_Milk7mo ago
Hello, Have you looked at the trigger action context? https://docs.gadget.dev/reference/gadget-server#trigger
kalenjordan
kalenjordanOP7mo ago
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.
No description
No description
Chocci_Milk
Chocci_Milk7mo ago
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.
kalenjordan
kalenjordanOP7mo ago
I see - I guess there are two ways to get at the payload. Thanks.
Chocci_Milk
Chocci_Milk7mo ago
No problem

Did you find this page helpful?