Generate a weekly Salesforce pipeline report using Claude Cowork
Prerequisites
- Claude Desktop with Cowork enabled
- Salesforce instance URL and access token
- Slack channel ID or incoming webhook URL
- A computer that stays awake on Monday mornings
Overview
Claude Cowork lets you define a weekly task in plain English. You describe what data to pull from Salesforce and how to format the report, and Claude handles the API calls, calculations, and Slack posting automatically — no script required.
Step 1: Create the Cowork task
Open Claude Desktop and go to the Cowork tab. Click + New task.
Title: Weekly Salesforce pipeline report
Description:
You are a sales ops assistant. Generate a weekly pipeline report from Salesforce and post it to Slack.
Steps:
1. Query Salesforce for open pipeline data using the REST API.
GET https://YOUR_INSTANCE.my.salesforce.com/services/data/v59.0/query
Auth: Bearer token — use the SALESFORCE_ACCESS_TOKEN environment variable.
Run these queries:
a. Open pipeline by stage: SELECT StageName, COUNT(Id) deal_count, SUM(Amount) total_amount FROM Opportunity WHERE IsClosed = false AND Amount != null GROUP BY StageName ORDER BY SUM(Amount) DESC
b. Closed this week: SELECT COUNT(Id) closed_count, SUM(Amount) closed_amount FROM Opportunity WHERE CloseDate = THIS_WEEK AND IsWon = true
c. New this week: SELECT COUNT(Id) new_count, SUM(Amount) new_amount FROM Opportunity WHERE CreatedDate = THIS_WEEK
2. Calculate key metrics:
- Total open pipeline value
- Number of open deals
- Average deal size
- Deals closed this week (count and value)
- New deals this week (count and value)
3. Format a clean Slack message with:
- Header: "📊 Weekly Pipeline Report — [date]"
- Summary metrics in a grid
- Stage breakdown with deal counts and amounts
4. Post to Slack using SLACK_BOT_TOKEN and SLACK_CHANNEL_ID environment variables.
Important: All dollar amounts should be formatted with commas (e.g., $1,250,000).Replace YOUR_INSTANCE with your actual Salesforce instance URL.
Store credentials as shell environment variables. Claude reads them when executing bash commands, keeping sensitive data out of the task description.
Step 2: Set the schedule
Frequency: Weekly on Mondays at 8:00 AM
Step 3: Run manually first
Click Run now to test. A successful run looks like:
Queried Salesforce pipeline data. Processing report.
📊 Weekly Pipeline Report — March 5, 2026
Total Pipeline: $2,450,000 | Open Deals: 34 | Avg Deal Size: $72,059
Closed This Week: 3 deals — $185,000
New This Week: 7 deals — $340,000
By Stage:
• Negotiation: 8 deals — $890,000
• Proposal: 12 deals — $720,000
• Discovery: 9 deals — $540,000
• Qualification: 5 deals — $300,000
Posted pipeline report to Slack.Scheduled tasks only run while Claude Desktop is open. If your laptop is closed on Monday morning, the report is skipped. For reliable weekly delivery, use the Agent Skill with cron or the n8n approach.
When to use this approach
- You want a pipeline report running this week with zero code
- You're experimenting with which metrics and format your team prefers
- You want to combine the pipeline report with other weekly summaries in a single task
- Your team works standard hours and a Monday morning delivery window is acceptable
When to switch approaches
- You need reliable delivery regardless of laptop state → use n8n or the Agent Skill with cron
- You want to customize the report format with Slack Block Kit → use n8n
- You need to run reports for multiple pipelines or teams → use n8n with separate workflows
Need help implementing this?
We build and optimize automation systems for mid-market businesses. Let's discuss the right approach for your team.