Workflows / Mileage log

Mileage log from Google Calendar to a Google Drive file

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 a Google Drive file.

Google Calendar
InstaMapsInstaMaps
Mileage log
Google Drive file
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 save the results to my Google Drive as a CSV file called "Mileage log".

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 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 a Google Drive file

Your AI tool's Google Drive connector saves the file.

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 save the results to my Google Drive as a CSV file called "Mileage log".

  • 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