slack=Slack::Incoming::Webhooks.new"WEBHOOK_URL",channel:'#other-channel',username:'monkey-bot'# Direct messageslack=Slack::Incoming::Webhooks.new"WEBHOOK_URL",channel:'@shoyan'
attachments=[{title:"Ticket #1943: Can't reset my password",title_link:"https://groove.hq/path/to/ticket/1943",text:"Help! I tried to reset my password but nothing happened!",color:"#7CD197"}]slack.post"New ticket from Andrea Lee",attachments:attachments
Example2
1234567891011121314151617
attachments=[{text:"<https://honeybadger.io/path/to/event/|ReferenceError> - UI is not defined",fields:[{title:"Project",value:"Awesome Project",short:true},{title:"Environment",value:"production",short:true}],color:"#F35A00"}]slack.post"",attachments:attachments
Example3
12345678
attachments=[{title:"Network traffic (kb/s)",title_link:"https://datadog.com/path/to/event",text:"How does this look? @slack-ops - Sent by Julie Dodd",image_url:"https://api.slack.com/img/api/attachment_example_datadog.png",color:"#764FA5"}]slack.post"",attachments:attachments