How to build a custom webhook for member updates in JSON & Node.js ? Answered

Post author
John Matias

Hey Tyler Bell or Julian Galluzzo has the webhook for member updated changed to include updates to member JSON?

Comments

12 comments

  • Comment author
    Tyler Bell

    Hi John, yes it has 🙂

    If the json updates the reason will include “json.updated”

    0
  • Comment author
    John Matias

    Ack! and Yay!

    I got slammed with an influx of webhooks into one of my scenarios.

    I just need to filter out the JSON updates for this particular workflow so it doesn't fire off unintentionally. 😅

    0
  • Comment author
    Tyler Bell

    Ah okay!

    Also, we haven’t made this update public yet - so there is an opportunity for us to make changes to it.

    Perhaps a member.json.updated event would be better.

    Because the member updated payload still doesn’t include JSON

    0
  • Comment author
    John Matias

    Hmm - yea that could be a better way to go. It would give us more granularity and control. But I personally don't have a specific use case for it at this moment. So maybe one of the others could chime in

    Do you have a list of the reasons?

    0
  • Comment author
    Shadi null

    I think John’s point about separating the watch events is a really good one. It prevents accidentally causing an influx of triggers on existing operations that run on a “watch member update” event, it offers granularity (as John mentioned), also at least for me, there’s a higher probability that I am aiming to watch for custom field updates with the current “watch member update”. Especially for those who use 3rd party systems like Make.com having the update JSON watch and update watch separate is quite a cost saver as even triggering just 1 watch operation across multiple scenarios before filtering it out could add up in extra cost.

    Just my 2 cents :)

    0
  • Comment author
    Tyler Bell

    John Matias Possible reasons are

    "email.updated" | "metaData.updated" | "json.updated" | "customFields.updated" | "verified"
    0
  • Comment author
    John Matias

    Awesome thanks! That’s super helpful.

    0
  • Comment author
    Nikita Sukhanov

    Hi, i want to make webhook when i update my member, how can i do it?

    0
  • Comment author
    A J

    Hey Nikita Sukhanov, yes you can head to Dev Tools in memberstack dashboard and scroll down to find Webhooks section. There you can create endpoint to subscribe to member.updated event and you will receive information in that webhook whenever a member is updated. This is a custom route, in case you are using tools like Make / Zapier, you don't need to do this via Memberstack dashboard, you can directly setup triggers in Make / Zapier which listens to member updated event. Hope this helps.

    0
  • Comment author
    Nikita Sukhanov

    i dont use make/zapier, i am using node.js, and i cant find how to make webhook on my url adress

    0
  • Comment author
    A J

    In that case, I believe you can create an endpoint with Svix play using the first approach shared above and explore the developer docs on how to verify the webhook signature and process the webhook accordingly. Hope this helps.

    0
  • Comment author
    Nikita Sukhanov

    Okey, thanks

    0

Please sign in to leave a comment.