Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Created July 10, 2016 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WietseWind/6eb246554df67fe77e404a660f5f5005 to your computer and use it in GitHub Desktop.
Save WietseWind/6eb246554df67fe77e404a660f5f5005 to your computer and use it in GitHub Desktop.
Slack notificatie met sabre.post i.p.v. api.Notification_Slack (voor als je naar een ander team wilt sturen dan in de configuratie aanwezig)
{% do sabre.post('https://hooks.slack.com/services/xx/yy/zz', {
text: "Nieuwe lead :tada: Bezoek het lead-panel voor meer informatie of om de lead toe te kennen.\n*Details:*\n",
username: "nodum",
icon_url: "https://nodumapp.io/static/apple-touch-icon-180x180.png",
channel: "@ipub_wietse",
attachments : [
{
color : "#4C6ADF",
fallback: "Lead: " ~ param.post.company,
text: param.post.desc.short,
footer: "Door " ~ session.get.__AUTH_USER.personName ~ ' ('~session.get.__AUTH_USER.companyName~')',
fields : [
{ title : "Bedrijf", value : param.post.company, short : true },
{ title : "Persoon", value : param.post.person, short : true },
{ title : "Brance", value : param.post.branche, short : true },
{ title : "Kanaal", value : param.post.channel, short : true },
{ title : "Link", value : "https://nodumapp.io/leads/view/id:"~lead, short : false }
]
}
]
}|json_encode) %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment