8
n8n 中文网amn8n.com

车辆检查与维护工作流自动化

高级

这是一个自动化工作流,包含 20 个节点。主要使用 If, Set, Code, Gmail, GoogleSheets 等节点。 使用OpenAI和JotForm自动化车辆检查与维护工作流

前置要求
  • Google 账号和 Gmail API 凭证
  • Google Sheets API 凭证
  • OpenAI API Key

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "277842713620d9f5554de3b1518b865a152c8c4db680008bd8aec536fc18b4a8",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "d2e9183f-f32a-4e71-af56-402f3b93a80c",
      "name": "解析检查数据",
      "type": "n8n-nodes-base.code",
      "position": [
        272,
        112
      ],
      "parameters": {
        "jsCode": "// Parse vehicle inspection form data\nconst formData = $input.first().json;\n\nreturn {\n  json: {\n    inspectionId: formData.submissionID || 'INS-' + Date.now(),\n    inspectionDate: formData.inspectionDate || new Date().toISOString().split('T')[0],\n    driverName: formData.driverName || formData.q3_driverName,\n    driverEmail: formData.driverEmail || formData.q4_driverEmail,\n    vehicleId: formData.vehicleId || formData.q5_vehicleId,\n    vehicleMake: formData.vehicleMake || formData.q6_vehicleMake,\n    vehicleModel: formData.vehicleModel || formData.q7_vehicleModel,\n    vehicleYear: formData.vehicleYear || formData.q8_vehicleYear,\n    licensePlate: formData.licensePlate || formData.q9_licensePlate,\n    currentMileage: parseInt(formData.currentMileage || formData.q10_currentMileage),\n    fuelLevel: formData.fuelLevel || formData.q11_fuelLevel,\n    tiresCondition: formData.tiresCondition || formData.q12_tiresCondition || 'good',\n    brakesCondition: formData.brakesCondition || formData.q13_brakesCondition || 'good',\n    lightsCondition: formData.lightsCondition || formData.q14_lightsCondition || 'good',\n    fluidLevels: formData.fluidLevels || formData.q15_fluidLevels || 'good',\n    engineCondition: formData.engineCondition || formData.q16_engineCondition || 'good',\n    transmissionCondition: formData.transmissionCondition || formData.q17_transmissionCondition || 'good',\n    interiorCondition: formData.interiorCondition || formData.q18_interiorCondition || 'good',\n    exteriorCondition: formData.exteriorCondition || formData.q19_exteriorCondition || 'good',\n    hasIssues: formData.hasIssues || formData.q20_hasIssues || 'no',\n    issueDescription: formData.issueDescription || formData.q21_issueDescription || '',\n    damagePhotos: formData.damagePhotos || formData.q22_damagePhotos || '',\n    cleanlinessRating: formData.cleanlinessRating || formData.q23_cleanlinessRating || '5',\n    odometerPhoto: formData.odometerPhoto || formData.q24_odometerPhoto || '',\n    notes: formData.notes || formData.q25_notes || '',\n    submittedAt: new Date().toISOString(),\n    status: 'pending_review'\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "383f6d18-ad13-4f9c-ba67-50128170ef73",
      "name": "获取车辆历史",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        80
      ],
      "parameters": {
        "jsCode": "// Retrieve maintenance history for vehicle\nconst data = $input.first().json;\n\nconst vehicleDatabase = {\n  lastInspectionMileage: data.currentMileage - 3500,\n  lastOilChangeMileage: data.currentMileage - 2800,\n  lastTireRotationMileage: data.currentMileage - 4200,\n  lastBrakeInspectionMileage: data.currentMileage - 5100,\n  oilChangeIntervalMiles: 5000,\n  tireRotationIntervalMiles: 6000,\n  brakeInspectionIntervalMiles: 10000,\n  annualInspectionDue: '2025-12-15',\n  registrationExpiry: '2025-11-30',\n  insuranceExpiry: '2026-03-15',\n  vehicleAge: new Date().getFullYear() - parseInt(data.vehicleYear),\n  fleetCategory: 'delivery',\n  dotInspectionDue: '2025-10-20'\n};\n\nconst oilChangeDue = (data.currentMileage - vehicleDatabase.lastOilChangeMileage) >= (vehicleDatabase.oilChangeIntervalMiles * 0.9);\nconst tireRotationDue = (data.currentMileage - vehicleDatabase.lastTireRotationMileage) >= (vehicleDatabase.tireRotationIntervalMiles * 0.9);\nconst brakeInspectionDue = (data.currentMileage - vehicleDatabase.lastBrakeInspectionMileage) >= (vehicleDatabase.brakeInspectionIntervalMiles * 0.9);\n\nconst today = new Date();\nconst annualInspectionOverdue = new Date(vehicleDatabase.annualInspectionDue) < today;\nconst dotInspectionOverdue = new Date(vehicleDatabase.dotInspectionDue) < today;\nconst registrationExpiringSoon = (new Date(vehicleDatabase.registrationExpiry) - today) / (1000 * 60 * 60 * 24) < 30;\n\nreturn {\n  json: {\n    ...data,\n    lastOilChangeMileage: vehicleDatabase.lastOilChangeMileage,\n    lastTireRotationMileage: vehicleDatabase.lastTireRotationMileage,\n    lastBrakeInspectionMileage: vehicleDatabase.lastBrakeInspectionMileage,\n    oilChangeDue: oilChangeDue,\n    tireRotationDue: tireRotationDue,\n    brakeInspectionDue: brakeInspectionDue,\n    milesSinceOilChange: data.currentMileage - vehicleDatabase.lastOilChangeMileage,\n    milesSinceTireRotation: data.currentMileage - vehicleDatabase.lastTireRotationMileage,\n    milesSinceBrakeInspection: data.currentMileage - vehicleDatabase.lastBrakeInspectionMileage,\n    annualInspectionDue: vehicleDatabase.annualInspectionDue,\n    annualInspectionOverdue: annualInspectionOverdue,\n    dotInspectionDue: vehicleDatabase.dotInspectionDue,\n    dotInspectionOverdue: dotInspectionOverdue,\n    registrationExpiry: vehicleDatabase.registrationExpiry,\n    registrationExpiringSoon: registrationExpiringSoon,\n    vehicleAge: vehicleDatabase.vehicleAge,\n    fleetCategory: vehicleDatabase.fleetCategory\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "f11733cb-050d-48a2-9009-7006b707a37d",
      "name": "AI 车队分析",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        752,
        144
      ],
      "parameters": {
        "text": "=You are an expert fleet maintenance analyst. Analyze this vehicle inspection:\n\n**Vehicle:** {{ $json.vehicleYear }} {{ $json.vehicleMake }} {{ $json.vehicleModel }} (ID: {{ $json.vehicleId }})\n**Mileage:** {{ $json.currentMileage }}\n**Age:** {{ $json.vehicleAge }} years\n**Category:** {{ $json.fleetCategory }}\n\n**Inspection Results:**\n- Tires: {{ $json.tiresCondition }}\n- Brakes: {{ $json.brakesCondition }}\n- Lights: {{ $json.lightsCondition }}\n- Fluids: {{ $json.fluidLevels }}\n- Engine: {{ $json.engineCondition }}\n- Transmission: {{ $json.transmissionCondition }}\n- Interior: {{ $json.interiorCondition }}\n- Exterior: {{ $json.exteriorCondition }}\n- Fuel: {{ $json.fuelLevel }}\n\n**Issues:** {{ $json.hasIssues }}\n{{ $json.issueDescription }}\n\n**Maintenance Status:**\n- Miles since oil change: {{ $json.milesSinceOilChange }}\n- Oil change due: {{ $json.oilChangeDue }}\n- Tire rotation due: {{ $json.tireRotationDue }}\n- Brake inspection due: {{ $json.brakeInspectionDue }}\n- Annual inspection overdue: {{ $json.annualInspectionOverdue }}\n- DOT inspection overdue: {{ $json.dotInspectionOverdue }}\n\nProvide JSON analysis:\n{\n  \"overallStatus\": {\n    \"condition\": \"excellent|good|fair|poor|critical\",\n    \"driveable\": true|false,\n    \"requiresImmediateAction\": true|false,\n    \"safetyRating\": 0-100,\n    \"summary\": \"brief assessment\"\n  },\n  \"criticalIssues\": [{\"component\": \"\", \"severity\": \"\", \"description\": \"\", \"action_required\": \"\", \"estimated_cost\": \"\", \"safety_concern\": true|false}],\n  \"maintenanceRequired\": {\n    \"immediate\": [{\"service\": \"\", \"reason\": \"\", \"urgency\": \"\", \"estimated_hours\": 0, \"estimated_cost\": \"\"}],\n    \"scheduled\": [{\"service\": \"\", \"due_in_miles\": 0, \"reason\": \"\"}]\n  },\n  \"complianceStatus\": {\"dotCompliant\": true|false, \"roadworthy\": true|false, \"complianceIssues\": []},\n  \"costAnalysis\": {\"totalEstimatedCost\": \"\", \"potentialDowntime\": \"\"},\n  \"workOrderGeneration\": {\"createWorkOrder\": true|false, \"workOrderType\": \"\", \"assignTo\": \"\", \"instructions\": []}\n}",
        "options": {
          "systemMessage": "You are an expert fleet maintenance analyst with DOT compliance expertise."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.6
    },
    {
      "id": "fd9848b3-1f60-459f-9abd-ace76e907b6d",
      "name": "提取 AI 分析",
      "type": "n8n-nodes-base.set",
      "position": [
        1024,
        256
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "aiAnalysis",
              "name": "aiAnalysis",
              "type": "string",
              "value": "={{ $json.output }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "ec1bfb09-a6b4-4981-97d1-0664f114f77c",
      "name": "合并车队分析",
      "type": "n8n-nodes-base.code",
      "position": [
        1200,
        160
      ],
      "parameters": {
        "jsCode": "const inspectionData = $input.first().json;\nconst aiAnalysisRaw = inspectionData.aiAnalysis;\n\nlet aiAnalysis;\ntry {\n  aiAnalysis = JSON.parse(aiAnalysisRaw);\n} catch (e) {\n  aiAnalysis = {\n    overallStatus: {condition: 'good', driveable: true, requiresImmediateAction: false, safetyRating: 85, summary: 'Vehicle in acceptable condition'},\n    criticalIssues: [],\n    maintenanceRequired: {immediate: [], scheduled: []},\n    complianceStatus: {dotCompliant: true, roadworthy: true, complianceIssues: []},\n    costAnalysis: {totalEstimatedCost: '$0-500', potentialDowntime: '0 hours'},\n    workOrderGeneration: {createWorkOrder: false, workOrderType: 'routine', assignTo: 'general_maintenance', instructions: []}\n  };\n}\n\nlet vehicleStatus = 'operational';\nif (!aiAnalysis.overallStatus.driveable) {\n  vehicleStatus = 'out_of_service';\n} else if (aiAnalysis.overallStatus.requiresImmediateAction) {\n  vehicleStatus = 'requires_attention';\n}\n\nconst workOrderNumber = aiAnalysis.workOrderGeneration.createWorkOrder ? 'WO-' + inspectionData.vehicleId + '-' + Date.now() : null;\n\nreturn {\n  json: {\n    ...inspectionData,\n    overallCondition: aiAnalysis.overallStatus.condition,\n    driveable: aiAnalysis.overallStatus.driveable,\n    requiresImmediateAction: aiAnalysis.overallStatus.requiresImmediateAction,\n    safetyRating: aiAnalysis.overallStatus.safetyRating,\n    statusSummary: aiAnalysis.overallStatus.summary,\n    vehicleStatus: vehicleStatus,\n    criticalIssues: aiAnalysis.criticalIssues,\n    criticalIssueCount: aiAnalysis.criticalIssues.length,\n    immediateMaintenanceNeeded: aiAnalysis.maintenanceRequired.immediate,\n    scheduledMaintenanceNeeded: aiAnalysis.maintenanceRequired.scheduled,\n    dotCompliant: aiAnalysis.complianceStatus.dotCompliant,\n    roadworthy: aiAnalysis.complianceStatus.roadworthy,\n    complianceIssues: aiAnalysis.complianceStatus.complianceIssues,\n    totalEstimatedCost: aiAnalysis.costAnalysis.totalEstimatedCost,\n    potentialDowntime: aiAnalysis.costAnalysis.potentialDowntime,\n    createWorkOrder: aiAnalysis.workOrderGeneration.createWorkOrder,\n    workOrderNumber: workOrderNumber,\n    workOrderType: aiAnalysis.workOrderGeneration.workOrderType,\n    assignTo: aiAnalysis.workOrderGeneration.assignTo,\n    workOrderInstructions: aiAnalysis.workOrderGeneration.instructions\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "3b340f0c-7a07-4397-b442-67bdbc6c917b",
      "name": "关键问题?",
      "type": "n8n-nodes-base.if",
      "position": [
        1408,
        160
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "condition1",
              "operator": {
                "type": "boolean",
                "operation": "true"
              },
              "leftValue": "={{ $json.requiresImmediateAction }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "27cbd1d5-53ad-4a1c-b258-d9a710bcf150",
      "name": "关键警报邮件",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1616,
        64
      ],
      "webhookId": "21b82ab8-74d6-4bc2-b6b0-7148e5d6ba16",
      "parameters": {
        "sendTo": "maintenance@fleet.com",
        "message": "=🚨 CRITICAL VEHICLE ISSUE\n\nVehicle: {{ $('Jotform Trigger').item.json['vehicle Year'] }} {{ $('Jotform Trigger').item.json['vehicle Make'] }} {{ $('Jotform Trigger').item.json['vehicle Model'] }}\nID: {{ $('Jotform Trigger').item.json['vehicle Id'] }}\nPlate: {{ $('Jotform Trigger').item.json['license Plate'] }}\nMileage: {{ $('Jotform Trigger').item.json['current Mileage'] }}\n\nStatus: {{ $('Merge Fleet Analysis').item.json.statusSummary }}\nDriveable: {{ $('Merge Fleet Analysis').item.json.driveable }}\nSafety Rating: {{ $('Merge Fleet Analysis').item.json.safetyRating }}/100\n\n{{ $('Merge Fleet Analysis').item.json.statusSummary }}\n\nCritical Issues: {{ $json.criticalIssueCount }}\n{{ $json.criticalIssues.map((i, idx) => `${idx + 1}. ${i.component}: ${i.description}\\n   Action: ${i.action_required}\\n   Cost: ${i.estimated_cost}`).join('\\n\\n') }}\n\nWork Order: {{ $json.workOrderNumber }}\nAssign To: {{ $json.assignTo }}\n\nDriver: {{ $json.driverName }}\nEmail: {{ $json.driverEmail }}",
        "options": {},
        "subject": "=🚨 CRITICAL: Vehicle {{ $('Jotform Trigger').item.json['vehicle Id'] }} Requires Immediate Action"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PIMDNhXNj8Zyiz3G",
          "name": "Gmail account - Deepanshi"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2380918c-b8b4-4ccc-b5bb-c79fe921c439",
      "name": "例行报告邮件",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1616,
        304
      ],
      "webhookId": "b392e74d-48b3-420c-8206-1af22a3d3549",
      "parameters": {
        "sendTo": "maintenance@fleet.com",
        "message": "=Vehicle Inspection Report\n\nVehicle: {{ $('Jotform Trigger').item.json['vehicle Year'] }} {{ $('Jotform Trigger').item.json['vehicle Make'] }} {{ $('Jotform Trigger').item.json['vehicle Model'] }}\nID: {{ $('Jotform Trigger').item.json['vehicle Id'] }}\nMileage: {{ $('Jotform Trigger').item.json['current Mileage'] }}\n\nCondition: {{ $json.overallCondition.toUpperCase() }}\nSafety Rating: {{ $json.safetyRating }}/100\nStatus: {{ $json.vehicleStatus }}\n\n{{ $json.statusSummary }}\n\nMaintenance Due:\n- Oil Change: {{ $json.oilChangeDue ? 'YES' : 'NO' }}\n- Tire Rotation: {{ $json.tireRotationDue ? 'YES' : 'NO' }}\n- Brake Inspection: {{ $json.brakeInspectionDue ? 'YES' : 'NO' }}\n\n{{ $json.createWorkOrder ? 'Work Order: ' + $json.workOrderNumber : 'No work order needed' }}\n\nDriver:{{ $('Jotform Trigger').item.json['driver Name'] }} \nInspection Date: {{ $('Parse Inspection Data').item.json.inspectionDate }}",
        "options": {},
        "subject": "=Vehicle Inspection: {{ $('Jotform Trigger').item.json['vehicle Id'] }} - {{ $json.overallCondition }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PIMDNhXNj8Zyiz3G",
          "name": "Gmail account - Deepanshi"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "783860df-163c-45c3-9102-105069dc1f21",
      "name": "驾驶员确认",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1840,
        160
      ],
      "webhookId": "d5869319-cba9-404f-8644-d3ca740dc7af",
      "parameters": {
        "sendTo": "={{ $('Jotform Trigger').item.json['driver Email'] }}",
        "message": "=Hi {{ $('Jotform Trigger').item.json['driver Name'] }},\n\nThank you for your vehicle inspection.\n\nVehicle: {{ $('Jotform Trigger').item.json['vehicle Id'] }}\nCondition: {{ $('Merge Fleet Analysis').item.json.overallCondition }}\nSafety Rating: {{ $('Merge Fleet Analysis').item.json.safetyRating }}/100\n\n{{ $json.requiresImmediateAction ? '⚠️ IMMEDIATE ACTION REQUIRED - Contact maintenance immediately.' : 'Vehicle is operational.' }}\n\n{{ !$json.driveable ? '🚫 VEHICLE OUT OF SERVICE - Do not operate.' : '' }}\n\n{{ $json.createWorkOrder ? 'Maintenance scheduled. Work Order: ' + $json.workOrderNumber : 'No immediate maintenance needed.' }}\n\nThank you!\nFleet Management",
        "options": {},
        "subject": "=Vehicle Inspection Received - {{ $('Jotform Trigger').item.json['vehicle Id'] }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PIMDNhXNj8Zyiz3G",
          "name": "Gmail account - Deepanshi"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "be1876cf-fcde-4d45-a2b7-b970e6c3a5ca",
      "name": "记录到 Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2080,
        160
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "driver Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "driver Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "vehicle Id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "vehicle Id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "driver Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "driver Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "vehicle Make",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "vehicle Make",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "vehicle Make",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "vehicle Make",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "vehicle Model",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "vehicle Model",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "license Plate",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "license Plate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "current Mileage",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "current Mileage",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "fuel Level",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "fuel Level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tires Condition",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "tires Condition",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "brakes Condition",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "brakes Condition",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "lights Condition",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "lights Condition",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "fluid Levels",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "fluid Levels",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "engine Condition",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "engine Condition",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "transmission Condition",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "transmission Condition",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "interior Condition",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "interior Condition",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "exterior Condition",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "exterior Condition",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "has Issues",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "has Issues",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "issue Description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "issue Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cleanliness Rating",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "cleanliness Rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "notes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "vehicle Id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1K0lqkb-z0fbdb_pEUDtUfl5N2jQ_nT-YEQtylwB4968/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1K0lqkb-z0fbdb_pEUDtUfl5N2jQ_nT-YEQtylwB4968",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1K0lqkb-z0fbdb_pEUDtUfl5N2jQ_nT-YEQtylwB4968/edit?usp=drivesdk",
          "cachedResultName": "Fleet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "Kz2DdSp11rxqwlFt",
          "name": "Google Sheets account - Deepanshi"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "aa9d87fe-0ee3-46d2-aabd-3565f4fab995",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        0
      ],
      "parameters": {
        "height": 240,
        "content": "📩 **触发器**"
      },
      "typeVersion": 1
    },
    {
      "id": "e90fe0d1-e13e-494c-8661-280ac2fb2f73",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -64
      ],
      "parameters": {
        "height": 240,
        "content": "🧾 **解析数据**"
      },
      "typeVersion": 1
    },
    {
      "id": "d53d3939-3026-40c4-b616-f044250b4c15",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -32
      ],
      "parameters": {
        "height": 240,
        "content": "📊 **车辆历史**"
      },
      "typeVersion": 1
    },
    {
      "id": "aa85e72a-c131-4a80-9978-39476ee0edbb",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        -32
      ],
      "parameters": {
        "height": 240,
        "content": "🤖 **AI 分析**"
      },
      "typeVersion": 1
    },
    {
      "id": "b808706d-27fb-429e-91d8-83fa0f4a81d1",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        -32
      ],
      "parameters": {
        "width": 320,
        "height": 448,
        "content": "🔗 **合并**"
      },
      "typeVersion": 1
    },
    {
      "id": "7007da02-c58e-48e4-96b8-c782dc5fbc28",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        -32
      ],
      "parameters": {
        "width": 352,
        "height": 528,
        "content": "⚡ **路由**"
      },
      "typeVersion": 1
    },
    {
      "id": "f0308e9e-2544-4f86-bba8-e1d28ec3da4c",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1760,
        48
      ],
      "parameters": {
        "height": 240,
        "content": "📧 **通知**"
      },
      "typeVersion": 1
    },
    {
      "id": "c5a7463b-b685-4541-8f88-983e73569cc8",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2048,
        0
      ],
      "parameters": {
        "height": 336,
        "content": "📊 **日志记录**"
      },
      "typeVersion": 1
    },
    {
      "id": "cdfb30d5-2b65-4d3b-a07b-9b9c03abe993",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        752,
        336
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "8IkhtT3EbXygnvcr",
          "name": "Klinsman OpenAI"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b61be557-a538-4239-a5ab-666c4b30554f",
      "name": "Jotform 触发器",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        0,
        128
      ],
      "webhookId": "vehicle-inspection",
      "parameters": {
        "form": "252866368275067"
      },
      "credentials": {
        "jotFormApi": {
          "id": "W7O1b225FpOwkwDT",
          "name": "JotForm account-Deepanshi"
        }
      },
      "typeVersion": 1
    }
  ],
  "pinData": {
    "Jotform Trigger": [
      {
        "notes": "",
        "fuel Level": "full",
        "has Issues": "no",
        "vehicle Id": "123456",
        "driver Name": "Deepanshi",
        "driver Email": "Deepanshi@mediajade.com",
        "fluid Levels": "ok",
        "vehicle Make": "Hyundai",
        "vehicle Year": "2005",
        "damage Photos": "",
        "license Plate": "yes",
        "vehicle Model": "i20",
        "odometer Photo": "",
        "current Mileage": "200000",
        "tires Condition": "good",
        "brakes Condition": "bad",
        "engine Condition": "ok",
        "lights Condition": "god",
        "issue Description": "no",
        "cleanliness Rating": "4",
        "exterior Condition": "good",
        "interior Condition": "good",
        "transmission Condition": "ok"
      }
    ]
  },
  "connections": {
    "Critical Issue?": {
      "main": [
        [
          {
            "node": "Critical Alert Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Routine Report Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jotform Trigger": {
      "main": [
        [
          {
            "node": "Parse Inspection Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Fleet Analysis": {
      "main": [
        [
          {
            "node": "Extract AI Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Fleet Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Driver Confirmation": {
      "main": [
        [
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract AI Analysis": {
      "main": [
        [
          {
            "node": "Merge Fleet Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Vehicle History": {
      "main": [
        [
          {
            "node": "AI Fleet Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Critical Alert Email": {
      "main": [
        [
          {
            "node": "Driver Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Fleet Analysis": {
      "main": [
        [
          {
            "node": "Critical Issue?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Routine Report Email": {
      "main": [
        [
          {
            "node": "Driver Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Inspection Data": {
      "main": [
        [
          {
            "node": "Get Vehicle History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量20
分类-
节点类型9
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Jitesh Dugar

Jitesh Dugar

@jiteshdugar

AI Automation Specialist - OpenAI, CRM & Automation Expert with a solid understanding of various tools that include Zapier, Make, Zoho CRM, Hubspot, Google Sheets, Airtable, Pipedrive, Google Analytics, and more.

外部链接
在 n8n.io 查看

分享此工作流