Log Aircall tags to Salesforce and draft the follow-up email in Gmail

When a rep tags an Aircall call demo-booked, follow-up, or not-interested, log the call in Salesforce and drop a ready-to-send follow-up into their Gmail Drafts.

Agentic Task
AircallSalesforceGmailSalesEmail AutomationData Sync
PromptCreate

Trigger: an Aircall webhook fires whenever a sales rep adds a tag to a call (for example "demo-booked", "follow-up", "contract-sent", or "not-interested"). The webhook payload carries the call id, the rep who owns the call, the tag name, and the caller's phone number.

Goal: turn each tagged call into (1) a logged Salesforce task with a clean recap, (2) an opportunity stage update when the tag maps to a pipeline move, and (3) a ready-to-send follow-up email sitting in the rep's Gmail Drafts folder. Do not send the email — leave the review-and-send step to the rep.

Step 1 — Pull the call context from Aircall. Use Retrieve Call Summary and Retrieve Call Transcription on the call id from the webhook. These come from Aircall's Conversation Intelligence add-on. If either returns 403 or empty, fall back to what's in the call record and note in the recap that the transcript wasn't available.

Step 2 — Find the matching Salesforce record by phone number. Normalize the caller's phone to E.164, then run Get Many Contacts with a SOQL filter on Phone / MobilePhone / OtherPhone / HomePhone. If nothing matches, run Get Many Leads with the same phone-number filter. If both come back empty, still create the Salesforce task and Gmail draft, but flag in the task body that no matching CRM record was found so the rep can create one.

Step 3 — Log a Salesforce task. Use Create Task with Subject set to the Aircall tag (verbatim, so a rep skimming the activity feed sees "demo-booked" or "not-interested" as the headline). WhoId points at the matched contact or lead. OwnerId is the rep who owned the Aircall call. Description contains a short recap: caller, phone number, call direction and duration, the Aircall summary, and 3-5 bullet takeaways drawn from the transcript. Status should be "Completed" since the call already happened; ActivityDate is today.

Step 4 — Advance the opportunity stage when the tag calls for it. Read the tag-to-stage mapping (this is a customization knob on the prompt page, so keep it configurable). Suggested defaults: demo-booked -> Discovery, demo-completed -> Qualification, proposal-sent or contract-sent -> Proposal/Price Quote, closed-won -> Closed Won, not-interested or unqualified -> Closed Lost. If the tag is in the mapping, use Get Many Opportunities to find the open opportunity linked to the matched contact/lead (filter by AccountId or ContactId, IsClosed = false, ordered by most recent). Then call Update Opportunity with the new StageName. If there is no open opportunity, skip the stage change and note this in the task recap.

Step 5 — Draft the follow-up email in the rep's Gmail. Use Gmail Create a Draft on behalf of the rep who owned the Aircall call (their Gmail account, not a shared inbox). Address it to the contact/lead's email if one is on the Salesforce record; if no email is available, still create the draft but leave the To field blank and mention that in the task recap. Subject line should reflect the tag: for demo-booked, something like "Great talking — here's the demo recap"; for follow-up, "Following up on our call"; for contract-sent, "Contract on its way"; for not-interested, a graceful "Thanks for your time" note. Body should be a warm, personalized message: a one-line thank-you, 2-3 bullet points of what was discussed pulled from the transcript, the specific next steps the rep committed to on the call, and the rep's normal sign-off. Keep it tight — 120-180 words. Encode the RFC 2822 message as base64url per the Gmail API's Create a Draft contract. Do not call Send a Draft; leave the message sitting in Drafts so the rep can review, edit, and send.

Guardrails: never send email automatically — always stop at draft. If the tag isn't recognized in the mapping, still do steps 1-3 and 5, just skip step 4. Log a one-line summary of what happened (task id, whether an opportunity was moved, draft id) so the rep can trace the automation.

What does this prompt do?

  • Listens for Aircall tag events so every disposition tag triggers the same rep-facing follow-through automatically.
  • Pulls the Aircall call summary and transcription and matches the caller to a Salesforce contact or lead by phone number.
  • Logs a Salesforce task with the tag as the subject and a clean recap in the body, and advances the linked opportunity's stage when the tag maps to a pipeline move like demo-booked or contract-sent.
  • Writes a personalized follow-up email to the caller straight into the rep's Gmail Drafts folder so they only have to review and hit send.

What do I need to use this?

  • An Aircall account with Conversation Intelligence enabled so calls come with a summary and transcript.
  • A Salesforce account where the rep works contacts, leads, and opportunities.
  • A Gmail account for the sales rep whose drafts folder should hold the follow-up email.

How can I customize it?

  • Change which Aircall tags map to which Salesforce opportunity stages (demo-booked to Discovery, contract-sent to Proposal, and so on).
  • Adjust the tone, length, or signature of the drafted follow-up email to match how your reps normally write.
  • Decide whether unmatched callers should be skipped, logged against a fallback record, or created as a new Salesforce lead.

FAQs

Does the follow-up email get sent automatically?
No. The workflow only writes a draft into the rep's Gmail Drafts folder. The rep opens it, tweaks anything they want, and hits send when they're ready. Nothing leaves the mailbox without human review.
What if the caller isn't already in Salesforce?
By default the workflow searches both Contacts and Leads by phone number. If nothing matches, it flags the task with a note so the rep knows to create the record. You can also customize it to create a new lead automatically.
Which Aircall tags trigger it?
Any tag added to a call. The mapping from tags to pipeline moves is a knob you set up front. Common examples: demo-booked and contract-sent advance the opportunity stage; follow-up and not-interested only log the task.
Do I need Aircall's Conversation Intelligence add-on?
Yes. The recap and follow-up email are drawn from Aircall's call summary and transcript, which are part of Conversation Intelligence. Without it, the workflow can still log a basic task but the email draft will be much thinner.
Which rep's Gmail account gets the draft?
The rep who owned the call in Aircall. The workflow uses their connected Gmail account so the draft appears in their own Drafts folder, ready for them to review and send.

Related templates

Win back LiveChat visitors whose chats went unanswered

Every couple of hours we find the chats your team never answered, email those visitors a real reply, and hand the sensitive ones to a support lead.

LiveChat
Gmail
Slack
Agentic Task
Chase the paperwork every new client and vendor still owes

One board showing every party you are onboarding, which documents are still missing or expiring, and a one click chase email for exactly what is outstanding.

General Input Storage
General Input Database
PDF.co
+1
App
File Gmail attachments into storage with names you can find

Every hour, new email attachments get sorted by document type and vendor, saved under clear names, and logged in a spreadsheet index.

Gmail
General Input Storage
Google Sheets
+1
Agentic Task
A website visitor queue that remembers what you hide

Your SDRs open one screen each morning, work the companies that visited your site, and hide the irrelevant ones for good.

Leadfeeder
Apollo
Salesforce
App
Candidate rediscovery desk for your archived Lever applicants

Pick an open role and see which past applicants deserve a second look, with an assistant that ranks the best fits and drafts personal outreach.

Lever
Gmail
App
Laytime and demurrage claim workspace for chartering ops

See every voyage on your books ranked by money at risk, open the full statement of facts, and let an agent draft the demurrage claim for review.

MarineTraffic
Google Sheets
Gmail
+1
App

Turn every tagged call into a logged Salesforce task and a drafted email.

Give your reps back the ten minutes after every call that they spend writing recaps and typing follow-ups.