Modification of the mattermost with gitlab CI

I have integrated Git lab CI and Mattermost. For communication in Team plus build update.

I have Integrated Incoming webhook with git lab service - slack. Till now every thing is good. I am getting push in assigned group.

But I have two Requirement.

I have to change the default template gitlab CI push. Which going in mattermost.
And Currently it pushing on every build to mattermost. I want to parameterised the things. For example if build is happening on Qualification no push in mattermost push only if something happening on production.
I have gone through below

but not able to locate place / file where I have to modify stuff.