Email Automation
Draft payment reminder emails from freee Accounting with Claude and Gmail
On a schedule, it handles email with Claude using Gmail.
What it does
## Draft payment reminders for overdue freee sales Every weekday morning this reads unsettled sales in freee Accounting, finds the ones past their due date with an amount still due, and groups them by customer. Claude writes a polite reminder (in Japanese) for each customer with an e-mail address. Code checks every number in it against freee: each invoice number, the remaining amount (not the billed total), each due date, and no other amount; threats, late fees and legal words are rejected. Passing reminders are saved as Gmail drafts — nothing is sent. The staff get one mail: drafts saved, drafts stopped and why, customers with no e-mail. ### Setup 1. A freee app with permissions for deals and partners (read). Put the invoice number in the deal's 管理番号 (ref number) if you want it in the reminder. 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 (company ID, staff e-mail, signature). Use Run now first; set today_override to test with a past date.
The steps
- Every weekday 9:00
- Run now
- Config
- Read unsettled sales
- Read freee partners
- Find overdue sales
- Any reminder to write?
- Claude Haiku 4.5
- Write the reminder
- Check the drafts
- Draft passed?
- Save as Gmail draft
- Write the notice
- Tell the staff
15 steps in total.
Similar automations
Email AutomationCreate freee draft invoices from order emails with Gmail and Claude Haiku24 stepsForms & SurveysCreate freee Invoice quotation drafts from Gmail or forms with Claude Haiku18 stepsFinance, Invoices & Accountingx402 Paid API Endpoint with 1Shot Payment Validation10 stepsTasks & Project ManagementCheck weekly customer data consistency between HubSpot, freee, Backlog and Slack12 steps