Route legal-for-trade scale calibration outcomes with OpenAI and Google
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Sheets, OpenAI Chat Model, Google Drive and Gmail. It also calls wm.state-agency.example.gov over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Normalize Submission Data (Edit Fields (Set)): sets 3 fields: visit_id, technician, readings
- Split Per Device Reading (Split Out): splits a list into separate items
- Compute Tolerance Deviation (Code): runs custom JavaScript code
- Reading Data Valid? (If): checks a condition and branches into true / false
- Classify Compliance Status (Text Classifier): classifies text into categories with AI, with model: Classifier Model
- Log Invalid Submission (Google Sheets): append
- Route By Compliance Status (Switch): routes items into 3 branches
- Combine Branch Outcomes (Merge): merges the data from its input branches
- Store Certificate Of Conformance (Google Drive): uses Google Drive
- Send Urgent Out Of Tolerance Alert (Gmail): uses Gmail
…plus 6 more steps. See the full node list below.
Services it uses
HTTP calls to: wm.state-agency.example.gov
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.
Nodes used (14)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Split Out
n8n-nodes-base.splitOut - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Text Classifier
@n8n/n8n-nodes-langchain.textClassifier - Switch
n8n-nodes-base.switch - Google Drive
n8n-nodes-base.googleDrive - Gmail
n8n-nodes-base.gmail - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge - Aggregate
n8n-nodes-base.aggregate
From the author
Quick overview This workflow receives scale calibration results via webhook, calculates NIST Handbook 44-style tolerance deviations, uses OpenAI to classify each device outcome, and routes compliant, out-of-tolerance, condemned, and invalid submissions to…