Google Contacts vCard Import/Export Automation
On demand (or scheduled), the flow exports Google Contacts to vCard files stored in SharePoint for backup and portability, and ingests vCard files dropped in a folder to create or update Google Contacts. Automates bulk contact backup and import without manual exports.
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 solution automates bulk backup and import of Google Contacts using vCard (.vcf) files stored in SharePoint. It ships as two cloud flows in one solution:
- Export — on a weekly schedule, reads all Google Contacts and writes a single timestamped vCard backup file to a SharePoint library, then emails a summary. - Import — when a vCard file is dropped into a SharePoint import library, parses each card and creates new Google Contacts, de-duplicating by email, then emails a summary.
Why it matters: Manual contact export/import is tedious and rarely done. Automating it gives regular, portable backups and easy bulk loads with duplicate protection.
Connector limitation (important): The Google Contacts connector exposes read (PeopleApiListContactsV4) and create (CreateContact) operations only — there is no update or delete operation. The import flow is therefore create-or-skip (an upsert approximation): contacts whose email already exists are skipped rather than updated. To truly update existing contacts you would need the Google People API via an HTTP action with OAuth.
Both flows ship Off (demo). Going live requires only authorizing the three connections and setting the environment-variable values.
Use Case
A team wants periodic vCard backups of their Google Contacts for portability/disaster recovery, plus a no-code way to bulk-load contacts by dropping vCard files into a SharePoint folder.
Flow Architecture
Flow A — Weekly Contact Backup
Recurrence (Weekly, Mon 08:00 EST)Kicks off the export backup.
Init varNewLine
Initialize VariableCRLF used to format vCard lines.
Init varSiteUrl
Initialize VariableSharePoint site (env var).
Init varBackupPath
Initialize VariableBackup library path (env var).
Init varReportRecipient
Initialize VariableReport email (env var).
Init varVcard
Initialize VariableAccumulates the .vcf document text.
Init varContactCount
Initialize VariableExported-contact counter.
List All Contacts
Google Contacts — PeopleApiListContactsV4Reads all contacts.
Build vCard Entries
Foreach (seq): Append to string + IncrementAppends a vCard 3.0 block per contact.
Compose FileName
Composecontacts-YYYYMMDD-HHMMSS.vcf.
Save To SharePoint
SharePoint — CreateFileWrites the .vcf backup file.
Send Backup Report
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SharePointSiteURL | String | https://your-tenant.sharepoint.com | Site address for both flows. |
| flowlibs_ContactBackupLibraryPath | String | /Contact Backups | Server-relative library/folder path for the export CreateFile. |
| flowlibs_ContactImportLibraryName | String | Contact Imports | Library name the import trigger monitors. |
| flowlibs_ContactDedupeKey | String | Field used to match contacts on import. | |
| flowlibs_ContactReportRecipient | String | admin@your-tenant.onmicrosoft.com | Recipient of backup / import summary emails. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Google Contacts | shared_googlecontacts | PeopleApiListContactsV4 CreateContact |
| SharePoint | shared_sharepointonline | GetOnNewFileItems CreateFile GetFileContent |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
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.
- Cadence
- Change the Export Recurrence (e.g. daily, or multiple sites). The Import trigger polls every 5 minutes; adjust the recurrence interval as needed.
- More fields
- Extend the vCard build (Append_To_vCard) and the import parse Composes to cover additional vCard properties (ADR addresses, NOTE, multiple emails/phones). CreateContact also accepts homeEmail, jobTitle, homePhoneNumber, nickName, notes, etc.
- CSV support
- Add a branch that detects .csv files and parses comma-delimited rows instead of vCard blocks.
- True update
- To update (not just create) existing contacts, add an HTTP action to the Google People API (people.updateContact) with OAuth, keyed on the matched person resource name.
- Group assignment
- Set CreateContact group to file imported contacts into a Google contact group.
- Validation/quarantine
- Move malformed vCard files to an Errors folder and report them separately.
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.01Backup file name
Timestamped vCard backup file name.
EXPR.02vCard block (per contact)
vCard 3.0 block built per contact.
EXPR.03CRLF
Carriage-return + line-feed for vCard lines.
EXPR.04Decode file
Decodes the uploaded vCard file bytes to text.
EXPR.05Split cards
Splits the file into vCard blocks.
EXPR.06Parse email from a card
Extracts the email value from a vCard block.
EXPR.07New-contact test
Creates only when email is non-empty and not already present.
EXPR.08File identifier (trigger)
Identifier of the newly added SharePoint file.
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.