See llms.txt for all machine-readable content.

Back to Templates

Recommend Salesforce opportunity partners with Claude, Crossbeam, Slack and Gmail

Quick overview

This workflow runs hourly to find new open Salesforce opportunities, uses Claude (Anthropic) with Crossbeam MCP to recommend the best partner and draft an intro email, then posts the recommendation to Slack for approval before drafting/sending via Gmail and logging the outcome back to Salesforce and an n8n Data Table.

How it works

  1. Runs every hour (or manually) and checks that required configuration values like the Slack channel ID and Salesforce base URL are set.
  2. Queries Salesforce for recently created, open opportunities and shapes the key opportunity, account, and owner fields needed for partner matching.
  3. Applies filters for stages, record types, excluded opportunity types, optional subsidiary-account skipping, dedupes against an n8n Data Table, and caps how many opportunities are processed per run.
  4. For each remaining opportunity, Claude calls Crossbeam MCP read-only tools to find overlapping partners and returns structured JSON with a single recommended partner, confidence, reasoning, and a draft intro email.
  5. Posts qualified recommendations to Slack (optionally mentioning the opportunity owner) and waits for an approval-form decision to draft an email, only log the recommendation, or skip.
  6. If not in dry-run mode, creates a Gmail draft or sends the email (depending on settings), logs a Salesforce Task on the opportunity, records the outcome in the n8n Data Table, and replies in the Slack thread with the result.

Setup

  1. Add credentials for Salesforce OAuth2, Anthropic (Claude) API, Crossbeam MCP OAuth2, Slack OAuth2 (with Interactivity enabled and optionally users:read.email), and Gmail OAuth2.
  2. Create an n8n Data Table (for example “Opportunity partner recommendations”) with columns: opportunity_id, opportunity_name, account_name, partner_name, partner_owner_email, confidence, status, mode, decided_at, and select it in all three Data Table steps.
  3. In the configuration step, set slack_channel_id, salesforce_base_url, and your_company_name, then adjust lookback_hours, min_amount, stage/record type filters, partners_to_ignore, min_confidence, and approval_wait_hours as needed.
  4. Invite the Slack app to the target channel and use the manual test run with dry_run enabled to validate Slack interactivity and the approval form.
  5. Set dry_run to false before activating the workflow to allow writes to Gmail and Salesforce.