Slack is essentially a chat room for the whole company, designed to replace email as the primary method of communication and sharing. Its workspace allows the user to organize communications by channels for group discussions and allows for private messages to share information, files, and more all in one place.
Prerequisites for Slack Node
- Create a Slack account.
- Create a Slack App and set the scopes as required.
- Generate an OAuth Access Token in the OAuth & Permissions section.
- In your machine, install the required packages to execute the Slack Functions. To install the packages:
- Open the command prompt.
- Execute the following command to change the directory to C:\jiffyservice\precompile\connector\requirements.
- Execute the following command to install the packages.
pip install -r slack.txt –user
If the command prompt is not recognizing pip, use the command C:\Python37\Scripts\pip install -r slack.txt.
Design the Action steps for Slack Node
In the Actions tab, you can define actions to be performed in Slack Processing Node.
Click the Slack node to open the attributes pane. In the Actions tab, select one of the following options from the first drop-down:
- Slack Functions: To select the required Slack Functions from the list in the second drop-down.
- Custom Slack Function: The Custom Slack functions are created for specific needs if not met by the Predefined Slack functions. All the User Defined Functions created in the HyperApp with Type selected as Slack gets listed in the drop-down.
- Call Function: To select other generic Functions from the list in the second drop-down.
To know more about how to use Functions, click here.
- Set Variable: To set the value for a Variable as needed in further steps. The value set can either be a constant or another variable. If this variable is toggled as an output variable in the Variables tab, it can be mapped to succeeding nodes of the task.
All Input/Local variables of the Slack node are displayed under the Variables tab.
All Default/Custom DataTables in the task are displayed under the Table Definitions tab.
Properties of the Slack Node
- Navigate to Properties and enter Name and Description.
- Enable Mark run Failure on Node Fail and Continue on Failure? options as required.
- Select the Cluster to run on the task from the Clusters drop-down.
Result of Execution in Slack Node
After executing the task, the Result of Execution window displays the following tabs:
- Input: The inputs mapped to the Slack node are displayed.
- Output: The results of the actions performed are displayed in XML format.
- Run Info: The Run Details and Machine Details are displayed.
- Run Details include Run ID, Sequence Number, and Total Node Execution Time (in seconds).
- Machine Details include ID, Name, Host, Port, Iteration Start Time, Iteration End Time, Iteration Time (in seconds).
- Step Data: The details of the steps designed inside the node, the status of each step, and the values stored in the variables are displayed.
- Formatted Output: The output is displayed in the table format.
When the Create Conversation(ABCDE, Sprints, True) function is executed, a private channel with name Sprints is created.