Email Automation
Create freee draft invoices from order emails with Gmail and Claude Haiku
When a new email arrives, it handles email with Claude using Gmail.
What it does
## Turn order mails into freee invoice drafts, from the quotation A customer replies "we order as quoted (Q-0000000004), but 800 brochures instead of 1,000". The invoice is created in freee Invoice as unsent, from that quotation. Prices, tax rates and lines are copied from the quotation by code; the AI never sets a price. Claude only reads the mail: is it an order, for which quotation, which quantities change, quoting the words behind each. Code checks: the quotation exists and is open, it was not invoiced before (memo "From quotation ..."), the new quantities are written in the mail. Additions and anything unclear become "※要確認 / To check" lines without a price, or no invoice at all. ### Setup 1. A freee app with permissions for partners (read) and [請求書] all document types (read/write); freee Invoice in use. 2. n8n OAuth2 API credential for freee (auth URL https://accounts.secure.freee.co.jp/public_api/authorize, token URL .../public_api/token, authentication: Body). Also Gmail and Anthropic. 3. Fill Config and the Gmail search in New order mail. Try the form first.
The steps
- New order mail
- Read the mail
- Paste an order
- Read the form
- Config
- Read freee partners
- Find the customer
- Customer found?
- Read their quotations
- Pick the candidates
- Any quotation?
- Read each quotation
- Read their invoices
- Prepare the prompt
24 steps in total.
Similar automations
Forms & SurveysCreate freee Invoice quotation drafts from Gmail or forms with Claude Haiku18 stepsEmail AutomationDraft payment reminder emails from freee Accounting with Claude and Gmail15 stepsTasks & Project ManagementCreate Backlog issues from Slack thread tasks with Claude Haiku 4.521 stepsForms & SurveysCreate traceable PowerPoint briefs from Slack threads with Claude Haiku29 steps