Skip to main content
This tutorial walks you through building a complete workflow from scratch. By the end, you’ll have a working automation that:
  1. Triggers when a Salesforce opportunity closes
  2. Uses Ask Attention to extract winning insights from the final sales call
  3. Sends a celebratory Slack message to your team channel
Time to complete: 15–20 minutes Prerequisites:
  • Admin or Builder access in Attention
  • Salesforce integration connected
  • Slack integration connected

Step 1: Create a new workflow

  1. Click your name in the top left corner of Attention
  2. Navigate to Settings > Builder
  3. Click + Create workflow in the top right
  4. Name your workflow “Deal Close Alert”
You’ll see an empty canvas with a placeholder for your trigger.

Step 2: Add the Salesforce trigger

The trigger determines when your workflow runs. For this workflow, we want it to fire whenever an opportunity is marked as Closed Won.
  1. Click the + icon on the canvas to add a trigger
  2. Search for Salesforce and select Record Updated
  3. In the configuration panel:
    • Connection: Select your Salesforce connection (or create one if needed)
    • Object: Select Opportunity
  4. Click Test to pull in sample data from a recent opportunity update
Testing the trigger populates the Data Selector with real field values you can reference in later steps.

Step 3: Add a filter for Closed Won deals

Not every opportunity update should trigger an alert—only closed-won deals. Add a filter to control this.
  1. Click the + icon below your trigger
  2. Search for Router and select it
  3. In the configuration panel:
    • Condition: Set up the following logic:
      • Field: Stage (from the Salesforce trigger data)
      • Operator: equals
      • Value: Closed Won
  4. Click Test to verify the condition evaluates correctly
The router creates two branches: one for when the condition is true (Closed Won) and one for when it’s false. You’ll only add steps to the “true” branch.
Now we need to find the Attention conversation associated with this deal. This lets us extract insights from the winning sales call.
  1. On the true branch, click + to add a step
  2. Search for Attention and select List Conversations
  3. In the configuration panel:
    • Filter by: CRM Record ID
    • Value: Click into the field, open the Data Selector, and insert the Opportunity ID from your Salesforce trigger
  4. Click Test to retrieve matching conversations
This step returns all conversations linked to the opportunity. In most cases, you’ll want the most recent one.

Step 5: Generate insights with Ask Attention

This is where the magic happens. Use Ask Attention to analyze the conversation and extract what made the deal successful.
  1. Click + to add another step
  2. Search for Ask Attention and select it
  3. In the configuration panel:
    • Conversation: Use the Data Selector to insert the conversation ID from the previous step
    • Prompt: Enter a prompt like:
  1. Click Test to see the AI-generated insights
Be specific in your prompts. The more focused your request, the more useful the output.

Step 6: Send a Slack notification

Finally, share the win with your team by sending a Slack message.
  1. Click + to add the final step
  2. Search for Slack and select Send Message
  3. In the configuration panel:
    • Connection: Select your Slack connection
    • Channel: Choose your team’s sales channel (e.g., #sales-wins)
    • Message: Compose your message using the Data Selector to pull in dynamic values:
  1. Click Test to send a test message to the channel

Step 7: Activate your workflow

Once all steps are configured and tested:
  1. Review the complete workflow on the canvas
  2. Toggle the workflow to Active in the top right
  3. Click Save
Your workflow is now live. Every time an opportunity is marked Closed Won in Salesforce, your team will receive a Slack notification with AI-powered insights.

Troubleshooting


Next steps

Now that you’ve built your first workflow, try these variations:
  • Add a second channel: Use another Slack step to notify the account executive directly via DM
  • Update the CRM: Add a Salesforce step to log the AI insights back to the Opportunity record
  • Weekly digest: Create a scheduled workflow that summarizes all closed deals from the past week