WORKFLOW · N8N
GCF Token Optimization — Encode API Data, Decode Losslessly
Coding👁 26
WORKFLOW JSON
{
"meta": {
"templateCredsSetupCompleted": true
},
"name": "GCF Token Optimization — Encode API Data, Decode Losslessly",
"tags": [
{
"name": "AI"
},
{
"name": "Token Optimization"
},
{
"name": "LLM"
},
{
"name": "Data Transformation"
}
],
"nodes": [
{
"id": "trigger",
"name": "When clicking 'Execute workflow'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
200,
300
],
"parameters": {},
"typeVersion": 1
},
{
"id": "http-request",
"name": "GET /contributors (100 records)",
"type": "n8n-nodes-base.httpRequest",
"position": [
400,
300
],
"parameters": {
"url": "https://api.github.com/repos/n8n-io/n8n/contributors?per_page=100",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "batch",
"name": "Batch into Array",
"type": "n8n-nodes-base.code",
"position": [
600,
300
],
"parameters": {
"mode": "runOnceForAllItems",
"jsCode": "const allData = $input.all().map(i => i.json);\nreturn [{ json: { payload: allData } }];"
},
"typeVersion": 2
},
{
"id": "gcf-encode",
"name": "GCF Encode",
"type": "n8n-nodes-gcf.gcf",
"position": [
800,
300
],
"parameters": {
"inputData": "payload",
"operation": "encode",
"outputField": "data",
"additionalOptions": {
"includeTokenMetrics": true
}
},
"typeVersion": 1
},
{
"id": "gcf-decode",
"name": "GCF Decode (lossless)",
"type": "n8n-nodes-gcf.gcf",
"position": [
1000,
300
],
"parameters": {
"inputData": "data",
"operation": "decode",
"outputField": "decoded"
},
"typeVersion": 1
}
],
"settings": {
"executionOrder": "v1"
},
"connections": {
"GCF Encode": {
"main": [
[
{
"node": "GCF Decode (lossless)",
"type": "main",
"index": 0
}
]
]
},
"Batch into Array": {
"main": [
[
{
"node": "GCF Encode",
"type": "main",
"index": 0
}
]
]
},
"GET /contributors (100 records)": {
"main": [
[
{
"node": "Batch into Array",
"type": "main",
"index": 0
}
]
]
},
"When clicking 'Execute workflow'": {
"main": [
[
{
"node": "GET /contributors (100 records)",
"type": "main",
"index": 0
}
]
]
}
}
}RELATED WORKFLOWS
COMMENTS
No comments yet — be the first.
