Workflows / Mileage log

Mileage log from Google Sheets to Gmail

Road miles and drive time for every trip, with a total for a mileage claim. Ask your AI in plain English: it reads Google Sheets, InstaMaps does the location work, and the results land in Gmail.

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

The prompt

Using the rows in this Google Sheet: <link to your sheet>, work out the road miles for each trip, starting and ending at <your home or office postcode>, and total the miles, and email me (<your email>) the log with the total miles.

Replace the parts in <angle brackets>.

What comes back

  • Road miles and drive time for each leg
  • The total road miles for the period, ready to multiply by your mileage rate
  • Anything that can't be placed or answered comes back with the reason. Nothing is dropped.

Set it up

Mileage log 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 Google Sheets

Share the sheet with InstaMaps, or set it to "anyone with the link can view". InstaMaps reads it straight from Google, so a sheet of thousands of rows is one call, and nothing passes through the chat.

Writing to Gmail

Your AI tool's Gmail connector sends it. Ask for a draft instead if you'd rather check it first.

Run it on a schedule

Every 1st of the month, for the month before: using the rows in this Google Sheet: <link to your sheet>, work out the road miles for each trip, starting and ending at <your home or office postcode>, and total the miles, and email me (<your email>) the log with the total miles.

  • 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

  • Road distances in Great Britain and the US, on normal weekday traffic. Decide which trips are business: a claim is only as good as that list.
  • 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