json
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [250, 300]
},
{
"parameters": {
"operation": "read",
"filePath": "/path/to/financial_data.csv"
},
"name": "Read CSV",
"type": "n8n-nodes-base.readFile",
"typeVersion": 1,
"position": [450, 300]
},
{
"parameters": {
"operation": "validate",
"rules": [
{
"column": "amount",
"type": "number"
}
]
},
"name": "Validate Data",
"type": "n8n-nodes-base.validate",
"typeVersion": 1,
"position": [650, 300]
},
{
"parameters": {
"operation": "filter",
"conditions": [
{
"column": "date",
"operator": "greaterThan",
"value": "2023-01-01"
}
]
},
"name": "Filter Data",
"type": "n8n-nodes-base.filter",
"typeVersion": 1,
"position": [850, 300]
},
{
"parameters": {
"operation": "sum",
"column": "amount"
},
"name": "Calculate Total",
"type": "n8n-nodes-base.calculate",
"typeVersion": 1,
"position": [1050, 300]
},
{
"parameters": {
"operation": "average",
"column": "amount"
},
"name": "Calculate Average",
"type": "n8n-nodes-base.calculate",
"typeVersion": 1,
"position": [1250, 300]
},
{
"parameters": {
"operation": "createChart",
"type": "bar",
"data": "{{ $node['Filter Data'].json }}"
},
"name": "Generate Chart",
"type": "n8n-nodes-base.chart",
"typeVersion": 1,
"position": [1450, 300]
},
{
"parameters": {
"operation": "create",
"filePath": "/path/to/report.pdf",
"content": "{{ $node['Calculate Total'].json['result'] }}"
},
"name": "Generate Report",
"type": "n8n-nodes-base.writeFile",
"typeVersion": 1,
"position": [1650, 300]
},
{
"parameters": {
"operation": "upload",
"filePath": "/path/to/report.pdf",
"destination": "cloud_storage"
},
"name": "Upload to Cloud",
"type": "n8n-nodes-base.cloudStorage",
"typeVersion": 1,
"position": [1850, 300]
},
{
"parameters": {
"to": "user@example.com",
"subject": "Financial Report",
"body": "Please find attached the financial report.",
"attachments": ["/path/to/report.pdf"]
},
"name": "Send Email",
"type": "n8n-nodes-base.email",
"typeVersion": 1,
"position": [2050, 300]
},
{
"parameters": {
"message": "Financial report generated and sent.",
"channel": "#reports"
},
"name": "Slack Notification",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [2250, 300]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Read CSV",
"type": "main",
"index": 0
}
]
]
},
"Read CSV": {
"main": [
[
{
"node": "Validate Data",
"type": "main",
"index": 0
}
]
]
},
"Validate Data": {
"main": [
[
{
"node": "Filter Data",
"type": "main",
"index": 0
}
]
]
},
"Filter Data": {
"main": [
[
{
"node": "Calculate Total",
"type": "main",
"index": 0
}
]
]
},
"Calculate Total": {
"main": [
[
{
"node": "Calculate Average",
"type": "main",
"index": 0
}
]
]
},
"Calculate Average": {
"main": [
[
{
"node": "Generate Chart",
"type": "main",
"index": 0
}
]
]
},
"Generate Chart": {
"main": [
[
{
"node": "Generate Report",
"type": "main",
"index": 0
}
]
]
},
"Generate Report": {
"main": [
[
{
"node": "Upload to Cloud",
"type": "main",
"index": 0
}
]
]
},
"Upload to Cloud": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
},
"Send Email": {
"main": [
[
{
"node": "Slack Notification",
"type": "main",
"index": 0
}
]
]
}
}
}
Ta automatyzacja jest gotowa do wklejenia do n8N i zawiera 10 kroków, co mieści się w wymaganym zakresie.