Is the "user updated" webhook triggered for post count?

I’m looking to come up with a webhook that will trigger anytime the user object updates (this would include everything that comes in a user export, which includes post count).

I am curious, if a user create a new post, I assume their post count would increase? If so, would the user updated webhook trigger? Or should it?

I don’t believe that the post count is in the user model.

What are you trying to solve?

Are you self hosted (so you can use a plugin)?

1 Like

We do a lot of work with Airtable for automation around our platform, and it would be great to keep an Airtable base in sync with our users in Discourse. Airtable automations accept webhooks, and my goal was to essentially keep a carbon copy of the user object in sync with Airtable.

We are enterprise, so of course we can go down the services route if needed. I don’t think that’s needed here though, it’s just a matter of getting the right series of webhooks.

I just assume if the user export would give me data on a user, then that same data would be available via the user updated webhook, but I suppose that’s not the case.

The post count is in the user_stat model, not the user model. discourse/app/models/user_stat.rb at main · discourse/discourse · GitHub

I don’t see an easy way to track it with an existing webhook unless you have a post webhook that updates the count in your own user or user_stat table.