YML Notification Template

kevin's Avatar


29 Nov, 2014 12:31 AM

Wondering if you can provide a bit more clarity on the template parameter.

In the help doc (http://www.appveyor.com/docs/notifications) you have the following:
template: "{message}, {commitId}, ..."

I am not yet clear how the above relates to the default format for example SLACK:
<{{buildUrl}}|Build {{projectName}} {{buildVersion}} {{status}}>
Commit <{{commitUrl}}|{{commitId}}> by {{commitAuthor}} on {{commitDate}}:

Could you provide an example how I can use template?

  1. Support Staff 1 Posted by Feodor Fitsner on 29 Nov, 2014 12:45 AM

    Feodor Fitsner's Avatar

    For every notification provider there is "default" hard-coded template that is used in case custom template was not specified. Default templates work for the most people.

    And you can set your custom template for, say, displaying some additional info about build results.

    Let me know if I correctly understood your question.

  2. 2 Posted by kevin on 29 Nov, 2014 10:17 AM

    kevin's Avatar


    In our slack channel appveyor messages are not displaying correctly for us, the _ are at beginning and end but it is not being formatted italics.


    I would I go about creating a custom template? Would I formatted on “template:” line, how I would like to see it in the mustache syntax? How are line breaks handled? and indenting? do i just use the slack formatting *bold* _italics_ ‘code’ ‘’’performed’’’ etc.

    Is there a full list of variables?


  3. Support Staff 3 Posted by Feodor Fitsner on 30 Nov, 2014 02:37 AM

    Feodor Fitsner's Avatar

    To specify multi-line value in YML use pipe, like shown here: https://github.com/FeodorFitsner/dacpac-sample/blob/master/appveyor...

    Data model is eventData field from Webhook payload: http://www.appveyor.com/docs/notifications#message-template

  4. Support Staff 4 Posted by Feodor Fitsner on 30 Nov, 2014 02:56 AM

    Feodor Fitsner's Avatar

    Re: italics - looks like an issue on Slack side. The last section of formatting spec says "By default bot message text will be formatted..." and AV posts just messages, not attachments.

    I've contacted Slack support to clarify that.

  5. Support Staff 5 Posted by Feodor Fitsner on 01 Dec, 2014 01:26 AM

    Feodor Fitsner's Avatar

    Found the issue - it's multi-line commit message that breaks italics (or any other) formatting. Will deploy update early next week.

  6. Support Staff 6 Posted by Feodor Fitsner on 09 Dec, 2014 07:46 PM

    Feodor Fitsner's Avatar

    The fix has been deployed.

  7. 7 Posted by kevin on 09 Dec, 2014 08:28 PM

    kevin's Avatar


    Thanks for the update and working on this.


  8. 8 Posted by kevin on 02 Jul, 2015 07:37 PM

    kevin's Avatar


    In Notification Yml for Slack is there a way to set chat.postMessage method params directly? Looking to use the Attachment.

    I can roll my own via PS, but I am wondering you if might already included a way to access it.

    Is the AppVeyor icon green/red/blue available for public consumption, notifications?

  9. Support Staff 9 Posted by Feodor Fitsner on 02 Jul, 2015 09:01 PM

    Feodor Fitsner's Avatar
  10. kevin closed this discussion on 16 Nov, 2015 02:06 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac