Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot official · Google

recipe-sync-contacts-to-sheet — Claude skill: export contacts

This skill pulls your Google Contacts directory into a Google Sheets spreadsheet, writing a header row and one row per contact.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add googleworkspace/cli --skill recipe-sync-contacts-to-sheet -a claude-code
Open on GitHub

What recipe-sync-contacts-to-sheet does

The skill runs through the gws CLI. First it lists directory people with people listDirectoryPeople, using the read mask names,emailAddresses,phoneNumbers and the DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE source, 100 records per page. Then it creates a Contacts sheet with headers and appends each contact row.

Three steps, two dependencies. The recipe needs the gws-people and gws-sheets skills loaded, and the gws binary on your machine. You supply the SHEET_ID yourself.

Worth installing if you move a company directory into a sheet on a schedule and would rather not click through the admin UI. For a one-off export, or if you need a different format, skip it.

What it helps with

  • dump a company contact directory into a spreadsheet
  • collect names, emails and phone numbers in one command
  • refresh the Contacts sheet with current directory data
  • hand colleagues contacts in Google Sheets instead of a CSV export
  • append new rows to an existing sheet

Example prompts for the agent

  • Export the contacts directory to spreadsheet SHEET_ID, sheet Contacts
  • Show the first 100 contacts from the domain directory
  • Append a row for a new employee to the Contacts sheet

How to install recipe-sync-contacts-to-sheet

1Skills CLI (Vercel)

npx skills add googleworkspace/cli --skill recipe-sync-contacts-to-sheet -a claude-code

2Manually: put the files in place

~/.claude/skills/recipe-sync-contacts-to-sheet/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/recipe-sync-contacts-to-sheet/

From the same set95

The whole set →
gws-gmail official googleworkspace This skill hands your agent Gmail: send mail, read the inbox, reply in a thread. Useful when email work already runs through the gws CLI. Claude Code CX Codex Cursor +1 81,900installs gws-gmail-send official googleworkspace A skill that teaches your agent to send Gmail from the terminal: recipients, subject, body, attachments and drafts. Claude Code CX Codex Cursor +1 74,700installs gws-drive official googleworkspace This skill hands your agent Google Drive through the gws CLI: files, folders, shared drives, comments and access requests. Useful when docs move through code. Claude Code CX Codex Cursor +1 74,500installs gws-shared official googleworkspace This skill gives agents shared rules for gws CLI authentication, flags, and output formats. Use it when working with gws commands. Claude Code CX Codex Cursor +1 66,000installs gws-calendar official googleworkspace Manage Google Calendar events, access rules, and schedules through the gws CLI tool. Claude Code CX Codex Cursor +1 61,100installs gws-sheets official googleworkspace This skill lets an agent read and edit Google Sheets through the CLI. Use it when a coding workflow needs spreadsheet data or table updates. Claude Code CX Codex Cursor +1 58,800installs gws-docs official googleworkspace This skill lets an agent read and update Google Docs through gws. Use it when document changes should happen from an agent chat. Claude Code CX Codex Cursor +1 58,300installs gws-sheets-read official googleworkspace Reads cell values and sheets from Google Spreadsheets via CLI. Useful when an agent needs spreadsheet data without risk of altering it. Claude Code CX Codex Cursor +1 50,600installs

Similar

Questions about recipe-sync-contacts-to-sheet

How do I install recipe-sync-contacts-to-sheet in Claude?

Run npx skills add googleworkspace/cli --skill recipe-sync-contacts-to-sheet -a claude-code. The skill file lands at ~/.claude/skills/recipe-sync-contacts-to-sheet/SKILL.md.

What does recipe-sync-contacts-to-sheet do?

It reads the Google Contacts directory via gws people listDirectoryPeople and writes the contacts into Google Sheets: headers first, then rows with name, email and phone.

What do I need before running the skill?

The gws binary plus the gws-people and gws-sheets skills. You also need the SHEET_ID of the target spreadsheet.

Source text

SKILL.md · Apache-2.0
---
name: recipe-sync-contacts-to-sheet
description: "Export Google Contacts directory to a Google Sheets spreadsheet."
metadata:
  version: 0.22.5
  openclaw:
    category: "recipe"
    domain: "productivity"
    requires:
      bins:
        - gws
      skills:
        - gws-people
        - gws-sheets
---

# Export Google Contacts to Sheets

> **PREREQUISITE:** Load the following skills to execute this recipe: `gws-people`, `gws-sheets`

Export Google Contacts directory to a Google Sheets spreadsheet.

## Steps

1. List contacts: `gws people people listDirectoryPeople --params '{"readMask": "names,emailAddresses,phoneNumbers", "sources": ["DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"], "pageSize": 100}' --format json`
2. Create a sheet: `gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Name", "Email", "Phone"]'`
3. Append each contact row: `gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Jane Doe", "[email protected]", "+1-555-0100"]'`

© googleworkspace · Apache-2.0 · googleworkspace/cli

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor