You use Gmail for personal stuff and Outlook for work. Someone emails your personal address about a project. You know their name but not their work email. You open Outlook contacts — they're not there. You open Gmail contacts — found them, but now you need to copy the address and switch back.
Your OpenClaw agent can search both accounts at once.
What you'll build
An agent workflow that:
- Searches contacts across multiple email accounts simultaneously
- Finds the right person regardless of which account knows them
- Pulls contact details — email, phone, company, title
- Uses that information in follow-up actions (send email, schedule meeting)
No exporting CSVs. No switching between Google Contacts and Outlook People. One question, one answer.
Prerequisites
You need the Nylas plugin with at least two connected accounts. If you followed The Nylas Plugin for OpenClaw, you're most of the way there.
Install (if you haven't already):
openclaw plugins install @nylas/openclaw-nylas-plugin
openclaw config set plugins.entries.nylas.config.apiKey nyl_v0_your_key_here
openclaw gateway restart
Then configure named grants for your accounts:
openclaw config set plugins.entries.nylas.config.grants '{"work":"grant-id-1","personal":"grant-id-2"}'
openclaw gateway restart
Find your grant IDs with openclaw nylas discover.
Full setup: cli.nylas.com/guides/install-openclaw-nylas-plugin. New to the CLI? Start with the getting started guide.
Search contacts across accounts
The simplest case — you need someone's email:
"Find the contact info for Sarah Chen."
The agent calls nylas_list_contacts on your default grant. But with multi-account configured, you can search everywhere:
"Search for Sarah Chen across both my work and personal accounts."
The agent runs nylas_list_contacts twice — once per grant — and merges the results:
| Source | Name | Company | Phone | |
|---|---|---|---|---|
| Work | Sarah Chen | s.chen@bigcorp.com | BigCorp | +1-555-0142 |
| Personal | Sarah Chen | sarah.chen@gmail.com | — | +1-555-0142 |
Same person, two different email addresses. Now you know which one to use depending on the context.
Real workflows
Contact lookup is rarely the end goal. It's usually the first step in something bigger. Here's where it gets useful.
Find and email
"Find Bob Martinez's work email and send him a message about the Q3 proposal."
The agent:
- Calls
nylas_list_contactswith the search query - Finds bob.martinez@company.com
- Calls
nylas_send_emailwith the address it just found
No need to look up the email separately. The agent connects the dots. For more on sending email, see the send email guide.
Find and schedule
"Look up everyone from the design team in my contacts and find a time we're all free next week."
The agent:
- Calls
nylas_list_contactssearching for "design" in company/group fields - Collects the email addresses
- Calls
nylas_check_availabilitywith all of them - Reports back with open slots
Contact search → calendar availability → meeting creation, all in one conversation. (We covered the scheduling part in Automate Meeting Scheduling.)
Find and push to CRM
"Find all contacts from BigCorp and export them to Salesforce."
The agent searches your contacts, collects the results, and you can pipe them into your CRM. The export email to Salesforce guide walks through the full integration. For HubSpot and Pipedrive workflows, see the CRM email workflows guide.
Find duplicates
"Search for contacts named 'Johnson' across both accounts. Are there any duplicates?"
The agent searches both grants, compares results by name and email, and flags matches:
"Found 3 contacts named Johnson. Mike Johnson appears in both accounts — mike.j@work.com (work) and mikej@gmail.com (personal). The other two are different people."
Not a full dedup tool, but enough to spot the obvious overlaps.
What contacts data is available?
The Nylas Contacts API returns structured fields for each contact:
| Field | Example |
|---|---|
| Name | Sarah Chen |
| Email(s) | s.chen@bigcorp.com, sarah@personal.com |
| Phone(s) | +1-555-0142 (mobile), +1-555-0100 (work) |
| Company | BigCorp |
| Title | Engineering Manager |
| Address | 123 Main St, San Francisco, CA |
| Groups | Design Team, Project Alpha |
| Notes | Met at KubeCon 2025 |
The agent can access all of these. Ask for exactly what you need:
"What company does raj@example.com work for?"
"Give me the phone numbers for everyone in the 'Sales' group."
When contacts aren't enough
Sometimes the person you're looking for isn't in your contacts. They emailed you once, six months ago, and you never saved them.
The agent can fall back to email search:
"I need to reach someone named Park who emailed me about the API migration. Check my contacts first, then search my email if you don't find them."
The agent:
- Searches
nylas_list_contacts— no results - Falls back to
nylas_list_emailssearching for "Park" + "API migration" - Finds the email thread and extracts the address: j.park@vendor.io
Contacts and email working together. One tool picks up where the other leaves off. We covered email search workflows in more detail in the email triage post.
Prefer the terminal?
If you'd rather search contacts from the command line without an agent, the Nylas CLI has you covered. The guides walk through contact management and other workflows.
Links
- Previous posts: The Nylas Plugin for OpenClaw · Email Triage Agent · Meeting Scheduling
- npm: @nylas/openclaw-nylas-plugin
- Nylas CLI: cli.nylas.com — email, calendar & contacts from your terminal
- Nylas docs: developer.nylas.com/docs/v3
Two accounts, one search, zero tab-switching. Your agent knows everyone you know.
Top comments (0)