AutomationFlowsEmail & Gmail › Gcf Token Optimization — Encode API Data, Decode Losslessly

Gcf Token Optimization — Encode API Data, Decode Losslessly

GCF Token Optimization — Encode API Data, Decode Losslessly. Uses httpRequest, n8n-nodes-gcf. Event-driven trigger; 5 nodes.

Event trigger★★★★☆ complexity5 nodesHTTP RequestN8N Nodes Gcf
Email & Gmail Trigger: Event Nodes: 5 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

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

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

GCF Token Optimization — Encode API Data, Decode Losslessly. Uses httpRequest, n8n-nodes-gcf. Event-driven trigger; 5 nodes.

Source: https://github.com/blackwell-systems/gcf-n8n-nodes/blob/main/templates/GCF_Token_Optimization_for_LLM_Tool_Responses.json — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

Gmail Workflow. Uses gmail, googleCalendar, executeWorkflowTrigger, whatsApp. Event-driven trigger; 61 nodes.

Gmail, Google Calendar, Execute Workflow Trigger +2
Email & Gmail

This workflow ingests proof-of-delivery and completion documents from Gmail or a webhook, extracts key fields with an OpenRouter vision model, reconciles them against Google Sheets dispatch data, arch

Gmail Trigger, HTTP Request, Google Sheets +2
Email & Gmail

spy tool. Uses gmailTool, httpRequest, formTrigger, stopAndError. Event-driven trigger; 52 nodes.

Gmail Tool, HTTP Request, Form Trigger +1
Email & Gmail

Splitout Code. Uses manualTrigger, httpRequest, stickyNote, splitOut. Event-driven trigger; 46 nodes.

HTTP Request, Execute Workflow Trigger, Gmail +1
Email & Gmail

Automate CSV imports into HubSpot without the mess. Powered by n8n. Supercharged by Pollup AI.

HTTP Request, Execute Workflow Trigger, Gmail +1