Google Contacts New Contact to CRM Lead
When a new Google Contact is detected (scheduled diff), the flow creates a lead/contact in the CRM (Dataverse/Dynamics/Salesforce), assigns an owner by territory, creates a first-touch task, and notifies the rep in Teams. Turns new Google Contacts into actionable CRM leads.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow turns newly-added Google Contacts into routed CRM leads in Dataverse. On an hourly schedule it reads the full Google Contacts list, detects contacts it has not seen before (via a Dataverse dedup ledger), and for each new contact: creates a CRM lead with a simple score, assigns an owning rep by territory (email-domain -> rep map), creates a first-touch follow-up task, records the contact in the seen-ledger, and notifies the assigned rep in a Teams channel.
Why it matters: Contacts captured in Google often never reach the CRM. Auto-creating scored, owned leads with a first-touch task and a rep notification guarantees follow-up and a governed record of new-contact intake.
Status: Built — ships Off (demo). Going live requires only authorizing the three connections and setting the environment-variable values.
Use Case
Sales/Operations reps add prospects to Google Contacts and the team wants each one in the CRM with an owner, a follow-up task, and a heads-up to the responsible rep — without manual re-entry. The Google Contacts connector has no usable new-contact trigger, so a scheduled diff with a Dataverse dedup ledger provides exactly-once lead creation.
Flow Architecture
Recurrence
Recurrence (Hour/1)Hourly diff poll (no native new-contact trigger).
Initialize varTerritoryMap
Initialize Variable (String)Load flowlibs_TerritoryMap JSON (domain -> rep).
Initialize varDefaultRep
Initialize Variable (String)Fallback rep email (flowlibs_DefaultOwnerEmail).
Initialize varDueDays
Initialize Variable (Integer)First-touch task due offset (flowlibs_DefaultFollowUpDueDays).
Initialize varTeamsGroupId
Initialize Variable (String)Teams team id (flowlibs_TeamsGroupId).
Initialize varTeamsChannelId
Initialize Variable (String)Teams channel id (flowlibs_TeamsChannelId).
Initialize varNewLeadCount
Initialize Variable (Integer)Run counter of new leads created.
List Google Contacts
Google Contacts — PeopleApiListContactsV4Read all contacts (body/connections).
Apply to each Contact
Foreach (concurrency 1)Process each contact sequentially.
Compose Primary Email
ComposeLowercased primary email = dedup key.
Condition Has Email
Condition (If)Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_TerritoryMap | String | {"default":"sales-default@yourcompany.com","contoso.com":"west-rep@yourcompany.com","fabrikam.com":"east-rep@yourcompany.com"} | JSON map of email domain (or default) -> owning rep email. |
| flowlibs_DefaultOwnerEmail | String | you@yourcompany.com | Fallback rep when no territory matches. |
| flowlibs_DefaultFollowUpDueDays | String | 3 | Days from now for the first-touch task due date. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams team (group) id for rep notifications. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel id for rep notifications. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Google Contacts | shared_googlecontacts | PeopleApiListContactsV4 |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords CreateRecord |
| Microsoft Teams | shared_teams | PostMessageToConversation |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Salesforce / Dynamics target
- Swap the three Dataverse CreateRecord actions for the Salesforce connector (CreateRecord / lead object) to write leads into a different CRM.
- Dedup against the CRM, not just the ledger
- Add a ListRecords on the lead table by email before Create Lead to skip contacts that already exist as customers.
- Smarter scoring
- Replace the Create Lead flowlibs_leadscore expression with rules over job title, company size, or domain reputation.
- Territory routing
- Extend flowlibs_TerritoryMap with more domains, or change the territory key from email domain to address region by reading addresses[0].formattedValue.
- Poll frequency
- Adjust the Recurrence trigger interval; the ledger keeps creation exactly-once regardless of cadence.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Primary email (dedup key)
Lowercased primary email used as the dedup key.
EXPR.02Email domain (territory key)
Email domain used as the territory routing key.
EXPR.03Routed rep
Territory lookup, falling back to the default rep.
EXPR.04Lead score
Simple score boosted when an organization is present.
EXPR.05Ledger filter (is-new check)
OData filter then is-new test against the ledger.
EXPR.06Task due date
First-touch task due date offset from now.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.