Override Incoming Webhook Username

What determines an incoming webhook’s username? Can this be changed?

Yes, on the config.json and I believe thru the system console, you can change it.

And for further information on how to use it, you can read Redirect more specifically additional notes item 3.

In addition, with Enable integrations to override usernames turned on, you can also override the username the message posts as by providing a username parameter in your JSON payload. For example, you might want your message looking like it came from a robot so you can use payload={“username”: “robot”, “text”: “Hello, this is some text.”} to change the username of the post to “robot”. Note, to combat any malicious users from trying to use this to perform phishing attacks a BOT indicator appears next to posts coming from webhooks.

I was doing that, however I did not enable overrides in the system. Thank You!

So that works if you use a regular mattermost payload, but what about for attachments?

https://docs.mattermost.com/developer/message-attachments.html

Attachments have its own array into the payload from my understanding, never used it though…

If you meant an actual file upload I am unsure the incoming webhook can do that in this case you might want to check the API it self https://api.mattermost.com/v4/#tag/files%2Fpaths%2F~1files%2Fpost

We observed that the webhook is taking name of user created it. Instead of enabling integrations to override usernames, is it possible to attach a fixed username (bot) for a given webhook.