Incoming webhooks as direct messages, From User is me?


#1

I have an incoming webhook that is being used to send direct messages to users as, for lack of a better term, “Alerts”, as an example when one of our labs completes a Testing Quotation or a Task, certain people should get a message through mattermost. Everything works as expected, except these messages show up in my direct message history. Is there a way to prevent this?
Some better questions might be,

  • Is there a better design pattern here?
  • Should I create a specific user for webhooks?
  • Is this more like a bot?

Ultimately I would like to find a logical fix before my account gets inundated with hundreds of DM alerts a day.


#2

Well technically a webhook, uses your username or the user that created it, so the message will remain, yes.

I guess creating a specific user for that purpose might work better in your case.


#3

I’ve gone through this before.
The only solution is to create a fake user, log in, and create the webhook logged as the fake user.


#4

That’s what I figured. What’s your use case if you don’t mind me asking? And how do you like mattermost?


#5

We have a bot that made a lot of things:

  • Deploy
  • Monitor servers
  • Send alerts
  • Follow JIRA stories
  • Set reminders

Some actions are in_channel, but a lot of them are async and/or private, so a direct channel communication made things easier.


#6

That’s awesome. I’m working hard to evaluate mattermost as a viable alternative to jabber.