I would like to notify another application when a new member is added, for example. ‘member.added’
What payload / json data does this send to the external applicaton?
I would like to notify another application when a new member is added, for example. ‘member.added’
What payload / json data does this send to the external applicaton?
Hi.
I think the best way to find out is to create a free Pipedream account (or a similar app like TypedWebhook) and test it.
I’m using Pipedream to sync my Ghost(Pro) with Fathom Analytics in order to have a trending posts widget on my site.
webhook.site works great for this. Set up a custom integration with the target URL for the webhook and the payload will be logged to the site.
Ah, thank you for this. I didn’t know sites like this existed, so very helpful to know what options are out there to help inspect payload data.
Being new to webhooks, Ghost, and that being a 3rd party service, I was concerned about exposing sensitive data (since I don’t know what the payloads contain.) Is that a valid concern?
In any case, I also implemented a small solution in Gitlab, too, if anyone else is interested. Using a pipeline trigger token, payloads are dumped into a variable called $TRIGGER_PAYLOAD, and using cat and jq can help dig pretty deep into the data. Here is the simplest solution:
webhookpayload: # https://docs.gitlab.com/ee/ci/triggers/index.html#use-a-webhook
script:
- cat $TRIGGER_PAYLOAD
# Retrieve data from the webhook payload
- WEBHOOK_BODY=$(cat $TRIGGER_PAYLOAD)
- NEW_MEMBER_EMAIL=$(echo $WEBHOOK_BODY | jq -r '.members[0].email')