A scrip to post and update Slack messages linked to BestPractical RT tickets.
Tickets are posted in slack when created or moved to an applied RT queue. A Take or Steal link is displayed as appropriate.
Slack message is updated when ticket is taken or when Requestor or Owner are modified.
- Create a Slack App: https://api.slack.com/apps
- From Scratch
- Add features and functionality * Permissions > Scopes > Bot Token Scopes: channels:read, chat:write * Permissions > Scopes > OAuth Tokens for Your Workspace > Install to Workspace * Bots > Messages Tab
- Install your app
- Create a "slack_timestamp" Custom Field in your RT instance. Apply it whichever queues you will use with this scrip.
- Create a scrip:
- Basics
- Condition: User Defined
- Action: User Defined
- Template: Blank
- Custom condition: Paste code from the CustomCondition file.
- Custom action preparation code: Paste code from the CustomActionPrep file.
- Custom action commit: Paste code from CustomActionCommit file.
- Configure it
- set your $slackURL, rtURL, $token
- find the slack channel IDs and configure queue -> channel mapping
- In slack, right click the channel, copy link, past it somewhere. The id is at the end. Looks something like this: "C011AAXXXX"
- Apply the scrip to the desired RT queues.
- Invite your Slack App to the desired channels.