Veni AI
Torna ai modelli
MODELLO WORKFLOW

Extract Key Value From JSON N8n Workflow | Operasyon için n8n Otomasyon İş Akışı Şablonu

n8n için hazır otomasyon şablonu: Extract Key Value From JSON N8n Workflow. 5 düğüm. JSON'u kopyalayıp n8n'e içe aktarın.

5 nodiExtract_Key_Value_From_Json_N8n_Workflow-workflow.json
{
"id": "LSZHMsAomkKlMfYR",
"meta": {
"instanceId": "14e4c77104722ab186539dfea5182e419aecc83d85963fe13f6de862c875ebfa"
},
"name": "📄 Extract Key Value from JSON - n8n Workflow",
"tags": [],
"nodes": [
{
"id": "9ef4197b-17d8-42aa-b771-2b151763298a",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-40,
-20
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7fa816d2-60e4-42bc-9803-3e49ceb7a4ab",
"name": "Input JSON Node",
"type": "n8n-nodes-base.set",
"position": [
140,
-20
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "{\n \"myData\": {\n \"name\": \"Alice\",\n \"age\": \"30\",\n \"city\": \"Paris\"\n },\n \"rowIndex\": \"1\"\n}\n\n"
},
"typeVersion": 3.4
},
{
"id": "c2a948b4-65b5-490d-8e4c-cdb6b39ad70e",
"name": "Find Key-Value Pair",
"type": "n8n-nodes-base.code",
"position": [
340,
-20
],
"parameters": {
"language": "python",
"pythonCode": "import json\nans=[]\nind = (_input.first().json.rowIndex)\nind=int(ind)\n\nfor i in _input.first().json.myData:\n if ind==0:\n ans.append(i)\n ans.append(_input.first().json.myData[i])\n break\n ind=ind-1\n\n# Return in valid n8n format\nreturn [{\"json\": {\"result\": ans}}]\n\n\n\n\n"
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "c2f94136-8254-44b6-abe2-39caa814b036",
"name": "Key",
"type": "n8n-nodes-base.set",
"position": [
600,
-140
],
"parameters": {
"options": {
"dotNotation": false,
"ignoreConversionErrors": true
},
"assignments": {
"assignments": [
{
"id": "243bbcc4-ff8a-4af5-b80b-96c524d33118",
"name": "result",
"type": "array",
"value": "={{ $json.result[0] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "1e6f42da-e376-463b-acc5-37a5454d55d3",
"name": "Value",
"type": "n8n-nodes-base.set",
"position": [
600,
120
],
"parameters": {
"options": {
"dotNotation": false,
"ignoreConversionErrors": true
},
"assignments": {
"assignments": [
{
"id": "5b20ed91-93b0-45b4-b555-5d7a3cff672e",
"name": "result[1]",
"type": "string",
"value": "={{ $json.result[1] }}"
}
]
}
},
"typeVersion": 3.4
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "fc8d479a-c821-44d1-9b46-f617cbfb5e25",
"connections": {
"Key": {
"main": [
[]
]
},
"Input JSON Node": {
"main": [
[
{
"node": "Find Key-Value Pair",
"type": "main",
"index": 0
}
]
]
},
"Find Key-Value Pair": {
"main": [
[
{
"node": "Key",
"type": "main",
"index": 0
},
{
"node": "Value",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Input JSON Node",
"type": "main",
"index": 0
}
]
]
}
}
}

In n8n Editor: incolla con Ctrl+VIl workflow verrà creato