Create freee draft invoices from order emails with Gmail and Claude Haiku
Ready for 3.0What this workflow does
This AI workflow has 24 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail and Anthropic Chat Model. It also calls api.freee.co.jp over HTTP.
How it runs
Trigger: On Gmail events (plus 1 other trigger).
- Read the mail (Code): runs custom JavaScript code
- Read the form (Code): runs custom JavaScript code
- Config (Edit Fields (Set)): sets 6 fields: freee_company_id, staff_email, payment_terms…
- Read freee partners (HTTP Request): calls an HTTP API
- Find the customer (Code): runs custom JavaScript code
- Customer found? (If): checks a condition and branches into true / false
- Read their quotations (HTTP Request): calls an HTTP API
- Write the notice (Code): runs custom JavaScript code
- Pick the candidates (Code): runs custom JavaScript code
- Answer where asked (Switch): routes items into branches
…plus 11 more steps. See the full node list below.
Services it uses
Other Anthropic + Gmail templates (192)
HTTP calls to: api.freee.co.jp
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (New order mail).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (11)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Code
n8n-nodes-base.code - n8n Form Trigger
n8n-nodes-base.formTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Switch
n8n-nodes-base.switch - n8n Form
n8n-nodes-base.form - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow captures customer orders from Gmail or a public n8n form, matches the customer and their open quotations in freee, uses Anthropic Claude to interpret the order text, and creates an unsent freee Invoice draft based on the selected…