You can't currently attach files using the incoming webhooks api. You would need to use the mattermost client api to make a post with files attached to it. Here's an example of how you could …