I am looking to be able to see the method by which the webhook was called. (GET, POST, PUT, PATCH etc...). In javascript we look at the request.method property. Is there something similar in Workflows? I don't see it in headers.
Any suggestions?
I am looking to be able to see the method by which the webhook was called. (GET, POST, PUT, PATCH etc...). In javascript we look at the request.method property. Is there something similar in Workflows? I don't see it in headers.
Any suggestions?
I believe it's in metadata
. When I look at the run history for a specific run of a workflow > click code block that called an API end point > JSON > expand metadata
, you'll see the request.method
.
I believe you can reference this within the workflow, similar to how you reference .data
, but haven't tried that yet.
Example:
Hey @bernardw01! Welcome back to the community and thanks for reaching out.
I expected to find the method data in startTrigger.metadata
or workflowContext.currentRun
, but it doesn't seem to be exposed in either of those places. Or anywhere else, unfortunately. I'm going to talk to the team about potentially implementing something like this, as I think it has some useful applications.
In the meantime, the best workaround is to pass in the verb with the webhook payload. I'll update this thread as soon as I have news to share!