Skip to main content
Build an agent that reads customer emails and updates your CRM.

What you’ll build

A CRM assistant that:
  1. Monitors customer email threads
  2. Extracts key information (status changes, next steps, sentiment)
  3. Updates CRM records via tools

Prerequisites

  • Airstore installed and authenticated
  • Gmail connected (airstore connect gmail)
  • CRM MCP server configured (Salesforce, HubSpot, or custom)
  • Claude Code installed

Step 1: Add your CRM as a tool

# Example with Salesforce MCP
airstore mcp add \
  --name=salesforce \
  --command="npx @salesforce/mcp-server" \
  --env="SF_TOKEN=xxx" \
  --env="SF_INSTANCE_URL=https://yourorg.salesforce.com"

Step 2: Create smart folders for customer emails

# Active deal emails
airstore create sources/gmail/deals \
  --query "emails from customers with active opportunities"

# Support emails
airstore create sources/gmail/support \
  --query "emails mentioning support ticket or issue"

# Renewal emails
airstore create sources/gmail/renewals \
  --query "emails mentioning renewal or contract from customers"

Step 3: Mount the filesystem

airstore mount ~/airstore

Step 4: Process and update CRM

cd ~/airstore/sources/gmail/deals

claude "For each email thread:
1. Identify the customer and deal
2. Extract any status updates (moving forward, delayed, lost, etc.)
3. Note next steps or action items
4. Assess sentiment (positive, neutral, negative)
5. Update the CRM using the salesforce tool

Use ~/airstore/tools/salesforce update-opportunity for each update."

Example workflow

Claude reads an email:
From: [email protected]
Subject: Re: Enterprise License

Hi,

Great call yesterday! The team loved the demo. We're ready to move 
forward with the enterprise plan. Can you send over the contract?

We'd like to close this by end of month if possible.

Best,
John
Claude updates the CRM:
~/airstore/tools/salesforce update-opportunity \
  --id="OPP-12345" \
  --stage="Contract Sent" \
  --next-step="Send contract" \
  --close-date="2024-01-31" \
  --notes="Customer ready to proceed. Positive sentiment."

Automating daily updates

#!/bin/bash
# crm-sync.sh

# Sync latest emails
airstore sync sources/gmail/deals

cd ~/airstore/sources/gmail/deals

# Process new emails
claude "Review emails from the last 24 hours.
For each customer interaction:
1. Update opportunity stage if changed
2. Log the interaction
3. Update next steps
4. Flag any at-risk deals

Use the salesforce tool for all updates."

# Post summary to Slack
claude "Summarize today's CRM updates" --print | \
  ~/airstore/tools/slack post --channel="#sales" --stdin

Handling multiple CRM systems

# Add HubSpot
airstore mcp add \
  --name=hubspot \
  --command="npx @hubspot/mcp-server" \
  --env="HUBSPOT_API_KEY=xxx"

# Use the appropriate tool based on customer
claude "Update CRM records:
- For enterprise customers, use ~/airstore/tools/salesforce
- For SMB customers, use ~/airstore/tools/hubspot"

Creating follow-up tasks

cd ~/airstore/sources/gmail/deals

claude "For each email that mentions a follow-up or next step:
1. Extract the action item
2. Identify the due date (or suggest one)
3. Create a task in the CRM

Use ~/airstore/tools/salesforce create-task for each item."

Sentiment tracking

Track customer sentiment over time:
claude "Analyze the email thread for each customer:
1. Rate overall sentiment (1-5)
2. Note any concerns or objections raised
3. Identify positive signals
4. Update the opportunity health score

Flag any customers with declining sentiment."

Integration with Linear

Create engineering tickets from customer requests:
cd ~/airstore/sources/gmail/support

claude "For each support email mentioning a bug or feature request:
1. Create a Linear issue with details
2. Link it to the customer in CRM
3. Update the support ticket status

Use ~/airstore/tools/linear create-issue and 
~/airstore/tools/salesforce update-case."

Next steps