Google Contacts Enrichment from Email Domain
When a contact is added or lacks company data, the flow infers the organization from the email domain, looks up firmographic details (via an enrichment API or internal account table), and links it to the matching Dataverse account. Auto-enriches Google Contacts with company context.
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
Auto-enriches Google Contacts with company context. On an hourly schedule the flow reads every Google contact, infers the organization from the contact's email domain, looks up firmographic details from an enrichment API, finds the matching Dataverse account, and writes the result to a Contact Enrichment ledger table in Dataverse — tagged with a per-run correlation id.
Why it matters: Contacts without company context are hard to segment and route. Domain-based enrichment fills the gaps automatically and produces a governed, queryable record of what was enriched and how confident the match was.
Design note: The Google Contacts connector is read/create only — it has no update-contact operation — so enrichment results are written to a dedicated Dataverse ledger table and linked to the matching account. To physically write company/title back onto the Google contact, add an HTTP call to the Google People API (people.updateContact) with OAuth, noted in the customization guide.
Status: Built (API-first). Ships Off (demo). Flow Checker: 0 errors / 0 warnings.
Use Case
Sales/marketing wants every Google contact tagged with company firmographics and linked to a CRM account, without manual data entry, and with a confidence gate so only high-quality matches are stored.
Flow Architecture
Recurrence Hourly Enrichment Scan
Recurrence (Hour/1)Periodically scan contacts (Google Contacts has no trigger).
Initialize Correlation Id + config
Initialize Variableguid() plus enrichment API base/key, account and ledger table names, free-domain list, and minimum confidence.
Get My Google Contacts
Google Contacts — PeopleApiListContactsV4Reads all contacts into body/connections.
Apply to each Google Contact
ForeachProcess each contact.
Compose Email / Name / Domain
ComposeLower-cased first email, display name, and email domain (text after @).
Check Is Business Contact
ConditionSkip empty/free-domain emails.
Lookup Existing Enrichment
Microsoft Dataverse — ListRecordsDedup: existing ledger row for this email?
Check Needs Enrichment
ConditionProceed only when none exists.
Lookup Firmographics
HTTP — GET enrichment APIEnrichment API call by domain (Bearer key).
Match Dataverse Account
Microsoft Dataverse — ListRecordsAccount whose primary email ends with this domain.
Check Confidence Threshold
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_EnrichApiBase | String | https://api.company-enrichment.example.com/v1 | Enrichment API base URL. |
| flowlibs_EnrichApiKey | String | REPLACE_WITH_API_KEY | Bearer key for the enrichment API (source from Key Vault in production). |
| flowlibs_AccountTableName | String | accounts | Dataverse accounts entity-set. |
| flowlibs_EnrichmentTableName | String | flowlibs_contactenrichments | Ledger entity-set used for the dedup lookup. |
| flowlibs_FreeDomains | String | gmail.com,yahoo.com,outlook.com,hotmail.com,aol.com,icloud.com,protonmail.com,live.com,msn.com | Comma list of free/consumer domains to skip. |
| flowlibs_MinConfidence | String | 70 | Minimum confidence (0-100) required to write a record. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Google Contacts | shared_googlecontacts | PeopleApiListContactsV4 |
| HTTP | http | GET enrichment API |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords CreateRecord |
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.
- Write back to Google
- To set company/title on the Google contact itself, add an HTTP PATCH to the Google People API (people.updateContact) with OAuth, since the connector has no update op.
- Internal-first matching
- Match against an internal account table before calling the paid enrichment API to reduce cost.
- Confidence gate
- Tune flowlibs_MinConfidence; raise it to store only high-certainty matches.
- Cache by domain
- The ledger already dedups by email; add a domain-level cache table to avoid re-calling the API for contacts at the same company.
- Cadence
- Change the Recurrence interval to scan more or less often.
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 (lower-cased)
Pick and lower-case the first contact email.
EXPR.02Email domain
Extract the domain after the @.
EXPR.03Skip free domains
Skip consumer/free email domains.
EXPR.04Needs enrichment
Proceed only when no ledger row exists for this email.
EXPR.05Confidence gate
Write only when the match confidence meets the minimum.
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.