AutomationFlowsData & Sheets › Fuel Balance

Fuel Balance

fuel_balance. Uses airtable. Scheduled trigger; 5 nodes.

Cron / scheduled trigger★★★★☆ complexity5 nodesAirtable
Data & Sheets Trigger: Cron / scheduled 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": "fuel_balance",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "id": "592edc8a-d0ca-4379-8580-4f0d906df72e",
      "name": "Schedule (5min)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appA5xT82tXKbH7ST",
          "mode": "list",
          "cachedResultName": "Hearthops",
          "cachedResultUrl": "https://airtable.com/appA5xT82tXKbH7ST"
        },
        "table": {
          "mode": "list",
          "value": "policies"
        },
        "options": {}
      },
      "id": "affe436a-f650-42dc-a572-80a3fde41c99",
      "name": "Read Policies",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2,
      "position": [
        224,
        0
      ],
      "alwaysOutputData": true,
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appA5xT82tXKbH7ST",
          "mode": "list",
          "cachedResultName": "Hearthops",
          "cachedResultUrl": "https://airtable.com/appA5xT82tXKbH7ST"
        },
        "table": {
          "mode": "list",
          "value": "readings"
        },
        "returnAll": false,
        "limit": 1,
        "options": {},
        "sort": {
          "property": [
            {
              "field": "=ts",
              "direction": "desc"
            }
          ]
        }
      },
      "id": "ec223a4c-967c-4040-8fa0-6e50a0413dac",
      "name": "Read Last Reading",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2,
      "position": [
        448,
        0
      ],
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// 1. R\u00e9cup\u00e9ration\nconst policiesItems = $('Read Policies').all();\nconst lastReadingItem = $('Read Last Reading').first();\n\nif (!lastReadingItem) {\n  throw new Error(\"Aucune mesure trouv\u00e9e dans Airtable.\");\n}\n\nconst lastReading = lastReadingItem.json;\n\n// 2. Config (Cl\u00e9s/Valeurs minuscules)\nconst config = {};\npoliciesItems.forEach(item => {\n  if (item.json.key) {\n      config[item.json.key] = item.json.value;\n  }\n});\n\n// 3. Constantes (Seed)\nconst HHV = config.HHV || 24;\nconst EFFICIENCY = config.EFFICIENCY || 0.82;\nconst P_MAX = config.P_max || 620;\n\n// 4. Calcul BurnRate\nconst totalDemandMW = 50; // Simul\u00e9 pour l'instant\nconst burnRate = (totalDemandMW * 3.6) / (HHV * EFFICIENCY);\n\n// 5. Mode Temp\u00eate\nlet mode = 'nominal';\nif (lastReading.value > P_MAX && lastReading.unit === 'kPa') {\n  mode = 'storm';\n}\n\n// 6. Sortie\nreturn {\n  json: {\n    ts: new Date().toISOString(),\n    sector_id: 'global_boiler',\n    percent: 100,\n    mode: mode,\n    correlation_id: lastReading.correlation_id || 'auto'\n  }\n};"
      },
      "id": "78bcee6d-d322-4570-a3d8-69c7dd577880",
      "name": "Calculate BurnRate",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        672,
        0
      ]
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appA5xT82tXKbH7ST",
          "mode": "list",
          "cachedResultName": "Hearthops",
          "cachedResultUrl": "https://airtable.com/appA5xT82tXKbH7ST"
        },
        "table": {
          "mode": "list",
          "value": "allocations"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "bc64eb0c-ebfb-4deb-921f-1149982f7eeb",
      "name": "Write Allocation",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2,
      "position": [
        880,
        0
      ],
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Schedule (5min)": {
      "main": [
        [
          {
            "node": "Read Policies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Policies": {
      "main": [
        [
          {
            "node": "Read Last Reading",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Last Reading": {
      "main": [
        [
          {
            "node": "Calculate BurnRate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate BurnRate": {
      "main": [
        [
          {
            "node": "Write Allocation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7b40ee80-8aac-43e1-9d2d-480c1a8de14e",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "QbyQEO4Vu4tMwHfG",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

fuel_balance. Uses airtable. Scheduled trigger; 5 nodes.

Source: https://github.com/QDZantoine/heart_ops_automatization/blob/44b7a3c9529e6d4c923d3631f767cca64be4dbbe/workflows/fuel_balance.json — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

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

Data & Sheets

I prepared a detailed guide that showed the whole process of integrating the Binance API and storing data in Airtable to manage funding statements associated with tokens in a wallet.

Crypto, HTTP Request, Airtable
Data & Sheets

Stop wasting hours on manual dialing and listening to ringtones. This workflow transforms your Airtable into a high-velocity AI Call Center using Vapi AI**.

Airtable, HTTP Request
Data & Sheets

Reel-Analysis-Of-Favourite-Content-Creator. Uses httpRequest, airtable. Scheduled trigger; 26 nodes.

HTTP Request, Airtable
Data & Sheets

Link-By-Reel-Analysis. Uses httpRequest, airtable. Scheduled trigger; 24 nodes.

HTTP Request, Airtable
Data & Sheets

&gt; Transform your content strategy with automated competitor intelligence

HTTP Request, Airtable, Notion +2