Notes on using Slack
PaginationCopy
There is a limit of 1000 results per response. For more details see their limitation page here.
Reference schema Copy
If you want to display certain attributes in a Slack message while using interpolation then you must make sure you reference them correctly.
Note that Tray.io is capable of understanding Markdown formatting as well - such as *bold*
.
Links: Use triangular brackets
<>
Names: Include the symbol
@
and<>
so that the name is linked as usual
Reference tableCopy
Sending messages through the Slack connector supports the use of Slack-specific markdown formatting. Common examples of markdown formatting are listed in the table below.
Visual Style | Text Notation |
---|---|
Bold |
|
Italic |
|
Strikethrough |
|
Line Break | Line |
Quoted Text |
|
Code |
|
Multi-Line Code |
|
Links |
|
Emoji |
|
User |
|
Channel |
|
Best Practice: Add a WF URLCopy
It is a good practice to add a link to the Workflow URL so that users will know from where the bot/ automated message came from.
This is a great way to troubleshoot quickly as an organisation may have multiple workflows involving Slack connector automations.
We recommend adding the URL using the following jsonpath: $.env.execution_log_url
and placing it in the footer section of the properties panel.
So in theory your final footer would be: <{$.env.execution_log_url}|Sent via tray.io>
IMPORTANT!: When doing this make sure you do not add or reveal any workflow URLs which could contain sensitive information.
User TokensCopy
A Slack User Token is typically used when you want to access the Slack API on behalf of a specific user. It provides authorization and allows your application to perform actions or retrieve information for that user within a Slack workspace.
Some scenarios where you might need to use a Slack User Token include building a Slack integration, automating user-specific tasks and creating bots or chatbots.
To locate your Slack User Token click through to the app in question. Navigate through Features -> OAuth & permissions -> OAuth Tokens for Your Workspace. Copy the required token.
USER TIP: Remember that user tokens should be kept secure as they grant access to a user's account and their associated permissions within the workspace. Users should only provide their tokens to trusted applications and developers should follow security best practices to protect these tokens.
Username depreciationCopy
Please note that passing a username
as a channel value has been depreciated, along with the whole content of usernames on slack.
Please use channel ID’s instead to make sure your messages get to their desired location.