Slack Tool > Introduction to Slack Tool recipe > Configure the Slack Tool
  

Configure the Slack Tool

Before you run the Python script in the Slack tool, ensure that your Python environment contains the following libraries:
If these libraries are not installed, you can install them using the following command:
./<Latest AI Agent Runtime service version>/pythonRuntime/python/bin/pip install requests PyPDF2 slack_sdk
To configure the Slack tool, perform the following steps:
  1. 1Open the Slack_Tool tool connection.
  2. 2On the Code tab, uncomment the configuration block and enter the following property values within double quotes:
  3. The following snippet shows a sample configuration block:
    ENV_FILE = ".env"

    #Set Slack credentials for and comment it after first run
    #set_key(ENV_FILE, "SLACK_CLIENT_ID", "")
    #set_key(ENV_FILE, "SLACK_CLIENT_SECRET", "")
    #LEGACY_BOT_TOKEN = ""
    After the initial run, you can remove these values.
    Alternatively, you can manually add these values to your environment variables. If you do so, you only need to provide the LEGACY_BOT_TOKEN .
  4. 3On the Input Parameters tab, perform either of the following step:
  5. 4Save the connection.