n8n
Workflow
Move Data Between Json And Spreadsheets
This n8n workflow automates tasks and integrates with various services. Move Data Between Json And Spreadsheets - ready to import and run in your n8n instance.
n8n
workflow.json
About This Script
This n8n workflow automates tasks and integrates with various services. Move Data Between Json And Spreadsheets - ready to import and run in your n8n instance.
Features:
- Makes HTTP requests to external APIs
Source Code
{
"nodes": [
{
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"position": [
560,
700
],
"parameters": {
"url": "https://randomuser.me/api/",
"options": []
},
"typeVersion": 2,
"id": "b83071ee-786d-45c9-8cf5-7969b014f1f2"
},
{
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
960,
560
],
"parameters": {
"range": "A:C",
"options": {
"usePathForKeyRow": true
},
"sheetId": "qwertz",
"operation": "append",
"authentication": "oAuth2"
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "2",
"name": "google_sheets_oauth"
}
},
"typeVersion": 1,
"id": "7a557c9a-1c87-4787-b2f3-b4dcf127af17"
},
{
"name": "Set",
"type": "n8n-nodes-base.set",
"position": [
760,
700
],
"parameters": {
"values": {
"string": [
{
"name": "name",
"value": "={{$json[\"results\"][0][\"name\"][\"first\"]}} {{$json[\"results\"][0][\"name\"][\"last\"]}}"
},
{
"name": "country",
"value": "={{$json[\"results\"][0][\"location\"][\"country\"]}}"
}
]
},
"options": [],
"keepOnlySet": true
},
"typeVersion": 1,
"id": "41b7dded-4257-4432-ac91-124aacf8dd99"
},
{
"name": "Spreadsheet File",
"type": "n8n-nodes-base.spreadsheetFile",
"position": [
960,
840
],
"parameters": {
"options": {
"fileName": "users_spreadsheet"
},
"operation": "toFile",
"fileFormat": "csv"
},
"typeVersion": 1,
"id": "a0253f19-ba3b-4321-9ce8-2b7c211f72ac"
},
{
"name": "Spreadsheet File1",
"type": "n8n-nodes-base.spreadsheetFile",
"position": [
960,
1200
],
"parameters": {
"options": []
},
"typeVersion": 1,
"id": "1d0cbfd8-d4a9-4838-813d-06403d8484ec"
},
{
"name": "Write Binary File",
"type": "n8n-nodes-base.writeBinaryFile",
"position": [
1360,
1200
],
"parameters": {
"fileName": "randomusers.json"
},
"typeVersion": 1,
"id": "262543df-9642-4c3f-aa9e-113291f1c53b"
},
{
"name": "Move Binary Data1",
"type": "n8n-nodes-base.moveBinaryData",
"position": [
1160,
1200
],
"parameters": {
"mode": "jsonToBinary",
"options": []
},
"typeVersion": 1,
"id": "ecbdd4d8-0a12-46c8-ad86-7dee58f4d394"
},
{
"name": "Gmail1",
"type": "n8n-nodes-base.gmail",
"position": [
1360,
1420
],
"parameters": {
"message": "Hello, attached is a JSON file with random user information.",
"subject": "JSON file with users",
"additionalFields": {
"attachmentsUi": {
"attachmentsBinary": [
{
"property": "data"
}
]
}
}
},
"credentials": {
"gmailOAuth2": {
"id": "16",
"name": "gmail"
}
},
"typeVersion": 1,
"id": "bcf902bf-3ef5-4df3-b09a-7fe7f91f53e9"
},
{
"name": "Google Sheets2",
"type": "n8n-nodes-base.googleSheets",
"notes": "Append data to sheet",
"position": [
1760,
1420
],
"parameters": {
"range": "A:C",
"options": {
"usePathForKeyRow": true
},
"sheetId": "qwertz",
"operation": "append",
"authentication": "oAuth2"
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "2",
"name": "google_sheets_oauth"
}
},
"notesInFlow": true,
"typeVersion": 1,
"id": "37ffaada-ac3c-42c0-a66f-f29e558a9042"
},
{
"name": "Move Binary Data2",
"type": "n8n-nodes-base.moveBinaryData",
"position": [
1560,
1420
],
"parameters": {
"options": [],
"sourceKey": "attachment_0"
},
"typeVersion": 1,
"id": "f269d774-fe98-445d-849b-209d73ccc7a4"
},
{
"name": "Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1200,
560
],
"parameters": {
"width": 320,
"height": 80,
"content": "Configuration note: update with your credentials or endpoint.",
"color": "#FFF59D"
},
"typeVersion": 1,
"id": "93240348-cf0a-4efb-9203-b14543e3feb4"
},
{
"name": "Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1200,
860
],
"parameters": {
"width": 320,
"height": 80,
"content": "Configuration note: update with your credentials or endpoint.",
"color": "#FFF59D"
},
"typeVersion": 1,
"id": "0835b3aa-e8e4-4d07-835a-5bc56e275dde"
},
{
"name": "Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
1220
],
"parameters": {
"width": 320,
"height": 80,
"content": "Configuration note: update with your credentials or endpoint.",
"color": "#FFF59D"
},
"typeVersion": 1,
"id": "90d2f743-38d9-436c-a646-d938083e610e"
},
{
"name": "Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
980,
1460
],
"parameters": {
"width": 320,
"height": 80,
"content": "Configuration note: update with your credentials or endpoint.",
"color": "#FFF59D"
},
"typeVersion": 1,
"id": "b865a99b-b54c-4965-81ed-9fc427b0cdef"
}
],
"connections": {
"Set": {
"main": [
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
},
{
"node": "Spreadsheet File",
"type": "main",
"index": 0
}
]
]
},
"Gmail1": {
"main": [
[
{
"node": "Move Binary Data2",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Spreadsheet File": {
"main": [
[
{
"node": "Spreadsheet File1",
"type": "main",
"index": 0
}
]
]
},
"Move Binary Data1": {
"main": [
[
{
"node": "Write Binary File",
"type": "main",
"index": 0
}
]
]
},
"Move Binary Data2": {
"main": [
[
{
"node": "Google Sheets2",
"type": "main",
"index": 0
}
]
]
},
"Spreadsheet File1": {
"main": [
[
{
"node": "Move Binary Data1",
"type": "main",
"index": 0
}
]
]
},
"Write Binary File": {
"main": [
[
{
"node": "Gmail1",
"type": "main",
"index": 0
}
]
]
}
},
"n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n
#automation
#workflow