Workflows / Mileage log

Mileage log from Google Calendar to Google Sheets

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

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

The prompt

Take my Google Calendar events from last month that have a location, work out the road miles for each trip, starting and ending at <your home or office postcode>, and total the miles, 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

  • 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.
A real run
DateTripMilesClaim
16 SepTrade show, Telford (return)302.9£136.31
22 SepExhibition, NEC Birmingham (return)236.1£106.25
13 OctTrade show, Telford (return)302.9£136.31
Total841.9£378.86

A real run on 14 October 2026: three business trips from a month of Google Calendar events, measured from a central London stand-in base, at the 45p HMRC car rate.

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 Calendar

Connect your AI tool's Google Calendar connector. The events pass through the chat, which is fine for a month of visits (a few hundred events).

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 1st of the month, for the month before: take my Google Calendar events from last month that have a location, work out the road miles for each trip, starting and ending at <your home or office postcode>, and total the miles, 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

  • 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