Templates / Check Japan Freelance Act compliance on orders with Gemini, Gmail and Sheets

Check Japan Freelance Act compliance on orders with Gemini, Gmail and Sheets

Ready for 3.0

by Oka Hironobu ✓ · 0 views · created 2026-11-26

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 24 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail, Google Gemini Chat Model, Google Sheets and Slack.

How it runs

Trigger: On Gmail events (plus 1 other trigger).

  1. Normalize email order (Edit Fields (Set)): sets 5 fields: orderId, source, subject…
  2. Normalize form order (Edit Fields (Set)): sets 5 fields: orderId, source, subject…
  3. Set configuration (Edit Fields (Set)): sets 9 fields: sheetId, auditSheetName, errorSheetName…
  4. Clean and validate order text (Code): runs custom JavaScript code
  5. Has auditable text? (If): checks a condition and branches into true / false
  6. Remove duplicate orders in this run (Remove Duplicates): removes duplicate items
  7. Skip already audited orders (Remove Duplicates): removes duplicate items
  8. Extract order terms with Gemini (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini 2.5 Flash model; output parser: Parse order terms JSON
  9. Check Freelance Act compliance (Code): runs custom JavaScript code
  10. Format extraction error (Edit Fields (Set)): sets 4 fields: orderId, subject, error…

…plus 8 more steps. See the full node list below.

Services it uses

GmailGoogle Gemini Chat ModelGoogle SheetsSlack

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) (Watch labelled order emails).
Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (14)

From the author

Quick overview This workflow ingests freelance order terms from Gmail or an n8n form, uses Google Gemini to extract required contract items, checks them against Japan’s Freelance Act rules, logs results to Google Sheets, and alerts issues via Slack while…

Excerpt from Oka Hironobu's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.