n8n
Workflow
Upload Bulk Records From Csv Airtable Interfaces
This n8n workflow automates tasks using Airtable. Upload Bulk Records From Csv Airtable Interfaces - ready to import and run in your n8n instance.
n8n
workflow.json
About This Script
This n8n workflow automates tasks using Airtable. Upload Bulk Records From Csv Airtable Interfaces - ready to import and run in your n8n instance.
Features:
- Makes HTTP requests to external APIs
- Conditional logic and branching
- Integrates with Airtable
Source Code
{
"nodes": [
{
"id": "577fb3b7-b0a6-4f2b-9b53-36d1f77de5a0",
"name": "Get File ID",
"type": "n8n-nodes-base.airtable",
"position": [
1120,
1120
],
"parameters": {
"id": "={{ $node[\"New Upload\"].json[\"id\"] }}",
"base": {
"__rl": true,
"mode": "id",
"value": "={{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Base ID\"] }}"
},
"table": {
"__rl": true,
"mode": "id",
"value": "={{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Upload Table ID\"] }}"
},
"options": [],
"operation": "get"
},
"credentials": {
"airtableTokenApi": {
"id": "b1TkvXJM6AdmupUh",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2
},
{
"id": "a287658f-50e0-4d08-9342-a5143dc20ff2",
"name": "Status Failed",
"type": "n8n-nodes-base.httpRequest",
"position": [
2820,
1180
],
"parameters": {
"url": "=https://api.airtable.com/v0/{{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Base ID\"] }}/{{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Upload Table ID\"] }}",
"method": "PATCH",
"options": [],
"jsonBody": "={\n\"records\":[{\n\"id\":\"{{ $item(\"0\").$node[\"Get File ID\"].json[\"record_id\"] }}\",\n\"fields\":{\n\"Status\":\"Failed\"\n}\n}\n]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "airtableTokenApi"
},
"credentials": {
"airtableTokenApi": {
"id": "b1TkvXJM6AdmupUh",
"name": "Airtable Personal Access Token account"
}
},
"executeOnce": true,
"typeVersion": 4.1
},
{
"id": "e3aae523-4803-4f69-9697-ab677c3f216d",
"name": "Status Uploaded",
"type": "n8n-nodes-base.httpRequest",
"position": [
2820,
1020
],
"parameters": {
"url": "=https://api.airtable.com/v0/{{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Base ID\"] }}/{{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Upload Table ID\"] }}",
"method": "PATCH",
"options": [],
"jsonBody": "={\n\"records\":[{\n\"id\":\"{{ $item(\"0\").$node[\"Get File ID\"].json[\"record_id\"] }}\",\n\"fields\":{\n\"Status\":\"Uploaded\"\n}\n}\n]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "airtableTokenApi"
},
"credentials": {
"airtableTokenApi": {
"id": "b1TkvXJM6AdmupUh",
"name": "Airtable Personal Access Token account"
}
},
"executeOnce": true,
"typeVersion": 4.1
},
{
"id": "833515af-bf3a-4bc7-b79c-a6c1731f4714",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
2280,
820
],
"parameters": {
"width": 319.2310328152142,
"height": 538.9310265075466,
"content": "Configuration note: update with your credentials or endpoint.",
"color": "#FFF59D"
},
"typeVersion": 1
},
{
"id": "e3cfcf21-3210-455c-b539-2dcacda3172a",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
920
],
"parameters": {
"height": 416.06551185206945,
"content": "Configuration note: update with your credentials or endpoint.",
"color": "#FFF59D"
},
"typeVersion": 1
},
{
"id": "c244d6fe-21bf-4488-9780-32b56baa9998",
"name": "Campaign is Not Empty",
"type": "n8n-nodes-base.if",
"position": [
1880,
1120
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $item(\"0\").$node[\"Get File ID\"].json[\"Campaign\"][\"0\"] }}",
"operation": "isNotEmpty"
}
]
}
},
"typeVersion": 1
},
{
"id": "ced8a7f4-4ccc-4fcf-8c13-c1b8f099283e",
"name": "Campaign Not Empty",
"type": "n8n-nodes-base.set",
"position": [
2120,
1020
],
"parameters": {
"fields": {
"values": [
{
"name": "Campaign",
"stringValue": "=\"Campaigns\":[\"{{ $item(\"0\").$node[\"Get File ID\"].json[\"Campaign\"][\"0\"] }}\"],"
}
]
},
"options": []
},
"typeVersion": 3.2
},
{
"id": "23e0a41c-cbbd-401d-88b4-a4b190dbcd72",
"name": "Campaign Not Empty1",
"type": "n8n-nodes-base.set",
"position": [
2120,
1200
],
"parameters": {
"fields": {
"values": [
{
"name": "Campaign"
}
]
},
"options": []
},
"typeVersion": 3.2
},
{
"id": "f6c40cf2-4893-42ee-859c-f430b4dc5cf1",
"name": "Read File",
"type": "n8n-nodes-base.spreadsheetFile",
"position": [
1660,
1120
],
"parameters": {
"options": {
"headerRow": true
},
"binaryPropertyName": "=data"
},
"typeVersion": 2
},
{
"id": "b7495a65-32bf-430d-9998-483582bbe6ef",
"name": "Airtable Base IDs",
"type": "n8n-nodes-base.set",
"position": [
900,
1120
],
"parameters": {
"fields": {
"values": [
{
"name": "Base ID",
"stringValue": "=appZ0qelhmC2Y9igI"
},
{
"name": "Upload Table ID",
"stringValue": "tblDzSabZcP47sIMp"
},
{
"name": "Lead Table ID",
"stringValue": "tblnsXKf3TBztlIPV"
}
]
},
"include": "none",
"options": []
},
"typeVersion": 3.2
},
{
"id": "9fa8f822-f611-4af6-a2a4-7baaf2efa82d",
"name": "Status Processing",
"type": "n8n-nodes-base.httpRequest",
"position": [
1280,
1120
],
"parameters": {
"url": "=https://api.airtable.com/v0/{{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Base ID\"] }}/{{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Upload Table ID\"] }}",
"method": "PATCH",
"options": [],
"jsonBody": "={\n\"records\":[{\n\"id\":\"{{ $node[\"Get File ID\"].json[\"record_id\"] }}\",\n\"fields\":{\n\"Status\":\"Processing\"\n}\n}\n]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "airtableTokenApi"
},
"credentials": {
"airtableTokenApi": {
"id": "b1TkvXJM6AdmupUh",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 4.1
},
{
"id": "af23a338-a9a0-49db-88de-d6eb68af2be9",
"name": "Download File",
"type": "n8n-nodes-base.httpRequest",
"position": [
1460,
1120
],
"parameters": {
"url": "={{ $node[\"Get File ID\"].json[\"File\"][\"0\"][\"url\"] }}",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"typeVersion": 4.1
},
{
"id": "4428cdc4-1ffd-4f6f-8d96-49d20b80bfba",
"name": "Create Records",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
2380,
1120
],
"parameters": {
"url": "=https://api.airtable.com/v0/{{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Base ID\"] }}/{{ $item(\"0\").$node[\"Airtable Base IDs\"].json[\"Lead Table ID\"] }}",
"method": "POST",
"options": {
"batching": {
"batch": {
"batchSize": 8
}
}
},
"jsonBody": "={\n \"records\": [\n {\n \"fields\": {\n \"FirstName\": \"{{ $json[\"FirstName\"] }}\",\n \"LastName\": \"{{ $json[\"LastName\"] || \"\"}}\",\n \"Email\": \"{{ $json[\"Email\"] || \"\" }}\",\n \"Phone\": \"{{ $json[\"Phone\"] || \"\" }}\",\n \"Company\": \"{{ $json[\"Company\"] || \"\" }}\",\n \"Title\": \"{{ $json[\"Title\"] || \"\" }}\",\n \"Country\": \"{{ $json[\"Country\"] || \"\" }}\",\n \"City\": \"{{ $json[\"City\"] || \"\" }}\",\n \"Website\": \"{{ $json[\"Website\"] || \"\" }}\",\n \"LeadSource\": \"{{ $json[\"LeadSource\"] || \"\" }}\",\n \"LeadStatus\": \"{{ $json[\"LeadStatus\"] || \"\" }}\",\n {{ $json[\"Campaign\"] }}\n \"InterestLevel\": \"{{ $json[\"InterestLevel\"] || \"\" }}\",\n \"LastContactDate\": \"{{ $json[\"LastContactDate\"] || \"\" }}\"\n\n\n }\n }\n ]\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"nodeCredentialType": "airtableTokenApi"
},
"credentials": {
"airtableTokenApi": {
"id": "b1TkvXJM6AdmupUh",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 4.1
},
{
"id": "e7a2cf60-099f-4c32-b9f0-ad2dd3d6e282",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
240
],
"parameters": {
"width": 1608.819505196552,
"height": 349.25800232621134,
"content": "Configuration note: update with your credentials or endpoint.",
"color": "#FFF59D"
},
"typeVersion": 1
},
{
"id": "dd8b54fa-15fb-4df5-b94f-8286dae7026b",
"name": "New Upload",
"type": "n8n-nodes-base.airtableTrigger",
"position": [
660,
1120
],
"parameters": {
"baseId": {
"__rl": true,
"mode": "id",
"value": "appZ0qelhmC2Y9igI"
},
"tableId": {
"__rl": true,
"mode": "id",
"value": "tblDzSabZcP47sIMp"
},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerField": "Created At",
"authentication": "airtableTokenApi",
"additionalFields": {
"viewId": ""
}
},
"credentials": {
"airtableTokenApi": {
"id": "b1TkvXJM6AdmupUh",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 1
},
{
"id": "78363718-c1c2-4bf0-ba04-a48403cca0cb",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
60,
820
],
"parameters": {
"width": 558.4226026659302,
"height": 768.2443727570767,
"content": "Configuration note: update with your credentials or endpoint.",
"color": "#FFF59D"
},
"typeVersion": 1
}
],
"connections": {
"Read File": {
"main": [
[
{
"node": "Campaign is Not Empty",
"type": "main",
"index": 0
}
]
]
},
"New Upload": {
"main": [
[
{
"node": "Airtable Base IDs",
"type": "main",
"index": 0
}
]
]
},
"Get File ID": {
"main": [
[
{
"node": "Status Processing",
"type": "main",
"index": 0
}
]
]
},
"Download File": {
"main": [
[
{
"node": "Read File",
"type": "main",
"index": 0
}
]
]
},
"Create Records": {
"main": [
[
{
"node": "Status Uploaded",
"type": "main",
"index": 0
}
],
[
{
"node": "Status Failed",
"type": "main",
"index": 0
}
]
]
},
"Airtable Base IDs": {
"main": [
[
{
"node": "Get File ID",
"type": "main",
"index": 0
}
]
]
},
"Status Processing": {
"main": [
[
{
"node": "Download File",
"type": "main",
"index": 0
}
]
]
},
"Campaign Not Empty": {
"main": [
[
{
"node": "Create Records",
"type": "main",
"index": 0
}
]
]
},
"Campaign Not Empty1": {
"main": [
[
{
"node": "Create Records",
"type": "main",
"index": 0
}
]
]
},
"Campaign is Not Empty": {
"main": [
[
{
"node": "Campaign Not Empty",
"type": "main",
"index": 0
}
],
[
{
"node": "Campaign Not Empty1",
"type": "main",
"index": 0
}
]
]
}
},
"n8n_version": "1.5.0"
}
Requirements
n8n instance, Airtable API credentials
Tags
#n8n
#automation
#workflow