---
name: turn-job-emails-into-a-spreadsheet-with-claude-code
description: "Job emails to a sheet with Claude Code. Put a Gmail label on your job request emails, export that label with Google Takeout, and save the file in a new folder. Open Claude Code in that folder and."
---

# Job emails to a sheet with Claude Code

## When to use

Trades and service owners whose job requests arrive by email and who want a list of every request without paying an AI to read the inbox on a schedule.

## Steps

1. In Gmail, put one label, such as "Job requests", on the request emails. A filter can do it for new ones, for example on your contact form's sender address.
2. Go to Google Takeout, deselect everything, select Mail, and choose only that label. Takeout sends a download link; Gmail arrives as an MBOX file inside a ZIP.
3. Make a new folder, unzip the export into it, and open Claude Code in that folder in Manual mode (cd into the folder, then type claude --permission-mode manual).
4. Paste the prompt below. In Manual mode, Claude Code stops and asks before it edits files or runs commands. Read what it wants to do, then approve. Newer versions start in auto mode by default, so check the mode indicator shows Manual.
5. Open the CSV it makes in Google Sheets or Excel. Check 10 rows against the real emails before you trust the rest.
6. Next week, export again into the same folder and ask Claude Code to rerun the script. Only new emails should add rows.

## Prompt

Fill the [BRACKETED] parts with the user, then follow this prompt:

```
In this folder is an MBOX file exported from one Gmail label. Each email is a job or repair request from a customer.

Write a small script, in a language you can run here, that reads the MBOX and writes requests.csv with one row per email and these columns:
date, from name, from email, phone (if one is in the message), address or town (if given), job type (one or two words), first 300 characters of the message, and a needs-check column.

Rules:
- Only read the file. Do not send, delete or change any email, and do not connect to Gmail.
- Use only what is in each email. If a field is missing, leave it blank. Do not guess.
- Put YES in needs-check when you are unsure about the phone, address or job type.
- Skip emails that are replies I sent.
- Before you run it, tell me what the script will do. After you run it, show me the first 5 rows and the total count.
```

## Guardrails

- Draft first and show the user. Never send, post, pay, book, cancel or delete without the user's explicit approval of that exact action.
- Use only facts the user gives you or that you can cite. If something is missing, ask instead of guessing.

## Common snags

- The export misses emails. A label export only includes messages with that label; label older emails before you export.
- Phone numbers come out wrong. Ask Claude Code to show you the rows marked needs-check and fix them by hand.
- Claude Code asks to install something. Ask it what and why before you approve.
- The script may only know the towns and job words it was shown. Check the job type and address columns against the real emails, and expect a rerun to rewrite the whole file.

## Tested

Ran with Claude Code in a cloud session, Nov 17, 2026, on made-up data: the page prompt turned a 12-message sample mailbox into a 10-row requests.csv in one run, and 10 of 10 rows matched the known answers. It passed with snags: the same session wrote the sample and the script, so the script fit the sample, and a rerun rewrites the whole file. Manual mode and a real mailbox were not tested.

The full receipt is on https://www.aisetupsthatwork.com/setups/turn-job-emails-into-a-spreadsheet-with-claude-code/

## Source

https://www.aisetupsthatwork.com/setups/turn-job-emails-into-a-spreadsheet-with-claude-code/ (AI Setups That Work)
