Hi Robert,
Thank you for your response.
In the meantime, I’ve been experimenting with building my own workflows. I came to the conclusion that splitting a PDF file into smaller parts can be done efficiently using external tools, so I decided not to build that part into n8n.
Using ChatGPT as support, I created a workflow that processes uploaded PDF documents and extracts relevant requirements. However, I keep running into the following error:
Problem in node ‘Extract Text’: The item has no binary field ‘data’ [item 0]
I get the exact same error when using your workflow. According to ChatGPT, I need to reference the correct field key instead of using the default binary property name, but I can’t seem to find the field key setting anywhere in the form configuration.
I feel like I’m very close to getting it working, but I could really use some guidance on this part. Any help would be greatly appreciated.
Best regards,
Jop
{
“name”: “Extract Requirements from PDFs”,
“nodes”: [
{
“id”: “formTrigger”,
“name”: “Upload PDF(s)”,
“type”: “n8n-nodes-base.formTrigger”,
“typeVersion”: 2,
“position”: [0, 0],
“parameters”: {
“formTitle”: “Upload Multiple PDFs”,
“formFields”: {
“values”: [
{
“fieldLabel”: “Upload PDFs”,
“fieldType”: “file”,
“fieldKey”: “pdfUploads”,
“options”: {
“multiple”: true
}
}
]
}
},
“webhookId”: “upload-multiple-pdfs”
},
{
“id”: “loopFiles”,
“name”: “Loop over files”,
“type”: “n8n-nodes-base.splitInBatches”,
“typeVersion”: 1,
“position”: [250, 0],
“parameters”: {
“batchSize”: 1
}
},
{
“id”: “extractText”,
“name”: “Extract Text”,
“type”: “n8n-nodes-base.extractFromFile”,
“typeVersion”: 1,
“position”: [500, 0],
“parameters”: {
“operation”: “pdf”,
“binaryPropertyName”: “data”
}
},
{
“id”: “sendToAI”,
“name”: “Extract Requirements (AI)”,
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 1.8,
“position”: [750, 0],
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json.text }}”,
“options”: {
“systemMessage”: “You are a construction assistant. Extract all technical or functional requirements from this document. For each requirement, return: subject, description, paragraph reference (if any), and STABU code (if relevant). Output in JSON format.”
}
}
},
{
“id”: “collect”,
“name”: “Collect Results”,
“type”: “n8n-nodes-base.merge”,
“typeVersion”: 1,
“position”: [950, 0],
“parameters”: {
“mode”: “append”
}
},
{
“id”: “toExcel”,
“name”: “Export to Excel”,
“type”: “n8n-nodes-base.spreadsheetFile”,
“typeVersion”: 1,
“position”: [1150, 0],
“parameters”: {
“operation”: “writeToFile”,
“fileFormat”: “xlsx”,
“dataPropertyName”: “data”,
“options”: {
“includeEmptyRows”: false
}
}
}
],
“connections”: {
“Upload PDF(s)”: {
“main”: [[{“node”: “Loop over files”,“type”: “main”,“index”: 0}]]
},
“Loop over files”: {
“main”: [[{“node”: “Extract Text”,“type”: “main”,“index”: 0}]]
},
“Extract Text”: {
“main”: [[{“node”: “Extract Requirements (AI)”,“type”: “main”,“index”: 0}]]
},
“Extract Requirements (AI)”: {
“main”: [[{“node”: “Collect Results”,“type”: “main”,“index”: 0}]]
},
“Collect Results”: {
“main”: [[{“node”: “Export to Excel”,“type”: “main”,“index”: 0}]]
}
}
}