Skip to content
FlowHubFluxonLab
B
AI Automationfree

Verify Japanese invoice registration numbers from Gmail using Gemini, NTA API, Sheets and Slack

by Oka Hironobuadapted from n8n official workflow galleryUpdated Aug 2026
RequiresBBasic LLM ChainCCodeGmailGmailGoogle Gemini Chat ModelGoogle SheetsGoogle SheetsHTTP RequestHTTP RequestSlackStructured Output ParserStructured Output Parser
Share Post Share
Fetch Invoice EmailsFetch Invoice E…EFExtract Invoice PDF TextExtract Invoice…CLExtract Invoice Fields with GeminiExtract Invoice…Google Gemini Chat ModelGoogle Gemini C…OPInvoice Fields ParserInvoice Fields …CoNormalize Registration NumberNormalize Regis…IfCheck Number FormatCheck Number Fo…HRVerify with NTA Invoice APIVerify with NTA…CoParse NTA ResponseParse NTA Respo…Log Verification ResultLog Verificatio…SwRoute by Verification ResultRoute by Verifi…Mark Invoice Email as ReadMark Invoice Em…Alert Deregistered IssuerAlert Deregiste…Alert Unregistered NumberAlert Unregiste…Flag for Manual CheckFlag for Manual…Report Missing NumberReport Missing …Report NTA API FailureReport NTA API …12345678910111213141516
1/5
STEPS · 16
Starts on a Gmail event

Quick Overview This workflow monitors Gmail for unread invoice emails with PDF attachments, extracts invoice details with Google Gemini, verifies Japanese qualified invoice registration numbers against the National Tax Agency (NTA) Invoice Web-API, logs results to Google Sheets, and sends Slack alerts for invalid, missing, or inconclusive checks. How it works Polls Gmail hourly for unread emails matching “has:attachment invoice” and downloads the first attachment. Extracts text from the attached invoice PDF. Uses Google Gemini to parse the invoice text into structured fields such as the T-registration number, issuer name, invoice date, and amounts. Normalizes and validates the registration number to ensure it matches the required “T + 13 digits” format. If the format is valid, calls the NTA Invoice Web-API to verify the registration number and interprets the response as valid, invalid, or not found. Appends the invoice details and verification status to a Google Sheets worksheet. Routes the outcome by sending the appropriate Slack alert for invalid/not found/inconclusive results or marking the invoice email as read when the number is valid.

Tags

n8nreference-onlychain-llmgmailgoogle-sheetslm-chat-google-geminioutput-parser-structuredslack
Connects
BBasic LLM ChainCCodegmailGmailGoogle Gemini Chat ModelsheetsGoogle SheetsWHTTP Request
CategoryAI Automation
Triggermanual
Complexitycomplex
Nodes17
AddedJul 19, 2026

Related workflows

See all AI Automation
BCgmail
free

Check Japanese ad copy compliance with Google Gemini, Sheets, Slack and Gmail

Quick Overview This workflow runs daily to review Japanese ad copy in Google Sheets using Google Gemini, writes compliance risk results back to the sheet, and alerts the right team in Slack (and drafts a Gmail revision request) based on high/medium/low risk. How it works Runs every day at 9:00 on a schedule. Reads ad copy rows from Google Sheets to find items that still need a compliance check. Sends each copy item to Google Gemini with the configured product category, target laws, and extra rules to generate a risk level, violations, and a compliant rewrite. Parses and normalizes the Gemini output into fields like risk level, violation count, and safe rewrite, and posts a Slack alert if the AI check fails. Updates the corresponding Google Sheets row with the compliance results to keep a record of the review. Routes the item by risk level and posts to Slack for legal blocking (high), marketing review (medium), publish-ready notification (low), or manual review when the result is inconclusive. For high-risk copy, also creates a Gmail draft requesting the author to revise the copy using the suggested compliant rewrite. Setup Add credentials for Google Sheets, Google Gemini (PaLM) API

by Oka Hironobu
ACgmailsheets
free

Screen LinkedIn jobs and send tailored applications with Apify and OpenAI

Quick overview This workflow collects your job preferences via an n8n form, uses Apify to scrape LinkedIn job listings, and has OpenAI screen and rank them. After you approve a shortlist by Gmail, it generates tailored resume and cover-letter PDFs with DocRaptor, emails them to you, and logs matches to Sheets How it works Receives your job preferences and resume text through an n8n form submission. Sends the preferences to Apify to scrape recent LinkedIn jobs, then removes duplicates and obvious mismatches (seniority, years of experience, and location). Uses OpenAI to score each job’s relevance and eligibility and returns a JSON verdict with a fit score and short reason. Keeps the top matches above the configured threshold and emails you a shortlist in Gmail with approve/decline buttons. If you approve, uses OpenAI to draft a job-specific resume and cover letter from only the provided profile text and generates HTML interview prep questions. Converts the resume and cover letter HTML into PDFs via DocRaptor, emails the tailored application package to you in Gmail, and appends the match details to a Google Sheets tracker. Setup Add credentials for OpenAI, Gmail OAuth2, Google Sheets

by Dr. Firas
Agmailsheetsopenaichatmodel
free

Answer customer questions on WhatsApp with OpenAI, Gmail, and Google Sheets

Quick overview This workflow answers incoming WhatsApp customer questions using an OpenAI-powered agent that reads your live website via HTTP requests, escalates unclear or sensitive cases to your support team via Gmail, and logs each conversation to Google Sheets. How it works Triggers when a new WhatsApp message is received. Loads configuration values (company name, website root URL, AI model, language rules, escalation email, and WhatsApp phone number ID) and extracts the customer phone number and message text. Ignores non-text WhatsApp updates (such as images, audio, and status messages). Uses OpenAI with conversation memory to navigate your website by listing links and fetching relevant pages, then generates a structured result containing an answer, escalation flag, sentiment, topic, and source URLs. If the agent marks the request as needing a human, sends an escalation email via Gmail to your support address with the customer details and the drafted reply. Sends the final plain-text reply back to the customer on WhatsApp. Appends the conversation details to a Google Sheets log. Setup Connect credentials for WhatsApp Trigger/WhatsApp Cloud API, OpenAI, Gmail, and Google Sheets

by Dr. Firas