Workflows / Mileage log

Mileage log from Google Calendar 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 Calendar, InstaMaps does the location work, and the results land in Gmail.

Google Calendar
InstaMapsInstaMaps
Mileage log
Gmail
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 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.
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 Customize, then Connectors. Click + Add, then "Add custom connector".
  2. Name it InstaMaps, paste https://get-instamaps.com/mcp and click Continue.
  3. Choose to sign in now and continue with Google, then click Add. In a chat, switch it on under + → Connectors.
  4. Connect Google Drive, Gmail or Google Calendar from the same Customize → Connectors page (each has a Connect button) 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 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: 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 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

Address and map data © OpenStreetMap contributors.