Workflows / Radius filter

Radius filter from Gmail to Google Sheets

Which rows are within a distance of your sites, and the nearest site to each. Ask your AI in plain English: it reads Gmail, InstaMaps does the location work, and the results land in Google Sheets.

Gmail
InstaMapsInstaMaps
Radius filter
Google Sheets
Works inClaudeChatGPTCopilotGemini
Add InstaMaps to your AI →
Free connector · sign in with Google · about a minute

The prompt

Find this week's emails in my Gmail labelled "Orders" and pull out each delivery address, keep the rows within 25 miles of any of our sites (<your site addresses>) and say which site is nearest to each, and put the results in a new tab of this Google Sheet: <link to a sheet>.

Replace the parts in <angle brackets>.

What comes back

  • The nearest site and its distance in miles
  • Within the radius: yes or no
  • Anything that can't be placed or answered comes back with the reason. Nothing is dropped.

Set it up

Radius filter in Claude

Every plan, including Free. On Free, InstaMaps uses your one custom connector; Google Drive, Gmail and Google Calendar are directory connectors and don't count against it.

  1. In Claude, open Settings, then Connectors, and choose "Add custom connector".
  2. Name it InstaMaps and paste https://get-instamaps.com/mcp. Click Add.
  3. Click Connect and continue with Google. You land back in Claude, ready to ask.
  4. Add the Google Drive, Gmail or Google Calendar connector from the same Connectors page when the chain uses them.
  5. Paste the prompt above.
Claude's own guide ↗

Before you start

Reading Gmail

Connect your AI tool's Gmail connector and label the emails you want read. The addresses pass through the chat, so keep it to a few hundred at a time.

Writing to Google Sheets

InstaMaps writes to the sheet itself: share it with the address the answer gives you, as Editor. It adds new dated columns or a new tab, and never overwrites a cell.

Run it on a schedule

Every Monday at 8am: find this week's emails in my Gmail labelled "Orders" and pull out each delivery address, keep the rows within 25 miles of any of our sites (<your site addresses>) and say which site is nearest to each, and put the results in a new tab of this Google Sheet: <link to a sheet>.

  • Claude. Scheduled tasks run a prompt hourly, daily, on weekdays or weekly, with the connectors you've added. They need a paid plan (Pro, Max, Team or Enterprise), and on Pro and Max they run in the cloud, so your computer can be off.
  • ChatGPT. ChatGPT has scheduled tasks, but OpenAI doesn't yet say whether they can use a custom connector. Run the prompt by hand until it does.
  • Microsoft Copilot and Teams. Copilot Studio agents can run on a schedule with a Recurrence trigger. The run uses the agent author's sign-ins.
  • Gemini. Google doesn't yet say whether scheduled actions can use a custom app. Run the prompt by hand until it does.

Good to know

  • Distances are straight-line, which is fast and works on any size of list. For miles by road, use the road mileage workflow.
  • The connector is free: 5,000 tool calls a day per person, and a whole sheet read by link counts as one call.
  • Rather do it without an AI? Use the free tool on our site.

Related workflows