Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Email Automation

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

  1. Every weekday 9:00
  2. Run now
  3. Config
  4. Read unsettled sales
  5. Read freee partners
  6. Find overdue sales
  7. Any reminder to write?
  8. Claude Haiku 4.5
  9. Write the reminder
  10. Check the drafts
  11. Draft passed?
  12. Save as Gmail draft
  13. Write the notice
  14. Tell the staff

15 steps in total.

Similar automations