Bots – Advanced

Lesson: Integrating an AI Bot with Slack & Automated Flows

Learn how to trigger a Noca AI bot directly from a Slack channel, process incoming user requests, and perform automated actions in external platforms like Salesforce—all through visual, no-code flows.

Prerequisites

Before starting this guide, ensure you have:

  • Access to your Noca AI workspace.

  • An existing Noca Bot configured with Salesforce access and case creation automations.

  • An active Slack workspace connection integrated with Noca AI.

Step 1: Create a New Flow

  1. From the left sidebar menu, navigate to Flows and click New.

  2. Select Create in Builder to open the visual flow canvas.

Step 2: Set Up the Slack Event Trigger

  1. Click Add Node and search for Slack.

  2. Select Slack Event as the trigger type.

  3. Choose your existing Slack connection (or click Create a New Connection if you haven’t linked Slack yet).

  4. Under Message was sent to, select Public Channel.

  5. Pick your target channel (e.g., bot test) and save the node.

Step 3: Add a Condition to Prevent Infinite Loops

  1. Click the plus icon to add the next node and select Condition.

  2. Define Rule 1 using the Data Kit:

    • Select Slack > App Fields > Message.

    • Set the operator to contains.

    • Enter the text criteria: Noca.

  3. (Optional Note) This rule ensures the flow only runs when a message explicitly mentions “Noca,” preventing the bot from replying to itself in a loop.

Step 4: Add and Map the Bot Node

  1. Under the True branch of Rule 1, click Add Node and select Bot.

  2. Select your pre-built bot (e.g., Salesforce Cases Bot) and click Insert Node.

  3. In the right-hand panel, map the incoming Slack data to the Bot:

    • Message: Drag and map Slack > App Fields > Message.

    • Leave Session ID and Expiration default/unmapped.

Step 5: Send the Bot’s Response Back to Slack

  1. From the Bot node’s On Message output, add a new Slack node.

  2. Select the action Send to Channel.

  3. Choose the same target channel configured in Step 2 (bot test).

  4. In the Type a Message field, open the Data Kit and navigate to Condition > Rule 1 > Bot > App Fields > Response.

  5. Map Response to the message body and click Insert Node.

Step 6: Publish and Test Your Flow

  1. Click Save in the top navigation bar.

  2. Select Go Live to publish your active version.

  3. Open your Slack channel (#bot test) and send a message containing your keyword and request:

    “Noca, Renan contacted me about not being able to access their account. The password is correct. This is high priority. Please create a case.”

  4. Return to Noca AI, open Logs, and inspect the live execution trace to watch the bot create the Salesforce case and post the confirmation back into Slack!

Tip: You can swap the Slack trigger or action nodes with Teams, WhatsApp, or Webhooks using the exact same core bot logic!