Guide · Agent skill
How to use the Export Contacts to Sheets agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
This guide explains the Export Contacts to Sheets agent skill, a recipe that lets an AI agent copy people from your Google Workspace domain directory into a Google Sheets spreadsheet. It is written for readers who have not used agent skills before. By the end you will know what the skill does, how to install it, how to ask for it in plain language, and what to check before running it.
Quick start
- 1Get the ZIP. Download the skill ZIP from our page.
- 2Install the skill. Unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Install the required skills and tool. Make sure the gws command-line tool is installed and authenticated, and that gws-people and gws-sheets are available.
- 4Find your spreadsheet ID. Open the target Google Sheet and copy its ID, which the recipe needs as SHEET_ID.
- 5Check sharing. Confirm who can open the target sheet, since it will hold names, emails and phone numbers.
- 6Ask in plain words. Tell the agent to export the Workspace directory contacts to your spreadsheet ID.
- 7Review the result. Open the sheet and check the Contacts tab for the header row and the exported rows.
What does the Export Contacts to Sheets skill do?
The skill gives an AI agent a step-by-step recipe for exporting people from your Google Workspace domain directory into a Google Sheets spreadsheet. The directory fields it reads are names, email addresses and phone numbers. Without the skill, you would export these by hand; with it, the agent does the copying for you.
The recipe relies on the gws command-line tool to read the directory and write rows to the sheet. It also depends on two other skills, gws-people and gws-sheets, which must be loaded too.
- Reads the domain directory, not your personal Google Contacts list.
- Writes a header row (Name, Email, Phone) to a sheet tab named Contacts.
- Appends one row per contact.
What do you need before installing?
Check these requirements before you start. The recipe will not run without them.
- The gws command-line tool (googleworkspace CLI) installed and authenticated with a Google account.
- The gws-people and gws-sheets skills available alongside this one.
- Google Workspace domain access with permission to read the directory.
- The ID of the target Google Sheets spreadsheet.
How do you install the skill?
Download the ZIP file for this skill from our page. Then choose one of the two install routes below.
For a personal setup, unzip the file into ~/.claude/skills/. For a single project, unzip it into the project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
The package contains one file, SKILL.md, which holds the recipe.
- Personal: unzip into ~/.claude/skills/
- Project only: unzip into .claude/skills/ inside the project folder
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
How do you trigger the skill with a natural request?
You do not need to type the skill name. Describe the outcome you want in plain words, and mention the spreadsheet and the directory. The agent should then find the recipe and follow its steps.
Name the spreadsheet by its ID, since the recipe needs it. Keep in mind that the recipe reads only one page of 100 people.
- Export our Google Workspace directory contacts to the spreadsheet with ID 1AbC...xyz.
- Copy the company directory names, emails and phone numbers into my contacts sheet.
- Make a shared contact list of the staff directory in this spreadsheet.
What commands does the recipe run?
The recipe has three steps. First it lists directory people with a read mask for names, email addresses and phone numbers, limited to a page size of 100. Then it writes a header row to the Contacts range. Finally it appends one row for each contact. Replace SHEET_ID with your spreadsheet ID.
gws people people listDirectoryPeople --params '{"readMask": "names,emailAddresses,phoneNumbers", "sources": ["DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"], "pageSize": 100}' --format json
gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Name", "Email", "Phone"]'
gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Jane Doe", "jane@company.com", "+1-555-0100"]'What safety points should you check first?
This skill runs scripts and uses the network. It copies personal details such as email addresses and phone numbers into a file. Anyone who can open that file may see them.
Check the sharing settings on the target sheet before you run the export. Use the skill only with directory data you are allowed to read and share.
- Confirm who can view the target spreadsheet.
- Do not use it for sensitive staff data until sharing is checked.
- The recipe fetches only one page of 100 people and does not show how to loop through more pages, so large directories will be incomplete.
What tips help the export go smoothly?
Run the export on a new or test spreadsheet first so you can see the output. Keep the sheet tab named Contacts, because the recipe writes to that range. If you need more than 100 people, the recipe alone will not cover it.
- Test with a copy of the sheet before using the real one.
- Use a dedicated spreadsheet so old rows do not mix with new ones.
- Confirm the gws tool is authenticated before asking the agent to run the export.
What people use it for
- A Workspace admin takes a quick snapshot of the company directory in a spreadsheet.
- An operations team builds a shared contact list for a team or event.
- A user who already runs the gws CLI repeats the same directory export on demand.
Frequently asked questions
How do I install the export contacts to sheets agent skill?
Download the ZIP from our page, then unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
What do I need to run the skill?
You need the gws command-line tool installed and authenticated with a Google account, the gws-people and gws-sheets skills, Google Workspace domain access that allows reading the directory, and the ID of the target Google Sheets spreadsheet.
Can I export my personal Google Contacts with this skill?
No. The recipe reads the Google Workspace domain directory source, not your own contacts list.
Is this skill free to use?
The source does not state pricing or licence terms beyond the Apache-2.0 licence listed for the repository, so check that licence for the terms that apply to you.
Why does my export stop at 100 people?
The recipe fetches only one page with a page size of 100 and does not show how to loop through further pages. Larger directories will therefore be incomplete.
Is it safe to export the staff directory to a spreadsheet?
Only if the sheet's sharing settings are checked first. The export copies emails and phone numbers into a file that others may be able to open, so limit access before running it.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits Workspace admins, operations staff and existing gws CLI users who want a quick, repeatable snapshot of the domain directory in a spreadsheet. It is not a good fit for personal contacts, for very large directories, or for sensitive staff data when the target sheet's sharing has not been checked. For those cases, choose a tool that handles pagination and personal contacts directly.
Download the skill