{"workflow":{"id":13691,"name":"Validate customs clearance documents with Claude AI, Google Drive and Slack","views":75,"recentViews":0,"totalViews":75,"createdAt":"2026-02-25T08:07:45.541Z","description":"This workflow automates pre-dispatch customs document validation for international shipments. It ingests shipping document packages, extracts content from each file, uses Claude AI to cross-validate all documents for consistency, regulatory compliance, and HS code accuracy, then flags errors before goods are dispatched — preventing costly delays, fines, and rejected shipments at the border.\n\n### How it works\n\n1. **Trigger** — Webhook submission or watched Drive/S3 folder when new shipment docs are uploaded\n2. **Register Shipment** — Assigns shipment case ID, normalises metadata from payload\n3. **Fetch Document Files** — Downloads each document from Google Drive or URL\n4. **Extract Text Content** — Parses PDF/DOCX text from all documents\n5. **Classify Document Types** — Identifies invoice, packing list, bill of lading, COO, etc.\n6. **Cross-Document Consistency Check** — Detects mismatches across documents (values, weights, quantities)\n7. **AI Compliance Validation** — Claude AI validates each doc against destination country rules\n8. **Aggregate Findings** — Merges per-document results into a shipment-level report\n9. **Route by Risk Level** — Branches on CLEAR / HOLD / REJECT\n10. **Notify Logistics Team** — Slack alert with error summary and action items\n11. **Email Exporter Report** — Detailed validation report with fix instructions\n12. **Update Shipment Tracker** — Writes status back to Airtable / Google Sheets\n13. **Create Compliance Ticket** — Opens Jira issue for HOLD or REJECT shipments\n14. **Return API Response** — Structured JSON result to caller or TMS integration\n\n### Setup Steps\n\n1. Import workflow into n8n\n2. Configure credentials:\n   - **Anthropic API** — Claude AI for compliance validation\n   - **Google Drive OAuth** — Document intake and storage\n   - **Google Sheets OAuth** — Shipment compliance audit log\n   - **Airtable** — Shipment tracker CRM\n   - **Slack OAuth** — Logistics team alerts\n   - **SendGrid / SMTP** — Exporter notification emails\n   - **Jira API** — Compliance issue tracking\n3. Set your Google Drive intake folder ID\n4. Configure destination country rules in the AI prompt node\n5. Set your Airtable base and shipment table IDs\n6. Activate the workflow\n\n### Sample Webhook Payload\n```json\n{\n  \"shipmentId\": \"SHP-2025-00392\",\n  \"exporterEmail\": \"logistics@exportco.com\",\n  \"originCountry\": \"CN\",\n  \"destinationCountry\": \"AU\",\n  \"incoterms\": \"FOB\",\n  \"declaredValue\": 48500,\n  \"currency\": \"USD\",\n  \"goodsDescription\": \"Electronic Components\",\n  \"documents\": [\n    { \"name\": \"Commercial Invoice\", \"type\": \"commercial_invoice\", \"driveFileId\": \"1aBcD\" },\n    { \"name\": \"Packing List\",       \"type\": \"packing_list\",       \"driveFileId\": \"2eFgH\" },\n    { \"name\": \"Bill of Lading\",     \"type\": \"bill_of_lading\",     \"driveFileId\": \"3iJkL\" },\n    { \"name\": \"Certificate of Origin\", \"type\": \"certificate_of_origin\", \"driveFileId\": \"4mNoP\" }\n  ]\n}\n```\n\n### Documents Supported\n- Commercial Invoice\n- Packing List\n- Bill of Lading (B/L) / Airway Bill (AWB)\n- Certificate of Origin (COO / Form D / EUR.1)\n- Customs Entry / Import Declaration\n- Dangerous Goods Declaration (DGD)\n- Phytosanitary / Health Certificate\n- Insurance Certificate\n- Letter of Credit (L/C)\n- Export Licence / Permit\n- Material Safety Data Sheet (MSDS)\n- Fumigation Certificate\n\n### AI Validation Checks\n- **Field Completeness** — All mandatory fields present and populated\n- **Cross-Document Consistency** — Values, weights, quantities, HS codes match across docs\n- **HS Code Validation** — Correct classification for declared goods and destination\n- **Incoterms Compliance** — Terms correctly applied across invoice and B/L\n- **Valuation Rules** — Customs value method correct, currency declared\n- **Country of Origin** — COO criteria met, preferential rates applicable\n- **Restricted / Prohibited Goods** — Flags potential dual-use, CITES, or embargoed items\n- **Sanction Screening** — Party names checked against common red flags\n- **Date & Validity** — Document dates consistent, certificates not expired\n\n### Features\n- Multi-document cross-validation in a single run\n- AI-powered HS code verification and suggestion\n- Destination-country–specific compliance rules\n- Automatic HOLD/REJECT routing for high-risk findings\n- Detailed error report with fix instructions per field\n- Full audit trail in Google Sheets\n- Jira ticket creation for escalated compliance issues\n\n**Explore More Automation:**  \n[Contact us](https://www.oneclickitsolution.com/contact-us/) to design AI-powered lead nurturing, content engagement, and multi-platform reply workflows tailored to your growth strategy.","workflow":{"id":"iIUk4v4G8vXADl0a","meta":{"instanceId":"dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281","templateCredsSetupCompleted":true},"name":"AI Customs Clearance Document Checker","tags":[],"nodes":[{"id":"ba5857a1-4dce-41d5-bc31-c7bd6c4d87b6","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-80,-480],"parameters":{"width":1060,"height":2144,"content":"## AI Customs Clearance Document Checker\n\nThis workflow automates pre-dispatch customs document validation for international shipments. It ingests shipping document packages, extracts content from each file, uses Claude AI to cross-validate all documents for consistency, regulatory compliance, and HS code accuracy, then flags errors before goods are dispatched — preventing costly delays, fines, and rejected shipments at the border.\n\n### How it works\n\n1. **Trigger** — Webhook submission or watched Drive/S3 folder when new shipment docs are uploaded\n2. **Register Shipment** — Assigns shipment case ID, normalises metadata from payload\n3. **Fetch Document Files** — Downloads each document from Google Drive or URL\n4. **Extract Text Content** — Parses PDF/DOCX text from all documents\n5. **Classify Document Types** — Identifies invoice, packing list, bill of lading, COO, etc.\n6. **Cross-Document Consistency Check** — Detects mismatches across documents (values, weights, quantities)\n7. **AI Compliance Validation** — Claude AI validates each doc against destination country rules\n8. **Aggregate Findings** — Merges per-document results into a shipment-level report\n9. **Route by Risk Level** — Branches on CLEAR / HOLD / REJECT\n10. **Notify Logistics Team** — Slack alert with error summary and action items\n11. **Email Exporter Report** — Detailed validation report with fix instructions\n12. **Update Shipment Tracker** — Writes status back to Airtable / Google Sheets\n13. **Create Compliance Ticket** — Opens Jira issue for HOLD or REJECT shipments\n14. **Return API Response** — Structured JSON result to caller or TMS integration\n\n### Setup Steps\n\n1. Import workflow into n8n\n2. Configure credentials:\n   - **Anthropic API** — Claude AI for compliance validation\n   - **Google Drive OAuth** — Document intake and storage\n   - **Google Sheets OAuth** — Shipment compliance audit log\n   - **Airtable** — Shipment tracker CRM\n   - **Slack OAuth** — Logistics team alerts\n   - **SendGrid / SMTP** — Exporter notification emails\n   - **Jira API** — Compliance issue tracking\n3. Set your Google Drive intake folder ID\n4. Configure destination country rules in the AI prompt node\n5. Set your Airtable base and shipment table IDs\n6. Activate the workflow\n\n### Sample Webhook Payload\n```json\n{\n  \"shipmentId\": \"SHP-2025-00392\",\n  \"exporterEmail\": \"logistics@exportco.com\",\n  \"originCountry\": \"CN\",\n  \"destinationCountry\": \"AU\",\n  \"incoterms\": \"FOB\",\n  \"declaredValue\": 48500,\n  \"currency\": \"USD\",\n  \"goodsDescription\": \"Electronic Components\",\n  \"documents\": [\n    { \"name\": \"Commercial Invoice\", \"type\": \"commercial_invoice\", \"driveFileId\": \"1aBcD\" },\n    { \"name\": \"Packing List\",       \"type\": \"packing_list\",       \"driveFileId\": \"2eFgH\" },\n    { \"name\": \"Bill of Lading\",     \"type\": \"bill_of_lading\",     \"driveFileId\": \"3iJkL\" },\n    { \"name\": \"Certificate of Origin\", \"type\": \"certificate_of_origin\", \"driveFileId\": \"4mNoP\" }\n  ]\n}\n```\n\n### Documents Supported\n- Commercial Invoice\n- Packing List\n- Bill of Lading (B/L) / Airway Bill (AWB)\n- Certificate of Origin (COO / Form D / EUR.1)\n- Customs Entry / Import Declaration\n- Dangerous Goods Declaration (DGD)\n- Phytosanitary / Health Certificate\n- Insurance Certificate\n- Letter of Credit (L/C)\n- Export Licence / Permit\n- Material Safety Data Sheet (MSDS)\n- Fumigation Certificate\n\n### AI Validation Checks\n- **Field Completeness** — All mandatory fields present and populated\n- **Cross-Document Consistency** — Values, weights, quantities, HS codes match across docs\n- **HS Code Validation** — Correct classification for declared goods and destination\n- **Incoterms Compliance** — Terms correctly applied across invoice and B/L\n- **Valuation Rules** — Customs value method correct, currency declared\n- **Country of Origin** — COO criteria met, preferential rates applicable\n- **Restricted / Prohibited Goods** — Flags potential dual-use, CITES, or embargoed items\n- **Sanction Screening** — Party names checked against common red flags\n- **Date & Validity** — Document dates consistent, certificates not expired\n\n### Features\n- Multi-document cross-validation in a single run\n- AI-powered HS code verification and suggestion\n- Destination-country–specific compliance rules\n- Automatic HOLD/REJECT routing for high-risk findings\n- Detailed error report with fix instructions per field\n- Full audit trail in Google Sheets\n- Jira ticket creation for escalated compliance issues\n\n---\n\n**Explore More Automation:**  \n[Contact us](https://www.oneclickitsolution.com/contact-us/) to design AI-powered lead nurturing, content engagement, and multi-platform reply workflows tailored to your growth strategy."},"typeVersion":1},{"id":"0b2d0325-6e94-40b8-b422-aae2cb7180cb","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[1032,572],"parameters":{"color":5,"width":496,"height":548,"content":"## 1. Shipment Intake & Document Retrieval\n### Webhook · Drive Trigger · File Download · Text Extraction"},"typeVersion":1},{"id":"21be3ced-5308-42c6-8308-d97aa8122534","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1584,608],"parameters":{"color":5,"width":800,"height":504,"content":"## 2. Document Classification & Cross-Document Consistency Check\n### Type Detection · Field Extraction · Mismatch Detection"},"typeVersion":1},{"id":"b93a1e99-de64-4588-9a30-679eba2d1a44","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[2412,612],"parameters":{"color":5,"width":840,"height":604,"content":"## 3. Claude AI Customs Compliance Validation\n### Per-Document Rules · HS Code Check · Sanction Screening"},"typeVersion":1},{"id":"dca3d7b5-2aeb-4dc1-85bc-8ad3f9697cc4","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[3280,368],"parameters":{"color":5,"width":884,"height":1040,"content":"## 4. Risk Routing · Notifications · Tracker Update · Jira · Audit Log"},"typeVersion":1},{"id":"d1692071-f57d-44f8-b539-fe7f4b55e3ea","name":"Receive Shipment Documents","type":"n8n-nodes-base.webhook","position":[1152,736],"webhookId":"customs-clearance-checker-webhook","parameters":{"path":"check-customs-documents","options":{"allowedOrigins":"*"},"httpMethod":"POST","responseMode":"responseNode"},"typeVersion":2},{"id":"159e9ea3-ded9-45f7-b94e-506e7b6125e4","name":"Watch Shipment Docs Folder","type":"n8n-nodes-base.googleDriveTrigger","position":[1152,928],"parameters":{"event":"fileCreated","options":{},"pollTimes":{"item":[{"mode":"everyMinute"}]},"triggerOn":"specificFolder","folderToWatch":{"__rl":true,"mode":"id","value":"YOUR_SHIPMENT_INTAKE_FOLDER_ID"}},"credentials":{"googleDriveOAuth2Api":{"id":"credential-id","name":"Google Drive account - test"}},"typeVersion":1,"continueOnFail":true},{"id":"a6b9ce08-1606-4c4c-8867-cdaaa1b808b9","name":"Register Shipment Case","type":"n8n-nodes-base.code","position":[1376,832],"parameters":{"jsCode":"const raw = $input.first()?.json?.body || $input.first()?.json || {};\n\nconst isWebhook = !!(raw.shipmentId || raw.exporterEmail);\n\nconst shipmentId = raw.shipmentId\n  || `SHP-${new Date().getFullYear()}-${String(Date.now()).slice(-5)}`;\n\nconst documents = raw.documents || [];\nconst finalDocs = documents.length > 0 ? documents : [{\n  name: raw.name || 'Unknown Document',\n  type: 'unknown',\n  driveFileId: raw.id || raw.driveFileId || null,\n  url: raw.webViewLink || null\n}];\n\nconst shipment = {\n  shipmentId,\n  exporterEmail: raw.exporterEmail || 'user@example.com',\n  exporterName: raw.exporterName || 'Exporter',\n  originCountry: (raw.originCountry || 'CN').toUpperCase(),\n  destinationCountry: (raw.destinationCountry || 'AU').toUpperCase(),\n  incoterms: (raw.incoterms || 'FOB').toUpperCase(),\n  declaredValue: parseFloat(raw.declaredValue) || 0,\n  currency: (raw.currency || 'USD').toUpperCase(),\n  goodsDescription: raw.goodsDescription || 'General Merchandise',\n  transportMode: (raw.transportMode || 'SEA').toUpperCase(),\n  totalDocuments: finalDocs.length,\n  caseRunId: `RUN-${Date.now()}-${Math.random().toString(36).substr(2,5).toUpperCase()}`,\n  registeredAt: new Date().toISOString()\n};\n\nreturn finalDocs.map(doc => ({\n  json: {\n    shipment,\n    document: {\n      docId: `DOC-${Math.random().toString(36).substr(2,8).toUpperCase()}`,\n      name: doc.name || 'Unnamed',\n      declaredType: (doc.type || 'unknown').toLowerCase().replace(/\\s+/g, '_'),\n      driveFileId: doc.driveFileId || doc.id || null,\n      url: doc.url || null\n    }\n  }\n}));"},"typeVersion":2},{"id":"4cbc3adf-22a5-45be-8cce-492cc0c545eb","name":"Fetch Document from Drive","type":"n8n-nodes-base.googleDrive","position":[1600,832],"parameters":{"fileId":{"__rl":true,"mode":"id","value":"={{ $json.document.driveFileId }}"},"options":{},"operation":"download"},"credentials":{"googleDriveOAuth2Api":{"id":"credential-id","name":"Google Drive account - test"}},"typeVersion":3,"continueOnFail":true},{"id":"31926704-5e1f-4bf4-8577-0c08e8e93fbe","name":"Extract Text from Document","type":"n8n-nodes-base.extractFromFile","position":[1824,832],"parameters":{"options":{},"operation":"pdf"},"typeVersion":1,"continueOnFail":true},{"id":"95ae7bcd-d338-4a18-bcff-8e766c4b0ef2","name":"Classify Type & Extract Key Fields","type":"n8n-nodes-base.code","position":[2048,832],"parameters":{"mode":"runOnceForEachItem","jsCode":"const meta = $('Register Shipment Case').item.json;\nconst rawText = $('Extract Text from Document').item?.json?.text || 'EXTRACTION_FAILED';\nconst text = rawText.toLowerCase();\n\n// ── Document Type Detection ──\nconst detectedType = (() => {\n  if (text.includes('commercial invoice') || (text.includes('invoice') && text.includes('unit price'))) return 'COMMERCIAL_INVOICE';\n  if (text.includes('packing list') || (text.includes('net weight') && text.includes('gross weight') && text.includes('cartons'))) return 'PACKING_LIST';\n  if (text.includes('bill of lading') || text.includes('b/l no') || text.includes('shipper') && text.includes('notify party')) return 'BILL_OF_LADING';\n  if (text.includes('airway bill') || text.includes('awb') || text.includes('air waybill')) return 'AIRWAY_BILL';\n  if (text.includes('certificate of origin') || text.includes('country of origin') && text.includes('certif')) return 'CERTIFICATE_OF_ORIGIN';\n  if (text.includes('dangerous goods') || text.includes('imdg') || text.includes('un number')) return 'DANGEROUS_GOODS_DECLARATION';\n  if (text.includes('phytosanitary') || text.includes('plant health') || text.includes('quarantine')) return 'PHYTOSANITARY_CERTIFICATE';\n  if (text.includes('insurance') && (text.includes('marine') || text.includes('cargo'))) return 'INSURANCE_CERTIFICATE';\n  if (text.includes('letter of credit') || text.includes('l/c no') || text.includes('documentary credit')) return 'LETTER_OF_CREDIT';\n  if (text.includes('export licence') || text.includes('export permit') || text.includes('export authorization')) return 'EXPORT_LICENCE';\n  if (text.includes('material safety') || text.includes('msds') || text.includes('safety data sheet')) return 'MSDS';\n  if (text.includes('fumigation') || text.includes('methyl bromide') || text.includes('heat treatment')) return 'FUMIGATION_CERTIFICATE';\n  if (text.includes('customs entry') || text.includes('import declaration') || text.includes('entry number')) return 'CUSTOMS_ENTRY';\n  return meta.document.declaredType?.toUpperCase().replace(/\\s+/g,'_') || 'UNKNOWN';\n})();\n\n// ── Field Extraction for Cross-Document Validation ──\nconst extractField = (patterns, src) => {\n  for (const p of patterns) {\n    const m = src.match(p);\n    if (m) return m[1]?.trim() || m[0]?.trim();\n  }\n  return null;\n};\n\nconst fullText = rawText.substring(0, 14000);\n\n// Extract key values that should be consistent across docs\nconst extractedFields = {\n  invoiceNumber: extractField([/invoice\\s*(?:no\\.?|number)[:\\s#]*([A-Z0-9\\-\\/]+)/i, /inv[\\s#.:]*([A-Z0-9\\-\\/]{4,20})/i], fullText),\n  declaredValue: extractField([/(?:total|invoice)\\s*(?:amount|value)[:\\s]*([\\d,]+\\.?\\d*)/i, /(?:USD|EUR|AUD|GBP|CNY)[\\s]*([\\d,]+\\.?\\d*)/i], fullText),\n  currency: extractField([/\\b(USD|EUR|AUD|GBP|CNY|JPY|SGD|HKD)\\b/i], fullText),\n  grossWeight: extractField([/gross\\s*weight[:\\s]*([\\d,]+\\.?\\d*\\s*(?:kg|lbs|mt)?)/i], fullText),\n  netWeight: extractField([/net\\s*weight[:\\s]*([\\d,]+\\.?\\d*\\s*(?:kg|lbs|mt)?)/i], fullText),\n  numberOfPackages: extractField([/(?:total\\s*)?(?:packages?|cartons?|boxes?|pieces?)[:\\s]*([\\d,]+)/i], fullText),\n  hsCode: extractField([/hs\\s*(?:code|tariff)[:\\s#]*([\\d\\.]{6,12})/i, /tariff\\s*(?:code|heading)[:\\s]*([\\d\\.]{6,12})/i], fullText),\n  originCountry: extractField([/country\\s*of\\s*origin[:\\s]*([A-Za-z ]+?)(?:\\n|,|$)/i], fullText),\n  shipperName: extractField([/shipper[:\\s]*([A-Z][A-Za-z\\s&.,]{3,50})/i], fullText),\n  consigneeName: extractField([/consignee[:\\s]*([A-Z][A-Za-z\\s&.,]{3,50})/i], fullText),\n  portOfLoading: extractField([/port\\s*of\\s*(?:loading|origin|departure)[:\\s]*([A-Za-z ,]+?)(?:\\n|$)/i], fullText),\n  portOfDischarge: extractField([/port\\s*of\\s*(?:discharge|destination|delivery)[:\\s]*([A-Za-z ,]+?)(?:\\n|$)/i], fullText),\n  incoterms: extractField([/\\b(EXW|FCA|FAS|FOB|CFR|CIF|CPT|CIP|DPU|DAP|DDP)\\b/i], fullText),\n  blNumber: extractField([/(?:b\\/l|bill\\s*of\\s*lading)\\s*(?:no\\.?|number)[:\\s#]*([A-Z0-9\\-\\/]+)/i], fullText)\n};\n\n// Expiry / validity check\nconst datePatterns = [\n  /valid\\s*(?:until|to|through)[:\\s]*([\\d]{1,2}[\\/-][\\d]{1,2}[\\/-][\\d]{2,4})/gi,\n  /expir(?:y|es|ed)[:\\s]*([\\d]{1,2}[\\/-][\\d]{1,2}[\\/-][\\d]{2,4})/gi\n];\nconst validityDates = [];\nfor (const p of datePatterns) {\n  const matches = rawText.matchAll(p);\n  for (const m of matches) validityDates.push(m[1]);\n}\n\nreturn {\n  json: {\n    shipment: meta.shipment,\n    document: {\n      ...meta.document,\n      detectedType,\n      extractedFields,\n      validityDates,\n      fullText: rawText.substring(0, 12000),\n      textLength: rawText.length,\n      extractionStatus: rawText === 'EXTRACTION_FAILED' ? 'FAILED' : 'SUCCESS'\n    }\n  }\n};"},"typeVersion":2},{"id":"7ad92b81-036c-4569-82a6-a40437034706","name":"Cross-Document Consistency Engine","type":"n8n-nodes-base.code","position":[2272,832],"parameters":{"jsCode":"const items = $input.all();\nif (!items.length) return [];\n\nconst shipment = items[0].json.shipment;\n\n// Group extracted fields by document\nconst docs = items.map(i => i.json);\n\n// Gather all field values across documents for comparison\nconst fieldMap = {};\nconst fieldKeys = ['declaredValue','currency','grossWeight','netWeight','numberOfPackages','hsCode','originCountry','shipperName','consigneeName','portOfLoading','portOfDischarge','incoterms'];\n\nfor (const key of fieldKeys) {\n  fieldMap[key] = docs\n    .filter(d => d.document.extractedFields?.[key])\n    .map(d => ({\n      docId: d.document.docId,\n      docName: d.document.name,\n      docType: d.document.detectedType,\n      value: d.document.extractedFields[key]\n    }));\n}\n\n// Detect mismatches — values found in 2+ docs that differ\nconst mismatches = [];\nconst normalise = v => (v || '').toString().toLowerCase().replace(/[,\\s]/g,'').trim();\n\nfor (const key of fieldKeys) {\n  const entries = fieldMap[key];\n  if (entries.length < 2) continue;\n  const uniqueVals = [...new Set(entries.map(e => normalise(e.value)))];\n  if (uniqueVals.length > 1) {\n    mismatches.push({\n      field: key,\n      severity: ['declaredValue','hsCode','currency'].includes(key) ? 'HIGH' : 'MEDIUM',\n      values: entries.map(e => `${e.docName}: ${e.value}`),\n      description: `Inconsistent \"${key}\" across documents`\n    });\n  }\n}\n\n// Check declared value vs shipment header\nconst invoiceDoc = docs.find(d => d.document.detectedType === 'COMMERCIAL_INVOICE');\nif (invoiceDoc && shipment.declaredValue > 0) {\n  const invoiceVal = parseFloat((invoiceDoc.document.extractedFields.declaredValue || '0').replace(/[,]/g,''));\n  if (invoiceVal > 0 && Math.abs(invoiceVal - shipment.declaredValue) / shipment.declaredValue > 0.05) {\n    mismatches.push({\n      field: 'declaredValueVsHeader',\n      severity: 'HIGH',\n      values: [`Shipment header: ${shipment.declaredValue} ${shipment.currency}`, `Invoice extracted: ${invoiceVal}`],\n      description: 'Invoice value differs from declared shipment value by more than 5%'\n    });\n  }\n}\n\n// Mandatory document checklist by destination\nconst MANDATORY_BY_DEST = {\n  AU: ['COMMERCIAL_INVOICE','PACKING_LIST','BILL_OF_LADING','CERTIFICATE_OF_ORIGIN'],\n  US: ['COMMERCIAL_INVOICE','PACKING_LIST','BILL_OF_LADING'],\n  EU: ['COMMERCIAL_INVOICE','PACKING_LIST','BILL_OF_LADING','CERTIFICATE_OF_ORIGIN'],\n  UK: ['COMMERCIAL_INVOICE','PACKING_LIST','BILL_OF_LADING'],\n  DEFAULT: ['COMMERCIAL_INVOICE','PACKING_LIST','BILL_OF_LADING']\n};\nconst required = MANDATORY_BY_DEST[shipment.destinationCountry] || MANDATORY_BY_DEST.DEFAULT;\nconst presentTypes = docs.map(d => d.document.detectedType);\nconst missingDocs = required.filter(r => !presentTypes.includes(r));\n\n// Return all items enriched with cross-check context\nreturn items.map(item => ({\n  json: {\n    ...item.json,\n    crossCheck: {\n      mismatches,\n      missingMandatoryDocs: missingDocs,\n      totalDocsInPackage: docs.length,\n      detectedDocTypes: presentTypes,\n      crossCheckRunAt: new Date().toISOString()\n    }\n  }\n}));"},"typeVersion":2},{"id":"5700dfeb-2b5d-4abc-986e-62cf28dc979c","name":"AI Customs Compliance Validator","type":"@n8n/n8n-nodes-langchain.agent","position":[2496,832],"parameters":{"text":"=You are a licensed customs broker and trade compliance specialist with 20+ years of experience in international trade law (WTO, Incoterms 2020, HS Convention, WCO standards). Conduct a rigorous customs compliance review of this shipping document.\n\n**Shipment Context:**\n- Shipment ID: {{ $json.shipment.shipmentId }}\n- Route: {{ $json.shipment.originCountry }} → {{ $json.shipment.destinationCountry }}\n- Transport Mode: {{ $json.shipment.transportMode }}\n- Incoterms: {{ $json.shipment.incoterms }}\n- Declared Value: {{ $json.shipment.declaredValue }} {{ $json.shipment.currency }}\n- Goods Description: {{ $json.shipment.goodsDescription }}\n\n**Document Under Review:**\n- Document ID: {{ $json.document.docId }}\n- Document Name: {{ $json.document.name }}\n- Declared Type: {{ $json.document.declaredType }}\n- AI Detected Type: {{ $json.document.detectedType }}\n- Extraction Status: {{ $json.document.extractionStatus }}\n\n**Extracted Fields:**\n{{ JSON.stringify($json.document.extractedFields, null, 2) }}\n\n**Validity Dates Found:** {{ JSON.stringify($json.document.validityDates) }}\n\n**Cross-Document Mismatches Detected:**\n{{ JSON.stringify($json.crossCheck.mismatches, null, 2) }}\n\n**Missing Mandatory Documents:**\n{{ JSON.stringify($json.crossCheck.missingMandatoryDocs, null, 2) }}\n\n**Full Document Text (first 12,000 chars):**\n{{ $json.document.fullText }}\n\n---\n\n**Validation Requirements by Document Type:**\n\nCOMMERCIAL_INVOICE: Exporter/importer full details (name, address, country), invoice number and date, HS code per line item, unit price and total value, currency, quantity and UOM, country of origin, incoterms, payment terms, goods description matching HS code, shipper/consignee match with B/L.\n\nPACKING_LIST: Marks and numbers, number of packages, description per package, net/gross weight per item and total, dimensions/volume, HS code, matches invoice quantities and descriptions.\n\nBILL_OF_LADING: Shipper and consignee full details, notify party, vessel name and voyage, port of loading and discharge, container numbers and seal numbers, cargo description, gross weight, freight terms (prepaid/collect), B/L number, issue date and place, signature.\n\nCERTIFICATE_OF_ORIGIN: Issuing authority (chamber of commerce or government), exporter name and country, consignee, description of goods, HS code, origin criteria (wholly obtained / substantial transformation), authorised signature and stamp, reference to trade agreement if preferential.\n\nDANGEROUS_GOODS_DECLARATION: UN number, proper shipping name, hazard class, packing group, net/gross quantity, emergency contact, IMDG/IATA compliance, shipper's declaration.\n\nPHYTOSANITARY_CERTIFICATE: Issuing authority, treatment details, botanical name (if applicable), validity date, destination country requirements.\n\n**Destination-Specific Rules:**\n- AU: DAFF biosecurity declaration required for organic/food items; WET, GST applicability; ABN of importer; AUSTRADE preferential rates check for ChAFTA (China), JAEPA (Japan), KAFTA (Korea)\n- US: ACE filing, ISF 10+2 for ocean freight, PGA requirements, HTSUS classification, ADD/CVD duty checks\n- EU: EORI number required, ICS2 for air freight, preferential origin documentation for trade agreements, REACH compliance for chemicals\n- UK: CHIEF/CDS commodity codes, UK Global Tariff, import VAT, Rules of Origin post-Brexit\n\n**Response Format (JSON only, no markdown):**\n{\n  \"docId\": \"{{ $json.document.docId }}\",\n  \"documentName\": \"{{ $json.document.name }}\",\n  \"confirmedType\": \"DOCUMENT_TYPE\",\n  \"complianceStatus\": \"CLEAR | HOLD | REJECT\",\n  \"riskLevel\": \"LOW | MEDIUM | HIGH | CRITICAL\",\n  \"confidenceScore\": 91,\n  \"isExpiredOrInvalid\": false,\n  \"expiryIssue\": null,\n  \"hsCodeFound\": \"8542.31\",\n  \"hsCodeValid\": true,\n  \"hsCodeSuggestion\": null,\n  \"restrictedGoodsFlag\": false,\n  \"sanctionRiskFlag\": false,\n  \"restrictedGoodsDetail\": null,\n  \"passedChecks\": [\"check description\"],\n  \"errors\": [\n    { \"field\": \"field name\", \"issue\": \"description\", \"severity\": \"CRITICAL|HIGH|MEDIUM|LOW\", \"fix\": \"how to correct\" }\n  ],\n  \"warnings\": [\"non-blocking cautions\"],\n  \"missingFields\": [\"required field not found\"],\n  \"crossDocumentIssues\": [\"issues flagged from cross-doc comparison\"],\n  \"dutyImplications\": \"brief note on duty rate impact if HS or origin issues found\",\n  \"documentSummary\": \"2-sentence plain-English compliance summary\",\n  \"requiresBrokerReview\": false,\n  \"canDispatch\": true\n}","options":{"systemMessage":"You are a customs compliance expert. Return JSON only — no markdown, no code blocks, no preamble. Be specific — cite field names, values, and regulation references. Every error must include a concrete fix instruction. Flag any potential duty undervaluation, tariff classification errors, or restricted goods as CRITICAL regardless of other factors."},"promptType":"define"},"typeVersion":1.6},{"id":"3e56910b-ebdd-4c74-b9d6-d6a57832a715","name":"Claude AI Model","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[2568,1056],"parameters":{"model":"=claude-sonnet-4-20250514","options":{"temperature":0.05}},"credentials":{"anthropicApi":{"id":"credential-id","name":"Anthropic account - test"}},"typeVersion":1},{"id":"fbb836a5-cd51-439a-81ff-5c1ed3eab09f","name":"Parse AI Compliance Results","type":"n8n-nodes-base.code","position":[2848,832],"parameters":{"mode":"runOnceForEachItem","jsCode":"const aiResp = $input.item.json;\nlet aiText = aiResp.response || aiResp.output || aiResp.text || '';\nif (aiResp.content && Array.isArray(aiResp.content)) aiText = aiResp.content[0]?.text || '';\n\nconst clean = aiText.replace(/```json\\s*/g,'').replace(/```\\s*/g,'').trim();\nlet validation;\ntry {\n  validation = JSON.parse(clean);\n} catch(e) {\n  const m = clean.match(/\\{[\\s\\S]*\\}/);\n  try { validation = m ? JSON.parse(m[0]) : null; } catch(e2) { validation = null; }\n  if (!validation) {\n    validation = {\n      docId: 'PARSE_ERROR', complianceStatus: 'HOLD', riskLevel: 'HIGH',\n      confidenceScore: 0, errors: [{ field: 'system', issue: 'AI response parse failed', severity: 'HIGH', fix: 'Retry or review manually' }],\n      passedChecks: [], warnings: [], missingFields: [], crossDocumentIssues: [],\n      documentSummary: 'Validation processing error — manual review required.',\n      requiresBrokerReview: true, canDispatch: false\n    };\n  }\n}\n\nconst up = $('Cross-Document Consistency Engine').item.json;\nreturn {\n  json: {\n    shipment: up.shipment,\n    document: up.document,\n    crossCheck: up.crossCheck,\n    validation,\n    validatedAt: new Date().toISOString()\n  }\n};"},"typeVersion":2},{"id":"74a857b2-8eaf-4e31-82fb-cb921139bfab","name":"Aggregate Shipment Validation Report","type":"n8n-nodes-base.code","position":[3072,832],"parameters":{"jsCode":"const items = $input.all();\nif (!items.length) return [{ json: { error: 'No results to aggregate' } }];\n\nconst shipment = items[0].json.shipment;\nconst crossCheck = items[0].json.crossCheck;\n\nconst docResults = items.map(i => ({\n  docId: i.json.document.docId,\n  name: i.json.document.name,\n  confirmedType: i.json.validation.confirmedType || i.json.document.detectedType,\n  complianceStatus: i.json.validation.complianceStatus,\n  riskLevel: i.json.validation.riskLevel,\n  isExpiredOrInvalid: i.json.validation.isExpiredOrInvalid,\n  hsCodeFound: i.json.validation.hsCodeFound,\n  hsCodeValid: i.json.validation.hsCodeValid,\n  hsCodeSuggestion: i.json.validation.hsCodeSuggestion,\n  restrictedGoodsFlag: i.json.validation.restrictedGoodsFlag,\n  sanctionRiskFlag: i.json.validation.sanctionRiskFlag,\n  errors: i.json.validation.errors || [],\n  warnings: i.json.validation.warnings || [],\n  missingFields: i.json.validation.missingFields || [],\n  passedChecks: i.json.validation.passedChecks || [],\n  dutyImplications: i.json.validation.dutyImplications,\n  documentSummary: i.json.validation.documentSummary,\n  requiresBrokerReview: i.json.validation.requiresBrokerReview,\n  canDispatch: i.json.validation.canDispatch\n}));\n\n// Overall shipment status\nconst hasReject = docResults.some(d => d.complianceStatus === 'REJECT');\nconst hasHold = docResults.some(d => d.complianceStatus === 'HOLD');\nconst hasCritical = docResults.some(d => d.riskLevel === 'CRITICAL');\nconst hasRestricted = docResults.some(d => d.restrictedGoodsFlag);\nconst hasSanction = docResults.some(d => d.sanctionRiskFlag);\nconst missingDocs = crossCheck.missingMandatoryDocs || [];\nconst crossMismatches = crossCheck.mismatches || [];\n\nconst overallStatus = (hasReject || hasCritical || hasRestricted || hasSanction || missingDocs.length > 0)\n  ? 'REJECT'\n  : hasHold\n    ? 'HOLD'\n    : 'CLEAR';\n\nconst totalErrors = docResults.reduce((s, d) => s + d.errors.length, 0);\nconst criticalErrors = docResults.reduce((s, d) => s + d.errors.filter(e => e.severity === 'CRITICAL').length, 0);\nconst highErrors = docResults.reduce((s, d) => s + d.errors.filter(e => e.severity === 'HIGH').length, 0);\n\n// Flat remediation list\nconst allFixes = [];\nif (missingDocs.length > 0) allFixes.push(`MISSING DOCS: Provide — ${missingDocs.join(', ')}`);\nfor (const m of crossMismatches) allFixes.push(`MISMATCH [${m.severity}]: ${m.description} — Values: ${m.values.join(' | ')}`);\nfor (const doc of docResults) {\n  for (const err of doc.errors) {\n    allFixes.push(`[${doc.name}] ${err.field}: ${err.issue} → FIX: ${err.fix}`);\n  }\n}\n\nreturn [{\n  json: {\n    shipment,\n    overallStatus,\n    summary: {\n      totalDocuments: docResults.length,\n      cleared: docResults.filter(d => d.complianceStatus === 'CLEAR').length,\n      held: docResults.filter(d => d.complianceStatus === 'HOLD').length,\n      rejected: docResults.filter(d => d.complianceStatus === 'REJECT').length,\n      expired: docResults.filter(d => d.isExpiredOrInvalid).length,\n      totalErrors, criticalErrors, highErrors,\n      crossDocMismatches: crossMismatches.length,\n      missingMandatoryDocs: missingDocs.length,\n      restrictedGoodsFlag: hasRestricted,\n      sanctionRiskFlag: hasSanction\n    },\n    missingMandatoryDocs: missingDocs,\n    crossDocumentMismatches: crossMismatches,\n    documentResults: docResults,\n    allRemediationSteps: allFixes,\n    requiresBrokerReview: docResults.some(d => d.requiresBrokerReview) || hasCritical || hasRestricted,\n    canDispatch: overallStatus === 'CLEAR',\n    aggregatedAt: new Date().toISOString()\n  }\n}];"},"typeVersion":2},{"id":"be953067-b361-4d44-bb36-1866b81e2f33","name":"Route by Shipment Risk Level","type":"n8n-nodes-base.switch","position":[3296,800],"parameters":{"mode":"expression","output":"={{ $json.overallStatus }}"},"typeVersion":3.1},{"id":"38a2f2cd-13f3-4dfe-a33f-4905442857ae","name":"Alert Logistics Team on Slack","type":"n8n-nodes-base.httpRequest","position":[3520,448],"parameters":{"url":"https://slack.com/api/chat.postMessage","method":"POST","options":{"timeout":10000},"jsonBody":"={\n  \"channel\": \"{{ $json.overallStatus === 'REJECT' ? '#customs-critical' : '#customs-review' }}\",\n  \"text\": \"🚢 Customs Check: {{ $json.overallStatus }} — {{ $json.shipment.shipmentId }}\",\n  \"blocks\": [\n    { \"type\": \"header\", \"text\": { \"type\": \"plain_text\", \"text\": \"{{ $json.overallStatus === 'REJECT' ? '🔴 REJECT' : $json.overallStatus === 'HOLD' ? '🟡 HOLD' : '🟢 CLEAR' }} — Shipment {{ $json.shipment.shipmentId }}\" } },\n    {\n      \"type\": \"section\",\n      \"fields\": [\n        { \"type\": \"mrkdwn\", \"text\": \"*Route:*\\n{{ $json.shipment.originCountry }} → {{ $json.shipment.destinationCountry }}\" },\n        { \"type\": \"mrkdwn\", \"text\": \"*Goods:*\\n{{ $json.shipment.goodsDescription }}\" },\n        { \"type\": \"mrkdwn\", \"text\": \"*Declared Value:*\\n{{ $json.shipment.currency }} {{ $json.shipment.declaredValue.toLocaleString() }}\" },\n        { \"type\": \"mrkdwn\", \"text\": \"*Incoterms:*\\n{{ $json.shipment.incoterms }}\" },\n        { \"type\": \"mrkdwn\", \"text\": \"*Total Errors:*\\n{{ $json.summary.totalErrors }} ({{ $json.summary.criticalErrors }} critical)\" },\n        { \"type\": \"mrkdwn\", \"text\": \"*Missing Docs:*\\n{{ $json.missingMandatoryDocs.length > 0 ? $json.missingMandatoryDocs.join(', ') : 'None' }}\" }\n      ]\n    },\n    {{ $json.summary.restrictedGoodsFlag || $json.summary.sanctionRiskFlag ? JSON.stringify({ type: 'section', text: { type: 'mrkdwn', text: '⚠️ *COMPLIANCE ALERT:* ' + ($json.summary.restrictedGoodsFlag ? 'Restricted goods detected. ' : '') + ($json.summary.sanctionRiskFlag ? 'Sanction risk flag raised.' : '') } }) + ',' : '' }}\n    {\n      \"type\": \"section\",\n      \"text\": { \"type\": \"mrkdwn\", \"text\": \"*Top Fixes Required:*\\n{{ $json.allRemediationSteps.slice(0,3).map((s,i) => (i+1)+'. '+s).join('\\\\n') || 'No issues found' }}\" }\n    },\n    { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"*Broker Review Required:* {{ $json.requiresBrokerReview ? '🔴 Yes — assign immediately' : '🟢 No' }}\" } }\n  ]\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"predefinedCredentialType","nodeCredentialType":"slackApi"},"credentials":{"slackApi":{"id":"credential-id","name":"Slack account - test "}},"typeVersion":4.2,"continueOnFail":true},{"id":"e4a458e2-6d10-4bb8-bc45-20b2c1231d60","name":"Email Validation Report to Exporter","type":"n8n-nodes-base.emailSend","position":[3520,640],"webhookId":"337ea53a-cf9b-4cf8-8323-b832cc856542","parameters":{"html":"=<html><body style=\"font-family:Arial,sans-serif;max-width:700px;margin:0 auto;padding:24px;color:#222;background:#f5f5f5;\">\n<div style=\"background:linear-gradient(135deg,#0f3460 0%,#16213e 100%);padding:28px;border-radius:10px 10px 0 0;\">\n  <h1 style=\"color:white;margin:0;font-size:1.4em;\">🚢 Customs Document Pre-Check Report</h1>\n  <p style=\"color:#aaa;margin:8px 0 0;\">{{ $json.shipment.shipmentId }} &bull; {{ new Date($json.aggregatedAt).toLocaleString('en-AU') }}</p>\n</div>\n<div style=\"background:white;padding:24px;border:1px solid #ddd;\">\n  <table style=\"width:100%;border-collapse:collapse;margin-bottom:16px;\">\n    <tr><td style=\"padding:6px;color:#555;\"><strong>Route</strong></td><td style=\"padding:6px;\">{{ $json.shipment.originCountry }} → {{ $json.shipment.destinationCountry }}</td><td style=\"padding:6px;color:#555;\"><strong>Mode</strong></td><td style=\"padding:6px;\">{{ $json.shipment.transportMode }}</td></tr>\n    <tr style=\"background:#f9f9f9;\"><td style=\"padding:6px;color:#555;\"><strong>Goods</strong></td><td style=\"padding:6px;\" colspan=\"3\">{{ $json.shipment.goodsDescription }}</td></tr>\n    <tr><td style=\"padding:6px;color:#555;\"><strong>Value</strong></td><td style=\"padding:6px;\">{{ $json.shipment.currency }} {{ $json.shipment.declaredValue.toLocaleString() }}</td><td style=\"padding:6px;color:#555;\"><strong>Incoterms</strong></td><td style=\"padding:6px;\">{{ $json.shipment.incoterms }}</td></tr>\n  </table>\n  <div style=\"background:{{ $json.overallStatus === 'CLEAR' ? '#d4edda' : $json.overallStatus === 'REJECT' ? '#f8d7da' : '#fff3cd' }};border:2px solid {{ $json.overallStatus === 'CLEAR' ? '#28a745' : $json.overallStatus === 'REJECT' ? '#e94560' : '#ffc107' }};border-radius:8px;padding:16px;margin:16px 0;\">\n    <h2 style=\"margin:0;color:{{ $json.overallStatus === 'CLEAR' ? '#155724' : $json.overallStatus === 'REJECT' ? '#721c24' : '#856404' }};\">{{ $json.overallStatus === 'CLEAR' ? '✅ CLEAR — Ready for dispatch' : $json.overallStatus === 'REJECT' ? '🔴 REJECT — Do not dispatch' : '🟡 HOLD — Corrections required' }}</h2>\n    <p style=\"margin:6px 0 0;color:#555;\">{{ $json.summary.totalDocuments }} docs reviewed &bull; {{ $json.summary.totalErrors }} errors &bull; {{ $json.summary.criticalErrors }} critical &bull; {{ $json.summary.crossDocMismatches }} cross-doc mismatches</p>\n  </div>\n  {{ $json.missingMandatoryDocs.length > 0 ? '<div style=\"background:#f8d7da;border:1px solid #f5c6cb;border-radius:6px;padding:14px;margin:12px 0;\"><strong style=\"color:#721c24;\">⛔ Missing Mandatory Documents:</strong><ul>' + $json.missingMandatoryDocs.map(d => '<li>' + d.replace(/_/g,' ') + '</li>').join('') + '</ul></div>' : '' }}\n  {{ $json.crossDocumentMismatches.length > 0 ? '<div style=\"background:#fff3cd;border:1px solid #ffc107;border-radius:6px;padding:14px;margin:12px 0;\"><strong>⚠️ Cross-Document Mismatches:</strong><ul>' + $json.crossDocumentMismatches.map(m => '<li><strong>' + m.field + '</strong> — ' + m.values.join(' | ') + '</li>').join('') + '</ul></div>' : '' }}\n  <h3 style=\"color:#0f3460;border-bottom:2px solid #e94560;padding-bottom:6px;\">Document Results</h3>\n  {{ $json.documentResults.map(doc => '<div style=\"border:1px solid #ddd;border-left:5px solid ' + (doc.complianceStatus === 'CLEAR' ? '#28a745' : doc.riskLevel === 'CRITICAL' ? '#e94560' : '#ffa500') + ';border-radius:4px;padding:12px;margin:10px 0;\"><strong>' + doc.name + '</strong> &nbsp;<span style=\"background:' + (doc.complianceStatus === 'CLEAR' ? '#28a745' : doc.complianceStatus === 'REJECT' ? '#e94560' : '#ffa500') + ';color:white;padding:2px 8px;border-radius:3px;font-size:0.8em;\">' + doc.complianceStatus + '</span>' + (doc.hsCodeFound ? ' &nbsp;<span style=\"background:#17a2b8;color:white;padding:2px 8px;border-radius:3px;font-size:0.8em;\">HS: ' + doc.hsCodeFound + (doc.hsCodeValid ? ' ✓' : ' ✗') + '</span>' : '') + '<p style=\"margin:6px 0;font-size:0.9em;color:#555;\">' + doc.documentSummary + '</p>' + (doc.errors.length > 0 ? '<ul style=\"margin:4px 0;\">' + doc.errors.map(e => '<li><strong>[' + e.severity + ']</strong> ' + e.field + ': ' + e.issue + ' → ' + e.fix + '</li>').join('') + '</ul>' : '') + '</div>').join('') }}\n  {{ $json.allRemediationSteps.length > 0 ? '<h3>Required Corrections</h3><ol>' + $json.allRemediationSteps.map(s => '<li style=\"margin:6px 0;\">' + s + '</li>').join('') + '</ol>' : '' }}\n  <p style=\"font-size:0.8em;color:#999;margin-top:20px;\">This is an automated pre-check. It does not guarantee customs clearance. Consult a licensed customs broker for final advice.</p>\n</div>\n<div style=\"background:#0f3460;padding:14px 24px;border-radius:0 0 10px 10px;text-align:center;\">\n  <p style=\"color:#aaa;font-size:0.8em;margin:0;\">AI Customs Clearance Document Checker</p>\n</div>\n</body></html>","options":{"appendAttribution":false},"subject":"={{ '🚢 Customs Pre-Check: ' + $json.overallStatus + ' — Shipment ' + $json.shipment.shipmentId + ' (' + $json.shipment.originCountry + '→' + $json.shipment.destinationCountry + ')' }}","toEmail":"={{ $json.shipment.exporterEmail }}","fromEmail":"="},"credentials":{"smtp":{"id":"credential-id","name":"SMTP -test"}},"typeVersion":2.1,"continueOnFail":true},{"id":"b9d2b6ab-a224-4652-b11c-9cc51e6763b5","name":"Create Jira Compliance Issue","type":"n8n-nodes-base.httpRequest","position":[3520,1024],"parameters":{"url":"https://YOUR_JIRA_DOMAIN.atlassian.net/rest/api/3/issue","method":"POST","options":{"timeout":15000},"jsonBody":"={\n  \"fields\": {\n    \"project\": { \"key\": \"CUSTOMS\" },\n    \"issuetype\": { \"name\": \"Compliance Issue\" },\n    \"summary\": \"[{{ $json.overallStatus }}] Customs Doc Errors — {{ $json.shipment.shipmentId }} ({{ $json.shipment.originCountry }}→{{ $json.shipment.destinationCountry }})\",\n    \"priority\": { \"name\": \"{{ $json.overallStatus === 'REJECT' ? 'Highest' : 'High' }}\" },\n    \"description\": {\n      \"type\": \"doc\", \"version\": 1,\n      \"content\": [\n        { \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Shipment: {{ $json.shipment.shipmentId }} | Route: {{ $json.shipment.originCountry }} → {{ $json.shipment.destinationCountry }}\" }] },\n        { \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Goods: {{ $json.shipment.goodsDescription }} | Value: {{ $json.shipment.currency }} {{ $json.shipment.declaredValue }}\" }] },\n        { \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Total Errors: {{ $json.summary.totalErrors }} | Critical: {{ $json.summary.criticalErrors }} | Missing Docs: {{ $json.summary.missingMandatoryDocs }}\" }] },\n        { \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Restricted Goods: {{ $json.summary.restrictedGoodsFlag }} | Sanction Risk: {{ $json.summary.sanctionRiskFlag }}\" }] },\n        { \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Top Fix: {{ $json.allRemediationSteps[0] || 'See full report' }}\" }] }\n      ]\n    },\n    \"labels\": [\"customs-compliance\", \"{{ $json.overallStatus.toLowerCase() }}\", \"{{ $json.shipment.destinationCountry.toLowerCase() }}\"]\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"predefinedCredentialType","nodeCredentialType":"jiraSoftwareCloudApi"},"credentials":{"jiraSoftwareCloudApi":{"id":"credential-id","name":"Jira SW Cloud account"}},"typeVersion":4.2,"continueOnFail":true},{"id":"0065a13e-4562-435d-b6d1-9704632d9d3b","name":"Update Shipment Tracker in Sheets","type":"n8n-nodes-base.googleSheets","position":[3520,832],"parameters":{"columns":{"value":{},"schema":[],"mappingMode":"autoMapInputData","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":true},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"id","value":"=YOUR_SHEET_TAB_ID"},"documentId":{"__rl":true,"mode":"id","value":"=YOUR_GOOGLE_SHEET_ID"},"authentication":"serviceAccount"},"credentials":{"googleApi":{"id":"credential-id","name":"Google Sheets- test"}},"typeVersion":4.5,"continueOnFail":true},{"id":"8944915f-61f3-4c2c-82ec-4cb815d4d9f2","name":"Build Final Compliance Response","type":"n8n-nodes-base.code","position":[3744,736],"parameters":{"mode":"runOnceForEachItem","jsCode":"const d = $input.item.json;\nreturn {\n  json: {\n    success: true,\n    shipmentId: d.shipment.shipmentId,\n    route: `${d.shipment.originCountry} → ${d.shipment.destinationCountry}`,\n    overallStatus: d.overallStatus,\n    canDispatch: d.canDispatch,\n    requiresBrokerReview: d.requiresBrokerReview,\n    summary: d.summary,\n    missingMandatoryDocs: d.missingMandatoryDocs,\n    crossDocumentMismatches: d.crossDocumentMismatches,\n    documentResults: d.documentResults.map(doc => ({\n      docId: doc.docId,\n      name: doc.name,\n      type: doc.confirmedType,\n      status: doc.complianceStatus,\n      riskLevel: doc.riskLevel,\n      hsCode: doc.hsCodeFound,\n      hsCodeValid: doc.hsCodeValid,\n      errors: doc.errors,\n      warnings: doc.warnings,\n      summary: doc.documentSummary\n    })),\n    allRemediationSteps: d.allRemediationSteps,\n    processedAt: d.aggregatedAt\n  }\n};"},"typeVersion":2},{"id":"0d7ef775-c36e-4aa3-8c76-127b1c5f05ca","name":"Return Compliance Result to Caller","type":"n8n-nodes-base.respondToWebhook","position":[3968,736],"parameters":{"options":{"responseHeaders":{"entries":[{"name":"Content-Type","value":"application/json"}]}},"respondWith":"json","responseBody":"={{ JSON.stringify($json, null, 2) }}"},"typeVersion":1},{"id":"9a615d6e-409c-453e-8416-b83e87d54c1d","name":"Mark Shipment Cleared for Dispatch","type":"n8n-nodes-base.set","position":[3520,1216],"parameters":{"options":{},"assignments":{"assignments":[{"id":"s1","name":"status","type":"string","value":"CLEARED_FOR_DISPATCH"},{"id":"s2","name":"shipmentId","type":"string","value":"={{ $json.shipment.shipmentId }}"},{"id":"s3","name":"route","type":"string","value":"={{ $json.shipment.originCountry + ' → ' + $json.shipment.destinationCountry }}"},{"id":"s4","name":"message","type":"string","value":"All documents passed customs compliance checks. Shipment cleared for dispatch."},{"id":"s5","name":"clearedAt","type":"string","value":"={{ new Date().toISOString() }}"}]}},"typeVersion":3.4}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"46d65c68-b9cb-481d-9f16-d766aa468e55","connections":{"Claude AI Model":{"ai_languageModel":[[{"node":"AI Customs Compliance Validator","type":"ai_languageModel","index":0}]]},"Register Shipment Case":{"main":[[{"node":"Fetch Document from Drive","type":"main","index":0}]]},"Fetch Document from Drive":{"main":[[{"node":"Extract Text from Document","type":"main","index":0}]]},"Extract Text from Document":{"main":[[{"node":"Classify Type & Extract Key Fields","type":"main","index":0}]]},"Receive Shipment Documents":{"main":[[{"node":"Register Shipment Case","type":"main","index":0}]]},"Watch Shipment Docs Folder":{"main":[[{"node":"Register Shipment Case","type":"main","index":0}]]},"Parse AI Compliance Results":{"main":[[{"node":"Aggregate Shipment Validation Report","type":"main","index":0}]]},"Create Jira Compliance Issue":{"main":[[{"node":"Build Final Compliance Response","type":"main","index":0}]]},"Route by Shipment Risk Level":{"main":[[{"node":"Email Validation Report to Exporter","type":"main","index":0},{"node":"Update Shipment Tracker in Sheets","type":"main","index":0},{"node":"Mark Shipment Cleared for Dispatch","type":"main","index":0}],[{"node":"Alert Logistics Team on Slack","type":"main","index":0},{"node":"Email Validation Report to Exporter","type":"main","index":0},{"node":"Create Jira Compliance Issue","type":"main","index":0},{"node":"Update Shipment Tracker in Sheets","type":"main","index":0}],[{"node":"Alert Logistics Team on Slack","type":"main","index":0},{"node":"Email Validation Report to Exporter","type":"main","index":0},{"node":"Create Jira Compliance Issue","type":"main","index":0},{"node":"Update Shipment Tracker in Sheets","type":"main","index":0}]]},"Alert Logistics Team on Slack":{"main":[[{"node":"Build Final Compliance Response","type":"main","index":0}]]},"AI Customs Compliance Validator":{"main":[[{"node":"Parse AI Compliance Results","type":"main","index":0}]]},"Build Final Compliance Response":{"main":[[{"node":"Return Compliance Result to Caller","type":"main","index":0}]]},"Cross-Document Consistency Engine":{"main":[[{"node":"AI Customs Compliance Validator","type":"main","index":0}]]},"Update Shipment Tracker in Sheets":{"main":[[{"node":"Build Final Compliance Response","type":"main","index":0}]]},"Classify Type & Extract Key Fields":{"main":[[{"node":"Cross-Document Consistency Engine","type":"main","index":0}]]},"Email Validation Report to Exporter":{"main":[[{"node":"Build Final Compliance Response","type":"main","index":0}]]},"Aggregate Shipment Validation Report":{"main":[[{"node":"Route by Shipment Risk Level","type":"main","index":0}]]}}},"lastUpdatedBy":1,"workflowInfo":{"nodeCount":24,"nodeTypes":{"n8n-nodes-base.set":{"count":1},"n8n-nodes-base.code":{"count":6},"n8n-nodes-base.switch":{"count":1},"n8n-nodes-base.webhook":{"count":1},"n8n-nodes-base.emailSend":{"count":1},"n8n-nodes-base.stickyNote":{"count":5},"n8n-nodes-base.googleDrive":{"count":1},"n8n-nodes-base.httpRequest":{"count":2},"n8n-nodes-base.googleSheets":{"count":1},"@n8n/n8n-nodes-langchain.agent":{"count":1},"n8n-nodes-base.extractFromFile":{"count":1},"n8n-nodes-base.respondToWebhook":{"count":1},"n8n-nodes-base.googleDriveTrigger":{"count":1},"@n8n/n8n-nodes-langchain.lmChatAnthropic":{"count":1}}},"status":"published","readyToDemo":null,"user":{"name":"Oneclick AI Squad","username":"oneclick-ai","bio":"The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations  from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.","verified":true,"links":["https://www.oneclickitsolution.com/"],"avatar":"https://gravatar.com/avatar/848fca91367142f65f9e5c55d64e5c9952b160d7b060d103b52aa343c6bc7b3d?r=pg&d=retro&size=200"},"nodes":[{"id":11,"icon":"fa:envelope","name":"n8n-nodes-base.emailSend","codex":{"data":{"alias":["SMTP","email","human","form","wait","hitl","approval"],"resources":{"generic":[{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/build-your-own-virtual-assistant-with-n8n-a-step-by-step-guide/","icon":"👦","label":"Build your own virtual assistant with n8n: A step by step guide"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.sendemail/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/sendemail/"}]},"categories":["Communication","HITL","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"HITL":["Human in the Loop"]}}},"group":"[\"output\"]","defaults":{"name":"Send Email","color":"#00bb88"},"iconData":{"icon":"envelope","type":"icon"},"displayName":"Send Email","typeVersion":2,"nodeCategories":[{"id":6,"name":"Communication"},{"id":9,"name":"Core Nodes"},{"id":28,"name":"HITL"}]},{"id":18,"icon":"file:googleSheets.svg","name":"n8n-nodes-base.googleSheets","codex":{"data":{"alias":["CSV","Sheet","Spreadsheet","GS"],"resources":{"generic":[{"url":"https://n8n.io/blog/love-at-first-sight-ricardos-n8n-journey/","icon":"❤️","label":"Love at first sight: Ricardo’s n8n journey"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/creating-triggers-for-n8n-workflows-using-polling/","icon":"⏲","label":"Creating triggers for n8n workflows using polling"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n/","icon":"📈","label":"Migrating Community Metrics to Orbit using n8n"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/your-business-doesnt-need-you-to-operate/","icon":" 🖥️","label":"Hey founders! Your business doesn't need you to operate"},{"url":"https://n8n.io/blog/how-honest-burgers-use-automation-to-save-100k-per-year/","icon":"🍔","label":"How Honest Burgers Use Automation to Save $100k per year"},{"url":"https://n8n.io/blog/how-a-digital-strategist-uses-n8n-for-online-marketing/","icon":"💻","label":"How a digital strategist uses n8n for online marketing"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/","icon":"📈","label":"How a Membership Development Manager automates his work and investments"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Data & Storage","Productivity"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"input\",\"output\"]","defaults":{"name":"Google Sheets"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGZpbGw9IiMyOEI0NDYiIGQ9Ik0zNS42OSAxIDUyIDE3LjIyNXYzOS4wODdhMy42NyAzLjY3IDAgMCAxLTEuMDg0IDIuNjFBMy43IDMuNyAwI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gMCAxIDggNTUuMzEyVjMuNjg4YTMuNjcgMy42NyAwIDAgMSAxLjA4NC0yLjYxQTMuNyAzLjcgMCAwIDEgMTEuNzA3IDB6Ii8+PHBhdGggZmlsbD0iIzZBQ0U3QyIgZD0iTTM0LjY5IDAgNTEgMTYuMjI1SDM4LjM5N2MtMi4wNTQgMC0zLjcwNy0xLjgyOS0zLjcwNy0zLjg3MnoiLz48cGF0aCBmaWxsPSIjMjE5QjM4IiBkPSJNMzguMjExIDE2LjIyNSA1MSAyMS40OHYtNS4yNTV6Ii8+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTE5LjEyIDMwLjk3NWMwLS44MTcuNjYyLTEuNDc1IDEuNDgzLTEuNDc1aDE3Ljc5NGMuODIxIDAgMS40ODIuNjU4IDEuNDgyIDEuNDc1djE1LjQ4N2MwIC44MTgtLjY2MSAxLjQ3NS0xLjQ4MiAxLjQ3NUgyMC42MDNhMS40NzYgMS40NzYgMCAwIDEtMS40ODItMS40NzRWMzAuOTc0em0yLjIyNSAxLjQ3NWg2LjY3MnYyLjIxMmgtNi42NzJ6bTAgNS4xNjJoNi42NzJ2Mi4yMTNoLTYuNjcyem0wIDUuMTYzaDYuNjcydjIuMjEyaC02LjY3MnptOS42MzgtMTAuMzI1aDYuNjcydjIuMjEyaC02LjY3MnptMCA1LjE2Mmg2LjY3MnYyLjIxM2gtNi42NzJ6bTAgNS4xNjNoNi42NzJ2Mi4yMTJoLTYuNjcyeiIvPjwvZz48L3N2Zz4="},"displayName":"Google Sheets","typeVersion":5,"nodeCategories":[{"id":3,"name":"Data & Storage"},{"id":4,"name":"Productivity"}]},{"id":19,"icon":"file:httprequest.svg","name":"n8n-nodes-base.httpRequest","codex":{"data":{"alias":["API","Request","URL","Build","cURL"],"resources":{"generic":[{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/automatically-pulling-and-visualizing-data-with-n8n/","icon":"📈","label":"Automatically pulling and visualizing data with n8n"},{"url":"https://n8n.io/blog/learn-how-to-automatically-cross-post-your-content-with-n8n/","icon":"✍️","label":"Learn how to automatically cross-post your content with n8n"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/running-n8n-on-ships-an-interview-with-maranics/","icon":"🛳","label":"Running n8n on ships: An interview with Maranics"},{"url":"https://n8n.io/blog/what-are-apis-how-to-use-them-with-no-code/","icon":" 🪢","label":"What are APIs and how to use them with no code"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/world-poetry-day-workflow/","icon":"📜","label":"Celebrating World Poetry Day with a daily poem in Telegram"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/automate-designs-with-bannerbear-and-n8n/","icon":"🎨","label":"Automate Designs with Bannerbear and n8n"},{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/building-an-expense-tracking-app-in-10-minutes/","icon":"📱","label":"Building an expense tracking app in 10 minutes"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/how-to-use-the-http-request-node-the-swiss-army-knife-for-workflow-automation/","icon":"🧰","label":"How to use the HTTP Request Node - The Swiss Army Knife for Workflow Automation"},{"url":"https://n8n.io/blog/learn-how-to-use-webhooks-with-mattermost-slash-commands/","icon":"🦄","label":"Learn how to use webhooks with Mattermost slash commands"},{"url":"https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/","icon":"📈","label":"How a Membership Development Manager automates his work and investments"},{"url":"https://n8n.io/blog/a-low-code-bitcoin-ticker-built-with-questdb-and-n8n-io/","icon":"📈","label":"A low-code bitcoin ticker built with QuestDB and n8n.io"},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/automations-for-activists/","icon":"✨","label":"How Common Knowledge use workflow automation for activism"},{"url":"https://n8n.io/blog/creating-scheduled-text-affirmations-with-n8n/","icon":"🤟","label":"Creating scheduled text affirmations with n8n"},{"url":"https://n8n.io/blog/how-goomer-automated-their-operations-with-over-200-n8n-workflows/","icon":"🛵","label":"How Goomer automated their operations with over 200 n8n workflows"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"output\"]","defaults":{"name":"HTTP Request","color":"#0004F5"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00MCAyMEM0MCA4Ljk1MzE0IDMxLjA0NjkgMCAyMCAwQzguOTUzMTQgMCAwIDguOTUzMTQgMCAyMEMwIDMxL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kU5Ii8+Cjwvc3ZnPgo="},"displayName":"HTTP Request","typeVersion":4,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":38,"icon":"fa:pen","name":"n8n-nodes-base.set","codex":{"data":{"alias":["Set","JS","JSON","Filter","Transform","Map"],"resources":{"generic":[{"url":"https://n8n.io/blog/learn-to-automate-your-factorys-incident-reporting-a-step-by-step-guide/","icon":"🏭","label":"Learn to Automate Your Factory's Incident Reporting: A Step by Step Guide"},{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/automatically-pulling-and-visualizing-data-with-n8n/","icon":"📈","label":"Automatically pulling and visualizing data with n8n"},{"url":"https://n8n.io/blog/database-monitoring-and-alerting-with-n8n/","icon":"📡","label":"Database Monitoring and Alerting with n8n"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/","icon":"🔗","label":"How to build a low-code, self-hosted URL shortener in 3 steps"},{"url":"https://n8n.io/blog/automate-your-data-processing-pipeline-in-9-steps-with-n8n/","icon":"⚙️","label":"Automate your data processing pipeline in 9 steps"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/building-an-expense-tracking-app-in-10-minutes/","icon":"📱","label":"Building an expense tracking app in 10 minutes"},{"url":"https://n8n.io/blog/the-ultimate-guide-to-automate-your-video-collaboration-with-whereby-mattermost-and-n8n/","icon":"📹","label":"The ultimate guide to automate your video collaboration with Whereby, Mattermost, and n8n"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/learn-to-build-powerful-api-endpoints-using-webhooks/","icon":"🧰","label":"Learn to Build Powerful API Endpoints Using Webhooks"},{"url":"https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/","icon":"📈","label":"How a Membership Development Manager automates his work and investments"},{"url":"https://n8n.io/blog/a-low-code-bitcoin-ticker-built-with-questdb-and-n8n-io/","icon":"📈","label":"A low-code bitcoin ticker built with QuestDB and n8n.io"},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/","icon":"🎖","label":"Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"},{"url":"https://n8n.io/blog/how-goomer-automated-their-operations-with-over-200-n8n-workflows/","icon":"🛵","label":"How Goomer automated their operations with over 200 n8n workflows"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.set/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Data Transformation"]}}},"group":"[\"input\"]","defaults":{"name":"Edit Fields"},"iconData":{"icon":"pen","type":"icon"},"displayName":"Edit Fields (Set)","typeVersion":3,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":47,"icon":"file:webhook.svg","name":"n8n-nodes-base.webhook","codex":{"data":{"alias":["HTTP","API","Build","WH"],"resources":{"generic":[{"url":"https://n8n.io/blog/learn-how-to-automatically-cross-post-your-content-with-n8n/","icon":"✍️","label":"Learn how to automatically cross-post your content with n8n"},{"url":"https://n8n.io/blog/running-n8n-on-ships-an-interview-with-maranics/","icon":"🛳","label":"Running n8n on ships: An interview with Maranics"},{"url":"https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/","icon":"🔗","label":"How to build a low-code, self-hosted URL shortener in 3 steps"},{"url":"https://n8n.io/blog/what-are-apis-how-to-use-them-with-no-code/","icon":" 🪢","label":"What are APIs and how to use them with no code"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/how-a-digital-strategist-uses-n8n-for-online-marketing/","icon":"💻","label":"How a digital strategist uses n8n for online marketing"},{"url":"https://n8n.io/blog/the-ultimate-guide-to-automate-your-video-collaboration-with-whereby-mattermost-and-n8n/","icon":"📹","label":"The ultimate guide to automate your video collaboration with Whereby, Mattermost, and n8n"},{"url":"https://n8n.io/blog/how-to-automatically-give-kudos-to-contributors-with-github-slack-and-n8n/","icon":"👏","label":"How to automatically give kudos to contributors with GitHub, Slack, and n8n"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/creating-custom-incident-response-workflows-with-n8n/","label":"How to automate every step of an incident response workflow"},{"url":"https://n8n.io/blog/learn-to-build-powerful-api-endpoints-using-webhooks/","icon":"🧰","label":"Learn to Build Powerful API Endpoints Using Webhooks"},{"url":"https://n8n.io/blog/learn-how-to-use-webhooks-with-mattermost-slash-commands/","icon":"🦄","label":"Learn how to use webhooks with Mattermost slash commands"},{"url":"https://n8n.io/blog/how-goomer-automated-their-operations-with-over-200-n8n-workflows/","icon":"🛵","label":"How Goomer automated their operations with over 200 n8n workflows"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"trigger\"]","defaults":{"name":"Webhook"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCI+PHBhdGggZmlsbD0iIzM3NDc0ZiIgZD0iTTM1IDM3Yy0yLjIgMC00LTEuOC00LTRzMS44LTQgNC00IDQgMS44IDQgNC0xLjggNC00IDQiLz48cGF0aCBmaWxsPSIjMzc0NzRmIiBkPSJNMzUgNDNjLTMgMC01LjktMS40LTcuOC0zLjdsMy4xLTIuNWMxLjEgMS40IDIuOSAyLjMgNC43IDIuMyAzLjMgMCA2LTIuNyA2LTZzLTIuNy02LTYtNmMtMSAwLTIgLjMtMi45LjdsLTEuNyAxTDIzLjMgMTZsMy41LTEuOSA1LjMgOS40YzEtLjMgMi0uNSAzLS41IDUuNSAwIDEwIDQuNSAxMCAxMFM0MC41IDQzIDM1IDQzIi8+PHBhdGggZmlsbD0iIzM3NDc0ZiIgZD0iTTE0IDQzQzguNSA0MyA0IDM4LjUgNCAzM2MwLTQuNiAzLjEtOC41IDcuNS05LjdsMSAzLjlDOS45IDI3LjkgOCAzMC4zIDggMzNjMCAzLjMgMi43IDYgNiA2czYtMi43IDYtNnYtMmgxNXY0SDIzLjhjLS45IDQuNi01IDgtOS44IDgiLz48cGF0aCBmaWxsPSIjZTkxZTYzIiBkPSJNMTQgMzdjLTIuMiAwLTQtMS44LTQtNHMxLjgtNCA0LTQgNCAxLjggNCA0LTEuOCA0LTQgNCIvPjxwYXRoIGZpbGw9IiMzNzQ3NGYiIGQ9Ik0yNSAxOWMtMi4yIDAtNC0xLjgtNC00czEuOC00IDQtNCA0IDEuOCA0IDQtMS44IDQtNCA0Ii8+PHBhdGggZmlsbD0iI2U5MWU2MyIgZD0ibTE1LjcgMzQtMy40LTIgNS45LTkuN2MtMi0xLjktMy4yLTQuNS0zLjItNy4zIDAtNS41IDQuNS0xMCAxMC0xMHMxMCA0LjUgMTAgMTBjMCAuOS0uMSAxLjctLjMgMi41bC0zLjktMWMuMS0uNS4yLTEgLjItMS41IDAtMy4zLTIuNy02LTYtNnMtNiAyLjctNiA2YzAgMi4xIDEuMSA0IDIuOSA1LjFsMS43IDF6Ii8+PC9zdmc+"},"displayName":"Webhook","typeVersion":2,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":58,"icon":"file:googleDrive.svg","name":"n8n-nodes-base.googleDrive","codex":{"data":{"resources":{"generic":[{"url":"https://n8n.io/blog/your-business-doesnt-need-you-to-operate/","icon":" 🖥️","label":"Hey founders! Your business doesn't need you to operate"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Data & Storage"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"input\"]","defaults":{"name":"Google Drive"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIH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SJNNTQuNzk5IDQ4LjU2OEgyNS4ybC0xMi42IDIxLjgxYzEuMjM3LjczMyAyLjY1NyAxLjEgNC4xMjQgMS4xaDQ2LjU1MmMxLjQ2NiAwIDIuODg3LS40MTIgNC4xMjQtMS4xeiIvPjxwYXRoIGZpbGw9IiNmZmJhMDAiIGQ9Ik02Ny4yNjIgMjQuMjg0IDU1LjYyNCA0LjEyNEM1NC44OTEgMi44NDEgNTMuODM3IDEuODMzIDUyLjYgMS4xTDQwIDIyLjkxbDE0LjggMjUuNjU5aDI1LjE1NWE4LjMgOC4zIDAgMCAwLTEuMS00LjEyNHoiLz48L2c+PC9zeW1ib2w+PC9zdmc+"},"displayName":"Google Drive","typeVersion":3,"nodeCategories":[{"id":3,"name":"Data & Storage"}]},{"id":112,"icon":"fa:map-signs","name":"n8n-nodes-base.switch","codex":{"data":{"alias":["Router","If","Path","Filter","Condition","Logic","Branch","Case"],"resources":{"generic":[{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/build-your-own-virtual-assistant-with-n8n-a-step-by-step-guide/","icon":"👦","label":"Build your own virtual assistant with n8n: A step by step guide"},{"url":"https://n8n.io/blog/automation-for-maintainers-of-open-source-projects/","icon":"🏷️","label":"How to automatically manage contributions to open-source projects"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.switch/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow"]}}},"group":"[\"transform\"]","defaults":{"name":"Switch","color":"#506000"},"iconData":{"icon":"map-signs","type":"icon"},"displayName":"Switch","typeVersion":3,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":531,"icon":"file:googleDrive.svg","name":"n8n-nodes-base.googleDriveTrigger","codex":{"data":{"resources":{"generic":[{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.googledrivetrigger/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Data & Storage"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"trigger\"]","defaults":{"name":"Google Drive Trigger"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiB2aWV3Qm94PSIwIDAgODEgNzMiPjx1c2UgeGxpbms6aHJlZj0iI2EiIHg9Ii41IiB5PSIuNSIvPjxzeW1ib2wgaWQ9ImEiIG92ZXJmbG93PSJ2aXNpYmxlIj48ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0ibm9uZSI+PHBhdGggZmlsbD0iIzAwNjZkYSIgZD0ibTYuMDQ4IDYxLjI2IDMuNTI4IDYuMDk0Yy43MzMgMS4yODMgMS43ODcgMi4yOTEgMy4wMjQgMy4wMjRsMTIuNi0yMS44MUgwYTguMyA4LjMgMCAwIDAgMS4xIDQuMTI0eiIvPjxwYXRoIGZpbGw9IiMwMGFjNDciIGQ9Ik00MCAyMi45MSAyNy40IDEuMWMtMS4yMzcuNzMzLTIuMjkxIDEuNzQxLTMuMDI0IDMuMDI0TDEuMSA0NC40NDVBOC4zIDguMyAwIDAgMCAwIDQ4LjU2OGgyNS4yeiIvPjxwYXRoIGZpbGw9IiNlYTQzMzUiIGQ9Ik02Ny40IDcwLjM3OGMxLjIzNy0uNzMzIDIuMjkxLTEuNzQxIDMuMDI0LTMuMDI0bDEuNDY2LTIuNTIgNy4wMS0xMi4xNDJhOC4zIDguMyAwIDAgMCAxLjEtNC4xMjRINTQuNzk4bDUuMzYzIDEwLjUzOHoiLz48cGF0aCBmaWxsPSIjMDA4MzJkIiBkPSJNNDAgMjIuOTEgNTIuNiAxLjFDNTEuMzYzLjM2NyA0OS45NDMgMCA0OC40NzcgMEgzMS41MjRjLTEuNDY2IDAtMi44ODcuNDEyLTQuMTI0IDEuMXoiLz48cGF0aCBmaWxsPSIjMjY4NGZjIiBkPSJNNTQuNzk5IDQ4LjU2OEgyNS4ybC0xMi42IDIxLjgxYzEuMjM3LjczMyAyLjY1NyAxLjEgNC4xMjQgMS4xaDQ2LjU1MmMxLjQ2NiAwIDIuODg3LS40MTIgNC4xMjQtMS4xeiIvPjxwYXRoIGZpbGw9IiNmZmJhMDAiIGQ9Ik02Ny4yNjIgMjQuMjg0IDU1LjYyNCA0LjEyNEM1NC44OTEgMi44NDEgNTMuODM3IDEuODMzIDUyLjYgMS4xTDQwIDIyLjkxbDE0LjggMjUuNjU5aDI1LjE1NWE4LjMgOC4zIDAgMCAwLTEuMS00LjEyNHoiLz48L2c+PC9zeW1ib2w+PC9zdmc+"},"displayName":"Google Drive Trigger","typeVersion":1,"nodeCategories":[{"id":3,"name":"Data & Storage"}]},{"id":535,"icon":"file:webhook.svg","name":"n8n-nodes-base.respondToWebhook","codex":{"data":{"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/"}]},"categories":["Core Nodes","Utility"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"transform\"]","defaults":{"name":"Respond to Webhook"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2Z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EgLjItMS41IDAtMy4zLTIuNy02LTYtNnMtNiAyLjctNiA2YzAgMi4xIDEuMSA0IDIuOSA1LjFsMS43IDF6Ii8+PC9zdmc+"},"displayName":"Respond to Webhook","typeVersion":2,"nodeCategories":[{"id":7,"name":"Utility"},{"id":9,"name":"Core Nodes"}]},{"id":565,"icon":"fa:sticky-note","name":"n8n-nodes-base.stickyNote","codex":{"data":{"alias":["Comments","Notes","Sticky"],"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"input\"]","defaults":{"name":"Sticky Note","color":"#FFD233"},"iconData":{"icon":"sticky-note","type":"icon"},"displayName":"Sticky Note","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":834,"icon":"file:code.svg","name":"n8n-nodes-base.code","codex":{"data":{"alias":["cpde","Javascript","JS","Python","Script","Custom Code","Function"],"details":"The Code node allows you to execute JavaScript in your workflow.","resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Code"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTcxXzQ0MSkiPgo8cGF0aCBkPSJNMTcwLjI4MyA0OEgxOTYuNUMyMDMuMTI3IDQ4IDIwOC41IDQyLjYyNzQgMjA4LjUgMzZWMTJDMjA4LjUgNS4zNzI1OCAyMDMuMTI3IDAgMTk2LjUgMEgxNzAuMjgzQzEyNi4xIDAgOTAu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gMzc0Ljk3OCAzMzZWNDMyQzM3NC45NzggNDQ5LjY3MyAzNjAuNjUyIDQ2NCAzNDIuOTc5IDQ2NEgzMTdDMzEwLjM3MyA0NjQgMzA1IDQ2OS4zNzMgMzA1IDQ3NlY1MDBDMzA1IDUwNi42MjcgMzEwLjM3MyA1MTIgMzE3IDUxMkgzNDIuOTc5QzM4Ny4xNjEgNTEyIDQyMi45NzggNDc2LjE4MyA0MjIuOTc4IDQzMlYzMzZDNDIyLjk3OCAzMDUuMDcyIDQ0OC4wNTEgMjgwIDQ3OC45NzkgMjgwSDQ5MEM0OTYuNjI3IDI4MCA1MDIgMjc0LjYyOCA1MDIgMjY4VjI0NEM1MDIgMjM3LjM3MyA0OTYuNjI4IDIzMiA0OTAgMjMyTDQ3OC45NzkgMjMyQzQ0OC4wNTEgMjMyIDQyMi45NzggMjA2LjkyOCA0MjIuOTc4IDE3NlY4MEM0MjIuOTc4IDM1LjgxNzIgMzg3LjE2MSAwIDM0Mi45NzkgMEgzMTdDMzEwLjM3MyAwIDMwNSA1LjM3MjU4IDMwNSAxMlYzNloiIGZpbGw9IiNGRjk5MjIiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTcxXzQ0MSI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},"displayName":"Code","typeVersion":2,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":1119,"icon":"fa:robot","name":"@n8n/n8n-nodes-langchain.agent","codex":{"data":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Agents","Root Nodes"]}}},"group":"[\"transform\"]","defaults":{"name":"AI Agent","color":"#404040"},"iconData":{"icon":"robot","type":"icon"},"displayName":"AI Agent","typeVersion":3,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]},{"id":1145,"icon":"file:anthropic.svg","name":"@n8n/n8n-nodes-langchain.lmChatAnthropic","codex":{"data":{"alias":["claude","sonnet","opus"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatanthropic/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]}}},"group":"[\"transform\"]","defaults":{"name":"Anthropic Chat Model"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0NiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzdEN0Q4NyIgZD0iTTMyLjczIDBoLTYuOTQ1TDM4LjQ1IDMyaDYuOTQ1ek0xMi42NjUgMCAwIDMyaDcuMDgybDIuNTktNi43MmgxMy4yNWwyLjU5IDYuNzJoNy4wODJMMTkuOTI5IDB6bS0uNzAyIDE5LjMzNyA0LjMzNC0xMS4yNDYgNC4zMzQgMTEuMjQ2eiIvPjwvc3ZnPg=="},"displayName":"Anthropic Chat Model","typeVersion":1,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]},{"id":1235,"icon":"file:extractFromFile.svg","name":"n8n-nodes-base.extractFromFile","codex":{"data":{"alias":["CSV","Spreadsheet","Excel","xls","xlsx","ods","tabular","decode","decoding","Move Binary Data","Binary","File","PDF","JSON","HTML","ICS","iCal","txt","Text","RTF","XML","64","Base64","Convert"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.extractfromfile/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Files","Data Transformation"]}}},"group":"[\"input\"]","defaults":{"name":"Extract from File"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuOTM3NSAyQzAuNDE5NzMzIDIgMCAyLjQxOTczIDAgMi45Mzc1VjM3LjMyMjFDMCAzNy44Mzk5IDAuNDE5NzMzIDM4LjI1OTYgMC45Mzc1IDM4LjI1OTZIMjYuMjE1NEMyNi43MzMyIDM4LjI1OTYgMjcuMTUyOSAzNy44Mzk5IDI3LjE1MjkgMzcuMzIyMUwyNy4xNTI5IDMwLjY3MTlMMTYuNzk2OSAzMC42NzE5QzE0Ljg5ODQgMzAuNjcxOSAxMy4zNTk0IDI5LjEzMjkgMTMuMzU5NCAyNy4yMzQ0VjI1LjM1OTRDMTMuMzU5NCAyMy40NjA5IDE0Ljg5ODQgMjEuOTIxOSAxNi43OTY5IDIxLjkyMTlIMjcuMTUyOUwyNy4xNTI5IDE1Ljc4MjFIMTQuMzA4M0MxMy43OTA2IDE1Ljc4MjEgMTMuMzcwOCAxNS4zNjI0IDEzLjM3MDggMTQuODQ0NlYySDAuOTM3NVoiIGZpbGw9IiMzNTNGNkUiLz4KPHBhdGggZD0iTTE2LjAyNzEgMkMxNS45NDA4IDIgMTUuODcwOCAyLjA2OTk2IDE1Ljg3MDggMi4xNTYyNVYxMi44MTM0QzE1Ljg3MDggMTMuMDcyMyAxNi4wODA3IDEzLjI4MjEgMTYuMzM5NiAxMy4yODIxSDI2Ljk5NjdDMjcuMDgzIDEzLjI4MjEgMjcuMTUyOSAxMy4yMTIyIDI3LjE1MjkgMTMuMTI1OUwyNy4xNTI5IDEyLjYxNzFDMjcuMTUyOSAxMi4zNjg4IDI3LjA1NDUgMTIuMTMwNyAyNi44NzkxIDExLjk1NUwxNy4yMjI1IDIuMjc1MzhDMTcuMDQ2NiAyLjA5OTA4IDE2LjgwNzkgMiAxNi41NTg4IDJIMTYuMDI3MVoiIGZpbGw9IiMzNTNGNkUiLz4KPHBhdGggZD0iTTI5Ljc2NDIgMzQuNjUwM0MyOS4wMzQgMzMuOTE2IDI5LjAzNzQgMzIuNzI4OCAyOS43NzE2IDMxLjk5ODZMMzMuNjE5NyAyOC4xNzE5TDE2Ljc5NjkgMjguMTcxOUMxNi4yNzkxIDI4LjE3MTkgMTUuODU5NCAyNy43NTIxIDE1Ljg1OTQgMjcuMjM0NFYyNS4zNTk0QzE1Ljg1OTQgMjQuODQxNiAxNi4yNzkxIDI0LjQyMTkgMTYuNzk2OSAyNC40MjE5TDMzLjU0MTIgMjQuNDIxOUwyOS43NzE2IDIwLjY3MzNDMjkuMDM3NCAxOS45NDMxIDI5LjAzNCAxOC43NTU5IDI5Ljc2NDIgMTguMDIxNkMzMC40OTQ0IDE3LjI4NzQgMzEuNjgxNiAxNy4yODQgMzIuNDE1OSAxOC4wMTQyTDM5LjQ0NzEgMjUuMDA2NEMzOS44MDEgMjUuMzU4MyA0MCAyNS44MzY4IDQwIDI2LjMzNTlDNDAgMjYuODM1IDM5LjgwMSAyNy4zMTM1IDM5LjQ0NzEgMjcuNjY1NUwzMi40MTU5IDM0LjY1NzZDMzEuNjgxNiAzNS4zODc4IDMwLjQ5NDQgMzUuMzg0NSAyOS43NjQyIDM0LjY1MDNaIiBmaWxsPSIjMzUzRjZFIi8+Cjwvc3ZnPgo="},"displayName":"Extract from File","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]}],"categories":[{"id":35,"name":"Document Extraction"},{"id":49,"name":"AI Summarization"}],"image":[]}}