The Slack Integration lets you to easily create Slack bots with natural language understanding based on Conversational Agents (Dialogflow CX) technology.
Limitations
- Only text inputin the agent's default language is supported by this integration.
Set Up Slack
In order to set up the Slack integration for your agent, you'll need the following:
- A Slack account
- A Slack workspace
Create a Slack bot
- Navigate to your Slack Apps
- Create a new slack app from an app manifest. Below is an example manifest.
Make sure  that the oath_configand event_subscriptionsfields match
with the example manifest. display_information: name: Conversational Agents (Dialogflow CX) description: Conversational Agents (Dialogflow CX) integration background_color: "#1148b8" features: app_home: home_tab_enabled: false messages_tab_enabled: true messages_tab_read_only_enabled: false bot_user: display_name: CX always_online: true oauth_config: scopes: bot: - app_mentions:read - chat:write - im:history - im:read - im:write - incoming-webhook settings: event_subscriptions: request_url: https://dialogflow-slack-4vnhuutqka-uc.a.run.app bot_events: - app_mention - message.im org_deploy_enabled: false socket_mode_enabled: false token_rotation_enabled: false 
- Install your application into the workspace of your choice -  Bot User OAuth Token - Navigate to Install App > OAuth Tokens for Your Workspace > Bot User OAuth Token
 
-  Signing Token - Navigate to Basic Information > App Credentials > Signing Secret
 
 
-  Bot User OAuth Token 
Set up Conversational Agents (Dialogflow CX)
- Click Managetab on the left panel.
- Click Integrationsin the left menu.
- Click the Connectbutton on the Slacktile.
- Fill in the following information: - Access token
- Signing token
 
- Choose an environment, as applicable.
- Click Start.
- Copy the Webhook URL.
Enable webhook in Slack
Return to your Slack App and paste your webhook url under Event Subscriptions > Enable Events > Request URL
Testing
To test your configured app, in the workspace you installed it in, mention it in a group channel or send it a DM.
Rich response messages
The rich response messages are supported via Custom Payloadin Fulfillment . Please see Slack message API for the message format.
For example, the following custom payload provides a simple Slack text message:
{
  "text": "Hello, world"
} 
Channel specific responses
After you configure the channel-specific
responses 
, the
channel DF_CX_SLACK 
is automatically used when the agent responds
to Slack messages.

