Back to Play 7 Resources
Play 7: Email Assistant

Play 7 Complete Implementation Guide

Full walkthrough: trigger mechanism, CRM context pull, drafting, flag system, logging.

Play 7 Complete Implementation Guide

Email is the operational backbone of professional services. Partners spend 2-3 hours daily on email. Associates spend more. Most of that time goes to routine responses that follow predictable patterns.

Play 7 automates the mechanical work while preserving the judgment work. The system monitors incoming email, pulls client context from your CRM

, drafts responses using firm-approved language, flags messages that need human review, and logs everything for compliance.

This guide walks through the complete technical implementation. You'll configure triggers, connect your CRM

, build the drafting engine, set up the flag system, and implement logging. Each section includes exact configuration steps and real code examples.

Trigger Mechanism Setup

The trigger determines when the Email Assistant activates. You have three options: email forwarding rules, API webhooks

, or direct mailbox monitoring. Most firms use API
webhooks
for reliability and speed.

Microsoft 365 Implementation

Step 1: Register the Application

Navigate to Azure Active Directory > App Registrations > New Registration. Name it "Email Assistant" and set the redirect URI to your automation platform's webhook endpoint.

Under API

Permissions, add:

  • Mail.Read (delegated and application)
  • Mail.ReadWrite (delegated and application)
  • User.Read (delegated)

Grant admin consent for your tenant.

Step 2: Configure the Webhook

Subscription

Use Microsoft Graph API

to create a subscription that monitors the shared inbox or individual mailboxes:

POST https://graph.microsoft.com/v1.0/subscriptions
{
  "changeType": "created",
  "notificationUrl": "https://your-automation-platform.com/webhook",
  "resource": "users/support@yourfirm.com/mailFolders('Inbox')/messages",
  "expirationDateTime": "2024-12-31T18:23:45.9356913Z",
  "clientState": "secretClientValue"
}

The webhook

fires within 3 seconds of email arrival. Your automation platform receives the message ID and sender details.

Step 3: Set Trigger Conditions

Not every email needs AI drafting. Configure filters in your automation platform (Make.com, Zapier, or Power Automate):

  • Exclude internal emails (sender domain matches your firm)
  • Exclude automated notifications (sender contains "noreply" or "no-reply")
  • Exclude emails already replied to (check for "RE:" in subject)
  • Include only emails to monitored addresses (support@, intake@, specific partner emails)

Test with 10-20 real emails from your inbox. Verify the trigger fires correctly and filters work as expected.

Google Workspace Implementation

Step 1: Enable Gmail API

Go to Google Cloud Console > APIs

& Services > Enable APIs
. Search for and enable Gmail API
.

Create a service account under IAM & Admin > Service Accounts. Download the JSON key file. Store it securely in your automation platform.

Step 2: Set Up Push Notifications

Gmail uses Pub/Sub for real-time notifications. Create a topic in Cloud Pub/Sub, then configure Gmail to publish to it:

POST https://gmail.googleapis.com/gmail/v1/users/me/watch
{
  "topicName": "projects/your-project/topics/gmail-notifications",
  "labelIds": ["INBOX"]
}

Your automation platform subscribes to this topic and receives notifications when new emails arrive.

Step 3: Configure Filtering Logic

Apply the same exclusion rules as Microsoft 365. Google Workspace allows additional filtering using Gmail labels. Create a label called "AI-Draft-Eligible" and configure server-side filters to apply it automatically based on sender, subject patterns, or recipient.

CRM
Context Pull

The Email Assistant needs client context to draft relevant responses. This section covers Salesforce and HubSpot integrations. The pattern applies to any CRM

with an API
.

Salesforce Integration

Step 1: Create a Connected App

In Salesforce Setup, navigate to App Manager > New Connected App. Enable OAuth settings and select these scopes:

  • Access and manage your data (api)
  • Perform requests on your behalf at any time (refresh_token, offline_access)

Copy the Consumer Key and Consumer Secret.

Step 2: Build the Context Query

When the trigger fires, extract the sender's email address. Query Salesforce for matching Contact or Lead records:

GET https://yourinstance.salesforce.com/services/data/v58.0/query/?q=SELECT Id, Name, Account.Name, Account.Industry, Owner.Name, Description, (SELECT Subject, Status, Priority FROM Cases ORDER BY CreatedDate DESC LIMIT 5) FROM Contact WHERE Email = 'client@example.com'

This returns the contact name, account details, account owner, and the five most recent cases. Parse this data into a structured context object.

Step 3: Handle Missing Records

If no Contact or Lead exists, the Email Assistant should flag the email for manual review rather than attempt a draft. Configure a fallback response template for unknown senders that acknowledges receipt and promises a response within 24 hours.

Step 4: Cache Context Data

CRM

API
calls add 200-500ms latency. Implement a 5-minute cache for frequently emailing clients. Store the context in Redis or your automation platform's data store. Refresh on cache miss.

HubSpot Integration

Step 1: Generate API

Key

In HubSpot, go to Settings > Integrations > API

Key. Generate a private app with these scopes:

  • crm.objects.contacts.read
  • crm.objects.companies.read
  • crm.objects.deals.read
  • tickets

Step 2: Query Contact and Associated Records

Use the email address to find the contact, then pull associated company and deal data:

GET https://api.hubapi.com/crm/v3/objects/contacts/search
{
  "filterGroups": [{
    "filters": [{
      "propertyName": "email",
      "operator": "EQ",
      "value": "client@example.com"
    }]
  }],
  "properties": ["firstname", "lastname", "company", "hs_lead_status"],
  "associations": ["companies", "deals", "tickets"]
}

Parse the response to extract client name, company name, deal stage, and recent ticket subjects.

Step 3: Build Context Summary

Transform the raw CRM

data into a plain-English summary the AI can use:

Client: Jane Smith
Company: Acme Corp (Manufacturing)
Relationship Owner: Tom Wilson
Active Matter: Q4 Tax Planning (In Progress)
Recent Interactions: 
- 11/15: Submitted extension request
- 11/01: Quarterly review call
- 10/20: Sent estimated payment reminder

This summary becomes part of the AI prompt.

Email Drafting Engine

The drafting engine combines the email content, CRM

context, and firm-specific guidelines to generate responses. Use GPT-4 or Claude 3.5 Sonnet for best results.

Build the System Prompt

Create a master system prompt that defines the assistant's role, tone, and constraints:

You are an email assistant for [Firm Name], a [practice area] firm. Your job is to draft professional, accurate responses to client emails.

TONE AND STYLE:
- Professional but warm
- Direct and concise (under 150 words)
- Use client's name in greeting
- Sign with the relationship owner's name

CONSTRAINTS:
- Never provide legal/tax/financial advice
- Never quote fees without partner approval
- Never commit to deadlines without checking calendar
- Never discuss other clients or matters

RESPONSE PATTERNS:
- Acknowledge receipt within first sentence
- Reference specific details from their email
- Provide next steps or timeline
- Offer a call if the matter is complex

If you cannot draft a complete response due to missing information or complexity, output: FLAG_FOR_REVIEW with a brief explanation.

Customize this for your firm's voice and practice area.

Structure the Drafting Prompt

For each incoming email, construct a prompt that includes:

  1. The system prompt (above)
  2. Client context from CRM
  3. The incoming email content
  4. Any relevant firm templates or previous correspondence

Example prompt structure:

[SYSTEM PROMPT]

CLIENT CONTEXT:
[CRM summary from previous section]

INCOMING EMAIL:
From: jane.smith@acmecorp.com
Subject: Question about Q4 estimated payment
Body: Hi Tom, I'm traveling next week and won't be able to make the estimated payment by the 15th. Can I pay when I return on the 22nd without penalty? Thanks, Jane

TASK:
Draft a response email. If this requires partner review, output FLAG_FOR_REVIEW.

Implement the API
Call

Use your automation platform to call the AI API

. Here's a Make.com HTTP module configuration:

URL: https://api.openai.com/v1/chat/completions

Method: POST

Headers:

  • Authorization: Bearer [YOUR_API_KEY]
  • Content-Type: application/json

Body:

{
  "model": "gpt-4-turbo-preview",
  "messages": [
    {"role": "system", "content": "[system prompt]"},
    {"role": "user", "content": "[full prompt with context and email]"}
  ],
  "temperature": 0.3,
  "max_tokens": 500
}

Temperature of 0.3 keeps responses consistent. Max tokens of 500 limits response length to roughly 150 words.

Parse and Format the Response

Extract the AI's response from the API

output. Check if it contains "FLAG_FOR_REVIEW". If yes, route to the flag system (next section). If no, format the draft:

  • Add proper email greeting
  • Insert line breaks for readability
  • Add signature block with relationship owner's name and contact info
  • Preserve any formatting from the AI response

Store the draft in your automation platform's data store or send it directly to the review interface.

Handle Edge Cases

Long Email Chains: If the incoming email includes a long thread, truncate to the most recent 3 messages. Include a note: "[Earlier messages omitted for context]"

Attachments: The AI cannot read attachments. If an attachment is present, add this to the prompt: "Note: Client attached [filename]. Review attachment before sending response."

Non-English Emails: Detect language using a simple check (presence of non-ASCII characters or common foreign words). Route non-English emails to FLAG_FOR_REVIEW unless you've configured multilingual prompts.

Flag System Configuration

The flag system routes emails that need human review. Flags fall into three categories: complexity flags (AI can't draft), urgency flags (needs immediate attention), and quality flags (draft needs review).

Define Flag Types

Create five flag types:

URGENT - Client used words like "immediately", "ASAP", "emergency", or mentioned a deadline within 48 hours.

COMPLEX - Email asks multiple questions, discusses fees, requests legal advice, or mentions litigation.

NEW_CLIENT - No CRM

record exists for sender.

DRAFT_UNCERTAIN - AI output contains "FLAG_FOR_REVIEW" or confidence score below threshold.

ATTACHMENT_REVIEW - Email contains attachments that may require review before responding.

Implement Flag Detection Logic

Build a router in your automation platform that checks for flag conditions:

Urgency Detection:

IF email body contains ["urgent", "ASAP", "immediately", "emergency", "by EOD", "by end of day"]
OR subject contains "URGENT"
OR email mentions date within 48 hours
THEN apply URGENT flag

Complexity Detection:

IF email contains ["how much", "what's your rate", "fee", "cost", "price"]
OR email contains ["lawsuit", "litigation", "court", "judge"]
OR email asks more than 2 questions (count "?" characters)
OR email length exceeds 500 words
THEN apply COMPLEX flag

New Client Detection:

IF CRM query returned no results
THEN apply NEW_CLIENT flag

Draft Quality Check:

IF AI response contains "FLAG_FOR_REVIEW"
OR AI response length less than 30 words
OR AI response contains "[PLACEHOLDER]"
THEN apply DRAFT_UNCERTAIN flag

Attachment Check:

IF email has attachments
AND attachment type in [.pdf, .docx, .xlsx, .zip]
THEN apply ATTACHMENT_REVIEW flag

Route Flagged Emails

Emails with flags skip the auto-draft process and route to a review queue. Configure routing rules:

  • URGENT flags go to Slack channel #urgent-client-emails with @channel mention
  • COMPLEX flags go to the relationship owner's task list in your project management system
  • NEW_CLIENT flags go to intake coordinator's email
  • DRAFT_UNCERTAIN flags go to review queue with the attempted draft attached
  • ATTACHMENT_REVIEW flags go to relationship owner with attachment preview

Use your automation platform's routing modules to send notifications to the appropriate channels.

Build the Review Interface

Create a simple review interface where staff can see flagged emails and take action. Options:

Airtable Base: Create a table with columns for Email Subject, Sender, Flag Type, Received Time, Assigned To, Status. Use Airtable forms for quick disposition.

Notion Database: Similar structure. Add a "Draft Response" field where reviewers can edit the AI draft before sending.

Custom Dashboard: If you have development resources, build a simple web interface that pulls flagged emails from your data store and provides "Approve", "Edit", or "Reassign" buttons.

The review interface should show the original email, CRM

context, AI draft (if generated), and flag reason.

Logging and Audit Trail

Every email interaction must be logged for compliance, quality control, and continuous improvement.

Configure Logging Database

Set up a logging table in Airtable, Google Sheets, or a proper database. Required fields:

  • Timestamp (when email received)
  • Email ID (unique identifier from email system)
  • Sender Email
  • Sender Name (from CRM
    )
  • Subject Line
  • Email Body (truncated to first 500 characters)
  • CRM
    Context Retrieved (yes/no)
  • Draft Generated (yes/no)
  • Draft Text (full draft if generated)
  • Flags Applied (comma-separated list)
  • Routed To (person or system that handled)
  • Final Action (sent, edited and sent, manual response, no response)
  • Response Time (minutes from receipt to send)
  • Reviewed By (if manually reviewed)

Implement Logging Calls

Add logging steps at key points in your automation:

On Email Receipt:

Log: Timestamp, Email ID, Sender Email, Subject, Body

After CRM

Query:

Update Log: CRM Context Retrieved = Yes, Sender Name = [from CRM]

After Draft Generation:

Update Log: Draft Generated = Yes, Draft Text = [AI output]

After Flag Check:

Update Log: Flags Applied = [flag list]

After Final Disposition:

Update Log: Final Action = [action], Response Time = [calculated], Reviewed By = [name]

Use your automation platform's database modules to write these logs. Make.com and Zapier both have native Airtable and Google Sheets integrations.

Build Performance Reports

Create three reports that pull from the logging database:

Daily Activity Report:

  • Total emails processed
  • Drafts generated vs. flagged for review
  • Average response time
  • Most common flag types

Quality Report (Weekly):

  • Draft acceptance rate (sent without edits vs. edited before sending)
  • Flag accuracy (false positives)
  • Client satisfaction scores (if you collect feedback)

Efficiency Report (Monthly):

  • Time saved (emails processed × average time per manual response)
  • Cost savings (time saved × average hourly rate)
  • Trend analysis (improvement over time)

Use your database tool's reporting features or export to Excel for analysis.

Implement Compliance Logging

If your firm has regulatory requirements (legal, accounting, financial services), ensure logs meet compliance standards:

  • Retain logs for required period (typically 7 years for professional services)
  • Include audit trail of who accessed or modified drafts
  • Log any manual overrides or system bypasses
  • Implement access controls on logging database
  • Create monthly compliance reports for partners

Add a compliance review step where a designated person reviews a random sample of 10 logged emails weekly to verify quality and adherence to firm standards.

Testing and Rollout

Before full deployment, run a 2-week pilot with a small team.

Week 1: Shadow Mode

  • System runs but doesn't send emails
  • Drafts go to review queue
  • Compare AI drafts to what staff would have written
  • Collect feedback on draft quality

Week 2: Assisted Mode

  • System sends drafts for non-flagged emails
  • Staff reviews all sent emails daily
  • Adjust prompts and flag rules based on feedback

Week 3+: Full Deployment

  • Expand to full team
  • Monitor daily activity reports
  • Hold weekly review sessions for first month
  • Refine system based on real usage patterns

Track these metrics during rollout:

  • Draft acceptance rate (target:
Revenue Institute

Reviewed by Revenue Institute

This guide is actively maintained and reviewed by the implementation experts at Revenue Institute. As the creators of The AI Workforce Playbook, we test and deploy these exact frameworks for professional services firms scaling without new headcount.

Revenue Institute

Need help turning this guide into reality? Revenue Institute builds and implements the AI workforce for professional services firms.

RevenueInstitute.com