What this template does
Reps hate logging activity, so they don’t, and your pipeline data goes stale. This workflow logs it for them. It watches Gmail and Google Calendar, matches participants to Salesforce contacts, and creates activity records linked to the related opportunity, automatically. Calls flagged in Slack get logged too. The result is accurate activity history without anyone typing it in.
This is an advanced template because matching noisy real-world data (email threads, internal messages, calendar invites) to the right CRM records takes careful filtering. Budget time for tuning the rules.
How it works
The trigger is a new email received or a calendar event created. Each run:
- Extracts recipient email addresses.
- Finds matching Salesforce contacts.
- Fetches the email content and metadata.
- Determines the activity type (email, call, or meeting).
- Creates the activity record in Salesforce.
- Links it to the related opportunity.
- Updates the last activity date on the contact.
Output: sales activity logged and linked in Salesforce, ready for reporting.
Setup steps
- In Salesforce, create custom fields for activity tracking, configure API permissions, and create a service account for n8n.
- Add a Gmail credential with email access, set a label filter for tracked emails, and trigger on new emails.
- Connect Google Calendar, trigger on new events, and map attendee emails to Salesforce contacts.
- Parse email addresses and domains, match them to Salesforce Accounts, and create activities linked to opportunities.
- Integrate Slack for call notifications and log call time, duration, and outcome against the related opportunity.
- Add automation rules: auto-log emails over 5KB, skip internal company emails, and strip email thread history from the log.
When to use it
Use this when sales activity logging is inconsistent and it is hurting your forecast accuracy. It is best suited to teams with a defined Salesforce opportunity structure, since the value comes from linking activity to the right deals. Get the filtering rules right first, or you will log noise.
Need this customized? Let’s talk.
