This workflow follows the Airtable → Slack recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 15
}
]
}
},
"id": "434d05bb-30e6-47e6-8915-784367eae302",
"name": "Schedule Trigger - 15min",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.1,
"position": [
-1740,
1180
]
},
{
"parameters": {
"jsCode": "// Create or Update Order Production Status Records\nconst orderGroups = $('Group Ready Items').all()[0].json.orderGroups || new Map();\nconst config = $('Batch Configuration').first().json;\nconst PRODUCTION_RATES = config.PRODUCTION_RATES;\n\n// Get existing Order Production Status records\nconst statusTable = base.getTable('Order Production Status');\nconst existingStatuses = await statusTable.selectRecordsAsync({\n fields: ['Order ID']\n});\n\nconst existingOrderIds = new Set(\n existingStatuses.records.map(r => r.getCellValue('Order ID')?.[0]?.id)\n);\n\n// Calculate production estimates\nfunction estimateProductionTime(items) {\n let totalTime = PRODUCTION_RATES.Setup || 15;\n \n items.forEach(item => {\n const productType = item['Normalized Product Type'] || 'DTF';\n const quantity = item.Quantity || 1;\n const rate = PRODUCTION_RATES[productType] || 2;\n totalTime += quantity * rate;\n });\n \n return totalTime;\n}\n\n// Create updates for each order\nconst statusUpdates = [];\n\nfor (const [orderId, orderData] of orderGroups) {\n const totalItems = orderData.items.length;\n const itemsQueued = orderData.items.filter(i => i['Item Status'] === 'Queued').length;\n const itemsInProduction = orderData.items.filter(i => i['Item Status'] === 'In Production').length;\n const itemsCompleted = orderData.items.filter(i => i['Item Status'] === 'Completed').length;\n \n const completionPercent = Math.round((itemsCompleted / totalItems) * 100);\n const estimatedMinutes = estimateProductionTime(orderData.items);\n const estimatedCompletion = new Date(Date.now() + estimatedMinutes * 60000);\n \n const statusData = {\n 'Order ID': [{id: orderId}],\n 'Total Items': totalItems,\n 'Items Queued': itemsQueued,\n 'Items In Production': itemsInProduction,\n 'Items Completed': itemsCompleted,\n 'Completion %': completionPercent,\n 'Estimated Completion': estimatedCompletion,\n 'Status': itemsCompleted === totalItems ? 'Completed' : \n itemsInProduction > 0 ? 'In Production' : \n itemsQueued > 0 ? 'Queued' : 'Awaiting Batch',\n 'Last Updated': new Date()\n };\n \n if (existingOrderIds.has(orderId)) {\n // Update existing\n statusUpdates.push({\n type: 'update',\n orderId: orderId,\n data: statusData\n });\n } else {\n // Create new\n statusUpdates.push({\n type: 'create',\n data: statusData\n });\n }\n}\n\nreturn statusUpdates;"
},
"id": "9b5aebb0-5f68-424b-9daf-ad650205cb77",
"name": "Update Order Status",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
180,
1100
]
},
{
"parameters": {
"authentication": "airtableOAuth2Api",
"operation": "upsert",
"base": {
"__rl": true,
"value": "appZdp18sltDYOs4s",
"mode": "list",
"cachedResultName": "Order Management",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s"
},
"table": {
"__rl": true,
"value": "tblvBUk4CuCgImoWc",
"mode": "list",
"cachedResultName": "Order Production Status",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s/tblvBUk4CuCgImoWc"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Order ID": "={{ $json.data['Order ID'] }}",
"Estimated Completion": "={{ $json.data['Estimated Completion'] }}"
},
"matchingColumns": [
"Order ID"
],
"schema": [
{
"id": "id",
"displayName": "id",
"required": false,
"defaultMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Id",
"displayName": "Id",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Current Facility",
"displayName": "Current Facility",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Estimated Start",
"displayName": "Estimated Start",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Estimated Completion",
"displayName": "Estimated Completion",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": true
},
{
"id": "Actual Start",
"displayName": "Actual Start",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
},
{
"id": "Actual Completion",
"displayName": "Actual Completion",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
},
{
"id": "Production Notes",
"displayName": "Production Notes",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Behind Schedule",
"displayName": "Behind Schedule",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Order ID",
"displayName": "Order ID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Batches",
"displayName": "Batches",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
}
]
},
"options": {}
},
"id": "dfbc1c57-d784-4227-b59f-b4217ccf0724",
"name": "Upsert Order Status",
"type": "n8n-nodes-base.airtable",
"typeVersion": 2,
"position": [
340,
1100
],
"credentials": {
"airtableOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"authentication": "airtableOAuth2Api",
"operation": "search",
"base": {
"__rl": true,
"value": "appZdp18sltDYOs4s",
"mode": "list",
"cachedResultName": "Order Management",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s"
},
"table": {
"__rl": true,
"value": "tblIWVpsJiOF5VZQE",
"mode": "list",
"cachedResultName": "Batches",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s/tblIWVpsJiOF5VZQE"
},
"filterByFormula": "AND({Batch Status} != 'Complete', {Batch Status} != 'Failed')",
"options": {
"fields": [
"Batch Name",
"Priority",
"Created",
"Batch Status",
"Queue Position",
"Total Quantity",
"Facility",
"Print Type",
"Estimated Start Time",
"Estimated Completion Time"
]
}
},
"id": "79f4977c-ecd7-4722-a783-13cf6b533364",
"name": "Get Existing Batches",
"type": "n8n-nodes-base.airtable",
"typeVersion": 2,
"position": [
-1040,
1380
],
"credentials": {
"airtableOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "// Recalculate Queue Positions for All Active Batches\nconst config = $('Batch Configuration').first().json;\nconst QUEUE_SETTINGS = config.QUEUE_SETTINGS;\nconst PRODUCTION_RATES = config.PRODUCTION_RATES;\n\n// Get existing batches\nconst existingBatches = $input.all().map(item => item.json);\n\n// Calculate dynamic priority with age bonus\nfunction calculateDynamicPriority(batch) {\n const now = new Date();\n const created = new Date(batch.Created);\n const ageInHours = (now - created) / (1000 * 60 * 60);\n const ageBonus = Math.min(ageInHours * QUEUE_SETTINGS.AGE_BONUS_PER_HOUR, QUEUE_SETTINGS.MAX_AGE_BONUS);\n \n // Base priority scores\n let basePriority = 0;\n if (batch.Priority === 'Urgent') basePriority = 10000;\n else if (batch.Priority === 'High') basePriority = 5000;\n else basePriority = 1000;\n \n return basePriority + ageBonus;\n}\n\n// Estimate production time for a batch\nfunction estimateProductionTime(batch) {\n const quantity = batch['Total Quantity'] || 0;\n const productType = batch['Print Type'] || 'DTF';\n const rate = PRODUCTION_RATES[productType] || PRODUCTION_RATES['DTF'];\n return PRODUCTION_RATES.Setup + (quantity * rate);\n}\n\n// Separate batches by status and facility\nconst batchesByFacility = {\n 'CHICO': { inProgress: [], queued: [] },\n 'OUTPOST': { inProgress: [], queued: [] }\n};\n\nexistingBatches.forEach(batch => {\n const status = batch['Batch Status'];\n const facility = batch.Facility || (batch['Batch Name']?.includes('CHICO') ? 'CHICO' : 'OUTPOST');\n \n const batchData = {\n id: batch.id,\n name: batch['Batch Name'],\n priority: batch.Priority,\n created: batch.Created,\n quantity: batch['Total Quantity'],\n productType: batch['Print Type'],\n dynamicPriority: calculateDynamicPriority(batch),\n estimatedTime: estimateProductionTime(batch),\n currentPosition: batch['Queue Position']\n };\n \n if (status === 'Printing' || status === 'In Progress') {\n batchesByFacility[facility].inProgress.push(batchData);\n } else if (status === 'Created' || status === 'Queued') {\n batchesByFacility[facility].queued.push(batchData);\n }\n});\n\n// Process each facility separately\nconst updates = [];\n\nObject.entries(batchesByFacility).forEach(([facility, batches]) => {\n // Sort queued batches by dynamic priority\n batches.queued.sort((a, b) => b.dynamicPriority - a.dynamicPriority);\n \n // Calculate positions and times\n let position = batches.inProgress.length + 1;\n let cumulativeTime = batches.inProgress.reduce((sum, b) => sum + b.estimatedTime, 0);\n \n batches.queued.forEach(batch => {\n const estimatedStart = new Date(Date.now() + cumulativeTime * 60000);\n const estimatedCompletion = new Date(estimatedStart.getTime() + batch.estimatedTime * 60000);\n \n updates.push({\n id: batch.id,\n fields: {\n 'Queue Position': position,\n 'Estimated Start Time': estimatedStart.toISOString(),\n 'Estimated Completion Time': estimatedCompletion.toISOString(),\n 'Dynamic Priority Score': Math.round(batch.dynamicPriority)\n }\n });\n \n position++;\n cumulativeTime += batch.estimatedTime;\n });\n});\n\nconsole.log(`Queue Recalculation Summary:`);\nconsole.log(`- CHICO: ${batchesByFacility.CHICO.inProgress.length} in progress, ${batchesByFacility.CHICO.queued.length} queued`);\nconsole.log(`- OUTPOST: ${batchesByFacility.OUTPOST.inProgress.length} in progress, ${batchesByFacility.OUTPOST.queued.length} queued`);\nconsole.log(`- Total updates: ${updates.length}`);\n\nreturn updates;"
},
"id": "5d96aea6-5d85-47a0-a72e-36df98ff1cd3",
"name": "Recalculate All Queues",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-1040,
1620
]
},
{
"parameters": {
"authentication": "airtableOAuth2Api",
"operation": "update",
"base": {
"__rl": true,
"value": "appZdp18sltDYOs4s",
"mode": "list",
"cachedResultName": "Order Management",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s"
},
"table": {
"__rl": true,
"value": "tblIWVpsJiOF5VZQE",
"mode": "list",
"cachedResultName": "Batches",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s/tblIWVpsJiOF5VZQE"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"id": "={{ $json.id }}",
"Queue Position": "={{ $json.fields['Queue Position'] }}",
"Estimated Start Time": "={{ $json.fields['Estimated Start Time'] }}",
"Estimated Completion Time": "={{ $json.fields['Estimated Completion Time'] }}",
"Dynamic Priority Score": "={{ $json.fields['Dynamic Priority Score'] }"
},
"matchingColumns": [
"id"
]
},
"options": {}
},
"id": "56252ee4-3d7f-4f66-96cf-5529daa06e5b",
"name": "Update Queue Positions",
"type": "n8n-nodes-base.airtable",
"typeVersion": 2,
"position": [
-820,
1620
],
"credentials": {
"airtableOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"authentication": "airtableOAuth2Api",
"operation": "upsert",
"base": {
"__rl": true,
"value": "appZdp18sltDYOs4s",
"mode": "list",
"cachedResultName": "Order Management",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s"
},
"table": {
"__rl": true,
"value": "tblIWVpsJiOF5VZQE",
"mode": "list",
"cachedResultName": "Batches",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s/tblIWVpsJiOF5VZQE"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Batch Name": "={{ $json[\"Batch Name\"] }}",
"Batch Status": "={{ $json['Batch Status'] }}",
"Priority": "={{ $json['Priority'] }}",
"Print Type": "={{ \n $json[\"Print Type\"]?.includes(\"DTF\") ? \"DTF\" : \n $json[\"Print Type\"]?.includes(\"UV\") ? \"UV\" : \n $json[\"Print Type\"]?.includes(\"Sublimation\") ? \"Sublimation\" : \n $json[\"Print Type\"]?.includes(\"Mixed\") ? \"Mixed\" : \n \"\" \n}}",
"Created": "={{ $json['Created'] }}",
"Internal Notes": "={{ $json['Internal Notes'] }}",
"Stage History": "={{ $json['Stage History'] }}",
"Mixed Product Types": "={{ $json['Mixed Product Types'] }}",
"Queue Position": "={{ $json[\"Queue Position\"] }}",
"Linked Order Item": "={{ $json[\"Order Items\"] }}"
},
"matchingColumns": [
"Batch Name"
],
"schema": [
{
"id": "Batch ID",
"displayName": "Batch ID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Batch Name",
"displayName": "Batch Name",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Batch Status",
"displayName": "Batch Status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "Created",
"value": "Created"
},
{
"name": "Printing",
"value": "Printing"
},
{
"name": "Complete",
"value": "Complete"
}
],
"readOnly": false,
"removed": false
},
{
"id": "Created",
"displayName": "Created",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
},
{
"id": "Print Type",
"displayName": "Print Type",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "DTF",
"value": "DTF"
},
{
"name": "Sublimation",
"value": "Sublimation"
},
{
"name": "UV",
"value": "UV"
},
{
"name": "Mixed",
"value": "Mixed"
},
{
"name": "DTF Gang Sheet",
"value": "DTF Gang Sheet"
},
{
"name": "UV Gang Sheet",
"value": "UV Gang Sheet"
},
{
"name": "Sublimation Gang Sheet",
"value": "Sublimation Gang Sheet"
}
],
"readOnly": false,
"removed": false
},
{
"id": "Priority",
"displayName": "Priority",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "Urgent",
"value": "Urgent"
},
{
"name": "High",
"value": "High"
},
{
"name": "Normal",
"value": "Normal"
}
],
"readOnly": false,
"removed": false
},
{
"id": "Linked Order Item",
"displayName": "Linked Order Item",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Linked Production",
"displayName": "Linked Production",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Print Started (from Production Records)",
"displayName": "Print Started (from Production Records)",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Print Completed (from Production Records)",
"displayName": "Print Completed (from Production Records)",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "QC Completed (from Production Records)",
"displayName": "QC Completed (from Production Records)",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Cut Completed (from Production Records)",
"displayName": "Cut Completed (from Production Records)",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Ship Completed (from Production Records)",
"displayName": "Ship Completed (from Production Records)",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Printer Used",
"displayName": "Printer Used",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Status Color",
"displayName": "Status Color",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Batch QR String",
"displayName": "Batch QR String",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Batch QR Code",
"displayName": "Batch QR Code",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Batch Sheet PDF",
"displayName": "Batch Sheet PDF",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Material Length",
"displayName": "Material Length",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "Material Cost",
"displayName": "Material Cost",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "Batch Completed",
"displayName": "Batch Completed",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
},
{
"id": "QC Status",
"displayName": "QC Status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "Pending",
"value": "Pending"
},
{
"name": "Passed",
"value": "Passed"
},
{
"name": "Failed",
"value": "Failed"
}
],
"readOnly": false,
"removed": false
},
{
"id": "QC Notes",
"displayName": "QC Notes",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Internal Notes",
"displayName": "Internal Notes",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Stage History",
"displayName": "Stage History",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Total Items",
"displayName": "Total Items",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Total Orders",
"displayName": "Total Orders",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Total Quantity",
"displayName": "Total Quantity",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Production Time",
"displayName": "Production Time",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Queue Position",
"displayName": "Queue Position",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": false
},
{
"id": "Facility",
"displayName": "Facility",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Operator",
"displayName": "Operator",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Defect Count",
"displayName": "Defect Count",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Reprint Items",
"displayName": "Reprint Items",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Days Old",
"displayName": "Days Old",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Is Overdue",
"displayName": "Is Overdue",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Completion %",
"displayName": "Completion %",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Completed Items",
"displayName": "Completed Items",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Last Modified",
"displayName": "Last Modified",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Linked Order",
"displayName": "Linked Order",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Order ID",
"displayName": "Order ID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Mixed Product Types",
"displayName": "Mixed Product Types",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "boolean",
"readOnly": false,
"removed": false
},
{
"id": "Dynamic Priority Score",
"displayName": "Dynamic Priority Score",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "Estimated Start Time",
"displayName": "Estimated Start Time",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
},
{
"id": "Estimated Completion Time",
"displayName": "Estimated Completion Time",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
},
{
"id": "Actual Start Time",
"displayName": "Actual Start Time",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
},
{
"id": "Actual Completion Time",
"displayName": "Actual Completion Time",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
},
{
"id": "Order IDs",
"displayName": "Order IDs",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Order Production Status",
"displayName": "Order Production Status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Autonumber",
"displayName": "Autonumber",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Orders",
"displayName": "Orders",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"typecast": true
}
},
"id": "c525295d-1c82-4d0b-b1e0-e42efa02c25b",
"name": "Create Batches in Airtable",
"type": "n8n-nodes-base.airtable",
"typeVersion": 2,
"position": [
940,
1640
],
"credentials": {
"airtableOAuth2Api": {
"name": "<your credential>"
}
},
"onError": "continueRegularOutput"
},
{
"parameters": {
"jsCode": "// Prepare Order Items Update with Batch IDs\nconst batchesCreated = $('Create Batches in Airtable').all();\nconst itemUpdates = [];\n\n// Log to debug what we're getting\nconsole.log(`Processing ${batchesCreated.length} batch responses`);\n\n// Process all batches (whether created or updated)\nfor (let i = 0; i < batchesCreated.length; i++) {\n const batch = batchesCreated[i];\n \n // Airtable upsert returns the record with id and fields\n // The structure should be: { id: \"rec...\", fields: { ... }, createdTime: \"...\" }\n \n if (!batch.json || !batch.json.id) {\n console.log(`Batch ${i} has no valid ID, skipping`);\n continue;\n }\n \n const batchId = batch.json.id;\n const fields = batch.json.fields || {};\n \n // Get the batch details we need\n const batchName = fields['Batch Name'];\n const queuePosition = fields['Queue Position'];\n const linkedOrderItems = fields['Linked Order Item'] || [];\n \n console.log(`Batch: ${batchName} (${batchId}) has ${linkedOrderItems.length} linked items`);\n \n // Update each linked order item\n if (linkedOrderItems.length > 0) {\n for (const itemId of linkedOrderItems) {\n itemUpdates.push({\n json: {\n id: itemId,\n fields: {\n 'Batch ID': [batchId], // Array since it's a linked record field\n 'Item Status': 'In Production',\n 'Batch Name': batchName,\n 'Queue Position': queuePosition,\n 'Last Updated': new Date().toISOString()\n }\n }\n });\n }\n }\n}\n\n// Return results\nif (itemUpdates.length === 0) {\n console.log('No order items found to update');\n return [{\n json: {\n message: 'No items to update',\n batchesProcessed: batchesCreated.length,\n timestamp: new Date().toISOString(),\n debug: batchesCreated.length > 0 ? JSON.stringify(batchesCreated[0].json, null, 2) : 'No batches'\n }\n }];\n}\n\nconsole.log(`Prepared ${itemUpdates.length} order items for update`);\nreturn itemUpdates;"
},
"id": "3d06b35c-6b63-492a-88aa-873e31d29b59",
"name": "Prepare Item Updates",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1200,
1540
]
},
{
"parameters": {
"authentication": "airtableOAuth2Api",
"operation": "update",
"base": {
"__rl": true,
"value": "appZdp18sltDYOs4s",
"mode": "list",
"cachedResultName": "Order Management",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s"
},
"table": {
"__rl": true,
"value": "tblTN1vUIpu6HHqEL",
"mode": "list",
"cachedResultName": "Order Items",
"cachedResultUrl": "https://airtable.com/appZdp18sltDYOs4s/tblTN1vUIpu6HHqEL"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"id": "={{ $json.id }}",
"Item Status": "={{ $json.fields['Item Status'] }}",
"Total Cost (formula)": 0,
"Batch ID": "={{ $json.fields[\"Batch ID\"] }}"
},
"matchingColumns": [
"id"
],
"schema": [
{
"id": "id",
"displayName": "id",
"required": false,
"defaultMatch": true,
"display": true,
"type": "string",
"readOnly": true
},
{
"id": "Order Item ID",
"displayName": "Order Item ID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Record ID",
"displayName": "Record ID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Item UID",
"displayName": "Item UID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Product Type",
"displayName": "Product Type",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "Sublimation Gang Sheet",
"value": "Sublimation Gang Sheet"
},
{
"name": "DTF Gang Sheet",
"value": "DTF Gang Sheet"
},
{
"name": "DTF Transfers",
"value": "DTF Transfers"
},
{
"name": "UV Gang Sheet",
"value": "UV Gang Sheet"
},
{
"name": "UV Stickers",
"value": "UV Stickers"
},
{
"name": "Sublimation",
"value": "Sublimation"
},
{
"name": "Pre-cut DTF",
"value": "Pre-cut DTF"
},
{
"name": "Pre-cut UV",
"value": "Pre-cut UV"
},
{
"name": "Pre-cut Sublimation",
"value": "Pre-cut Sublimation"
},
{
"name": "Sample Pack",
"value": "Sample Pack"
},
{
"name": "Alignment Tool",
"value": "Alignment Tool"
},
{
"name": "Heat Press",
"value": "Heat Press"
},
{
"name": "Accessories",
"value": "Accessories"
}
],
"readOnly": false,
"removed": true
},
{
"id": "Quantity",
"displayName": "Quantity",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "Unit Price",
"displayName": "Unit Price",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "Dimensions (in)",
"displayName": "Dimensions (in)",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Needs File",
"displayName": "Needs File",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "boolean",
"readOnly": false,
"removed": true
},
{
"id": "File URL",
"displayName": "File URL",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Attachment",
"displayName": "Attachment",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Item Status",
"displayName": "Item Status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "New",
"value": "New"
},
{
"name": "Pending Art",
"value": "Pending Art"
},
{
"name": "Art Received",
"value": "Art Received"
},
{
"name": "Ready for Production",
"value": "Ready for Production"
},
{
"name": "In Production",
"value": "In Production"
},
{
"name": "Quality Check",
"value": "Quality Check"
},
{
"name": "Ready to Ship",
"value": "Ready to Ship"
},
{
"name": "Ready for Pickup",
"value": "Ready for Pickup"
},
{
"name": "Shipped",
"value": "Shipped"
},
{
"name": "Picked Up",
"value": "Picked Up"
}
],
"readOnly": false,
"removed": false
},
{
"id": "Print Facility",
"displayName": "Print Facility",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "CHICO",
"value": "CHICO"
},
{
"name": "OUTPOST",
"value": "OUTPOST"
}
],
"readOnly": false,
"removed": false
},
{
"id": "Printer Assignment",
"displayName": "Printer Assignment",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "C2",
"value": "C2"
},
{
"name": "D2",
"value": "D2"
},
{
"name": "U2",
"value": "U2"
},
{
"name": "S2",
"value": "S2"
},
{
"name": "D6",
"value": "D6"
}
],
"readOnly": false,
"removed": false
},
{
"id": "Meta (JSON)",
"displayName": "Meta (JSON)",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Artwork QC",
"displayName": "Artwork QC",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "Pending",
"value": "Pending"
},
{
"name": "Approved",
"value": "Approved"
},
{
"name": "Rejected",
"value": "Rejected"
}
],
"readOnly": false,
"removed": false
},
{
"id": "QC Notes",
"displayName": "QC Notes",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "QC Improvement Suggestions",
"displayName": "QC Improvement Suggestions",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Total Cost (formula)",
"displayName": "Total Cost (formula)",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": false
},
{
"id": "Batch Print Status",
"displayName": "Batch Print Status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "Not Printed",
"value": "Not Printed"
},
{
"name": "Queued",
"value": "Queued"
},
{
"name": "Printed",
"value": "Printed"
}
],
"readOnly": false,
"removed": false
},
{
"id": "Ready for Batch",
"displayName": "Ready for Batch",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Production Location",
"displayName": "Production Location",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Line Item ID",
"displayName": "Line Item ID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Product ID",
"displayName": "Product ID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Variant ID",
"displayName": "Variant ID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "SKU",
"displayName": "SKU",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Title",
"displayName": "Title",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "File Name",
"displayName": "File Name",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Original File URL",
"displayName": "Original File URL",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "File DPI",
"displayName": "File DPI",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "File Dimensions",
"displayName": "File Dimensions",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "Is Precut",
"displayName": "Is Precut",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "boolean",
"readOnly": false,
"removed": true
},
{
"id": "Precut Qty",
"displayName": "Precut Qty",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "Cutline References",
"displayName": "Cutline References",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": true
},
{
"id": "Is Gang Sheet",
"displayName": "Is Gang Sheet",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "boolean",
"readOnly": false,
"removed": true
},
{
"id": "Gang Sheet Length",
"displayName": "Gang Sheet Length",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "Requires Shipping",
"displayName": "Requires Shipping",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "boolean",
"readOnly": false,
"removed": true
},
{
"id": "Fulfillable Quantity",
"displayName": "Fulfillable Quantity",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "Linked Order",
"displayName": "Linked Order",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Rush Service",
"displayName": "Rush Service",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Order ID",
"displayName": "Order ID",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "Linked Files",
"displayName": "Linked Files",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Linked Shipment",
"displayName": "Linked Shipment",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "array",
"readOnly": false,
"removed": false
},
{
"id": "Linked Production",
"displayName": "Linked Production",
"required": false,
"defaultMatch": false,
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
airtableOAuth2ApislackOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Ts Order Batch. Uses airtable, slack. Scheduled trigger; 38 nodes.
Source: https://github.com/niganuga/production-scanner/blob/53cdcbfc592abf5d0f33bc3e7f2fd054240042b4/n8n/ts_order_batch.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This weekly workflow automatically identifies new ranked keywords for your domain within Google’s top 10 results without manual SERP monitoring. On each run, the workflow fetches the latest ranking an
This workflow automatically analyzes sales data by product category, compares performance across time periods (daily, weekly or monthly), stores structured results in Airtable and sends a clear summar
This workflow exports every table in a base as its own CSV, saves the files in a time-stamped folder in Amazon S3, pings you on Slack, and optionally prunes older copies. You get an automated weekly b
This template provides a fully automated system for monitoring news on any topic you choose. It leverages Linkup's AI-powered web search to find recent, relevant articles, extracts key information lik
This n8n workflow monitors WooCommerce refund activity to detect unusual spikes in product returns at the SKU level. It compares return volumes across rolling 24-hour windows, alerts teams in Slack wh