ok, I figured it out, if someone else has a problem understanding the split in batches thing, I hope this helps.
{
"nodes": [
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT account, stuff FROM some_table where do_i_care='yes';"
},
"name": "MySQL",
"type": "n8n-nodes-base.mySql",
"typeVersion": 1,
"position": [
340,
430
],
"credentials": {
"mySql": "mysql"
}
},
{
"parameters": {
"operation": "append",
"application": "someApp",
"table": "Some Table",
"options": {}
},
"name": "Add data to airtable",
"type": "n8n-nodes-base.airtable",
"typeVersion": 1,
"position": [
1200,
570
],
"alwaysOutputData": true,
"credentials": {
"airtableApi": "My Airtable"
}
},
{
"parameters": {
"values": {
"string": [
{
"name": "Data",
"value": "={{$node[\"SplitInBatches\"].json[\"account\"]}}"
}
]
},
"options": {}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1010,
570
]
},
{
"parameters": {
"batchSize": 1,
"options": {
"reset": false
}
},
"name": "SplitInBatches",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 1,
"position": [
520,
430
]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": true,
"value2": "={{$node[\"SplitInBatches\"].context[\"noItemsLeft\"]}}"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1360,
570
]
},
{
"parameters": {
"operation": "list",
"application": "SomeApp",
"table": "Some Table",
"additionalOptions": {
"fields": [
"Trunk",
"Daily Credit"
],
"filterByFormula": "=({Account} = '{{$json[\"account\"]}}')"
}
},
"name": "get data from Airtable",
"type": "n8n-nodes-base.airtable",
"typeVersion": 1,
"position": [
680,
430
],
"alwaysOutputData": true,
"credentials": {
"airtableApi": "My Airtable"
}
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{!!Object.keys($node[\"get data from Airtable\"].data).length}}",
"value2": true
}
]
}
},
"name": "data exists",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
870,
430
]
}
],
"connections": {
"MySQL": {
"main": [
[
{
"node": "SplitInBatches",
"type": "main",
"index": 0
}
]
]
},
"Add trunk to airtable": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Add trunk to airtable",
"type": "main",
"index": 0
}
]
]
},
"SplitInBatches": {
"main": [
[
{
"node": "get data from Airtable",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
null,
[
{
"node": "SplitInBatches",
"type": "main",
"index": 0
}
]
]
},
"get data from Airtable": {
"main": [
[
{
"node": "data exists",
"type": "main",
"index": 0
}
]
]
},
"data exists": {
"main": [
[
{
"node": "SplitInBatches",
"type": "main",
"index": 0
}
],
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
}
}
}