Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Sample message format

{
  "text":"${eventType} in ${spaceLink} by ${userLink}",
  "attachments": [
    {
      "color": "#205081",
      "title": "${contentTitle}",
      "title_link": "${contentLink}",
      "text": "${contentBody}"
    }
  ]
}

New format

{
  "text":"<eventType> in <spaceLink> by <userLink>",
  "attachments": [
    {
      "color": "#205081",
      "title": "<contentTitle>",
      "title_link": "<contentLink>",
      "text": "<contentBody>"
    }
  ]
}
KeyDescriptionSample data

${spaceLink}

<spaceLink>

a link of Confluence spacehttp://localhost:1990/confluence/display/TEST

${spaceKey}

<spaceKey>

<space.key>

a space keyTEST

${contentTitle}

<contentTitle>

a page, blogpost title, task, questionThis is demo page

${contentLink}

<contentLink>

a link of page , blog, task, questionhttp://localhost:1990/confluence/display/TEST/This+is+demo+page?focusedCommentId=884788#comment-884788
${contentBody}

<contentBody>

an excerpt of page,blog,task,commentThis is demo content page

<contentBody; format="substring_2">

<contentBody; format="substring_2_4">

Use substring function to get string from index 2 to length

Use substring function to get string from index 2 to 4 (if string length <4 , it will get length)


${userLink}

<userLink>

an user linkhttp://localhost:1990/confluence/display/~admin

${userName}

<userName>

an usernameadmin

${eventType}

<eventType>

a context of current contenteventType= "New page has created in Space"
<event>An event codeEventType_CreatedPage
<page>If you are working on a pagehttps://docs.atlassian.com/confluence/5.9.7/com/atlassian/confluence/pages/Page.html
<blogpost>A blogpost objecthttps://docs.atlassian.com/confluence/5.9.7/com/atlassian/confluence/pages/BlogPost.html
<space>A space objecthttps://docs.atlassian.com/confluence/5.9.7/com/atlassian/confluence/spaces/Space.html
<comment>A comment objecthttps://docs.atlassian.com/confluence/5.9.7/com/atlassian/confluence/pages/Comment.html
<question>A question objecthttps://docs.atlassian.com/confluence/5.9.7/com/atlassian/confluence/content/CustomContentEntityObject.html
<answer>A answer objecthttps://docs.atlassian.com/confluence/5.9.7/com/atlassian/confluence/content/CustomContentEntityObject.html
<task>A task objecthttps://docs.atlassian.com/confluence/5.9.7/com/atlassian/confluence/core/ContentEntityObject.html
  • No labels