AutomationFlowsGeneral › Weekly Energy Report: API to Email & Google Drive

Weekly Energy Report: API to Email & Google Drive

Original n8n title: Generate Weekly Energy Consumption Reports with Api, Email and Google Drive

Generate Weekly Energy Consumption Reports with API, Email and Google Drive. Uses httpRequest, convertToFile, emailSend, googleDrive. Scheduled trigger; 12 nodes.

Cron / scheduled trigger★★★★☆ complexity12 nodesHTTP RequestEmail SendGoogle Drive
General Trigger: Cron / scheduled Nodes: 12 Complexity: ★★★★☆ Added:

This workflow follows the Emailsend → Google Drive recipe pattern — see all workflows that pair these two integrations.

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
{
  "id": "5if9twDNChTpUQFf",
  "name": "Generate Weekly Energy Consumption Reports with API, Email and Google Drive",
  "tags": [],
  "nodes": [
    {
      "id": "4827c44f-1995-4cd9-837f-f06c55ce9697",
      "name": "Schedule Weekly (Mon 8AM)",
      "type": "n8n-nodes-base.cron",
      "position": [
        -200,
        200
      ],
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "hour": 8,
              "mode": "everyWeek",
              "weekday": "monday"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "028bf36b-a75b-474d-a596-dcd8f4db7c20",
      "name": "Fetch Energy Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        20,
        200
      ],
      "parameters": {
        "url": "https://api.energidataservice.dk/dataset/ConsumptionDE35Hour",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "f0fa171b-52b2-4350-8d0f-808117715e30",
      "name": "Normalize Records",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        200
      ],
      "parameters": {
        "jsCode": "const itemlist = $input.first().json.records;\nreturn itemlist.map(r => ({ json: r }));"
      },
      "typeVersion": 2
    },
    {
      "id": "a47b2980-6da2-4dbc-bb09-d23d4b936d9f",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        460,
        200
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "613baa2d-3929-4e88-aa65-5303860dcfb4",
      "name": "Send Email Weekly Report",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        680,
        100
      ],
      "parameters": {
        "text": "Please find attached the latest weekly energy consumption report.",
        "options": {},
        "subject": "Weekly Energy Consumption Report",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com",
        "attachments": "=data"
      },
      "typeVersion": 1
    },
    {
      "id": "588f3a86-3932-499f-b3aa-e60cbc2c8ebd",
      "name": "Report File Upload to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        680,
        300
      ],
      "parameters": {
        "name": "=energy_report_{{ $now.format('yyyy_MM_dd_HH_ii_ss') }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "7c910c92-a9d4-4a2e-9e91-69d859ea633f",
      "name": "Sticky: Node Explanations1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        40
      ],
      "parameters": {
        "width": 160,
        "height": 120,
        "content": "\ud83d\udcdd - **Schedule Weekly (Mon 8AM)**: Trigger every Monday at 8AM."
      },
      "typeVersion": 1
    },
    {
      "id": "ff3f08c5-430d-4b3e-8ef5-f3f93d32efe7",
      "name": "Sticky: Node Explanations2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        40
      ],
      "parameters": {
        "width": 160,
        "height": 120,
        "content": "\ud83d\udcdd - **Fetch Energy Data**: Call EnergiDataService.dk API."
      },
      "typeVersion": 1
    },
    {
      "id": "1627fcfa-d1f6-40f5-90dd-0352b2a6fb63",
      "name": "Sticky: Node Explanations3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        40
      ],
      "parameters": {
        "width": 160,
        "height": 120,
        "content": "\ud83d\udcdd - **Normalize Records**: Flatten JSON response (records \u2192 items)."
      },
      "typeVersion": 1
    },
    {
      "id": "48440a87-317b-47e4-808c-b07e6411bdd0",
      "name": "Sticky: Node Explanations4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        40
      ],
      "parameters": {
        "width": 160,
        "height": 120,
        "content": "\ud83d\udcdd - **Convert to File**: Turn items into a CSV (binary `data`)."
      },
      "typeVersion": 1
    },
    {
      "id": "dd003fb3-dccc-4e2f-90d4-f9acbdcca301",
      "name": "Sticky: Node Explanations5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        -40
      ],
      "parameters": {
        "width": 160,
        "height": 120,
        "content": "\ud83d\udcdd - **Email Weekly Report**: Email the CSV file."
      },
      "typeVersion": 1
    },
    {
      "id": "2f2425e1-86d2-499c-be72-3f42d723385c",
      "name": "Sticky: Node Explanations6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        500
      ],
      "parameters": {
        "width": 160,
        "height": 120,
        "content": "\ud83d\udcdd - **Upload File to Drive**: Save CSV to Google Drive."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c9007e5b-7c88-4384-97bf-12dff0a2672c",
  "connections": {
    "Convert to File": {
      "main": [
        [
          {
            "node": "Send Email Weekly Report",
            "type": "main",
            "index": 0
          },
          {
            "node": "Report File Upload to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Energy Data": {
      "main": [
        [
          {
            "node": "Normalize Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Records": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Weekly (Mon 8AM)": {
      "main": [
        [
          {
            "node": "Fetch Energy Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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

How this works

Save time each week by automating the creation and distribution of energy consumption reports, ensuring you always have the latest insights into usage patterns without manual effort. This workflow suits energy managers, facility administrators, or small business owners tracking utility data to optimise costs and sustainability. It fetches consumption figures via an API, processes them into a readable format, and handles delivery through email and Google Drive storage as the pivotal step in streamlining your reporting routine.

Use this workflow when you need consistent, hands-off weekly summaries from a reliable energy API, particularly if your team relies on email notifications and cloud backups for compliance or quick access. Avoid it for real-time monitoring or non-weekly cadences, as the cron trigger is fixed to Mondays at 8am; for daily reports, adjust the schedule accordingly. Common variations include adding data visualisation nodes for charts or integrating with spreadsheet tools like Google Sheets for further analysis.

About this workflow

Generate Weekly Energy Consumption Reports with API, Email and Google Drive. Uses httpRequest, convertToFile, emailSend, googleDrive. Scheduled trigger; 12 nodes.

Source: https://github.com/kimjutu1996/n8n-Generate-weekly-energy-consumption-reports-with-EnergiDataService-email-and-Google-Drive/blob/main/main.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

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

General

Amazon Product Price Tracker. Uses googleSheets, splitInBatches, httpRequest, emailSend. Scheduled trigger; 16 nodes.

Google Sheets, HTTP Request, Email Send
General

Weekly hiring‑manager snapshot from Breezy HR to email (pipeline, next‑week interviews, stuck). Uses httpRequest, emailSend. Scheduled trigger; 12 nodes.

HTTP Request, Email Send
General

Weekly Business Report. Uses httpRequest, emailSend. Scheduled trigger; 5 nodes.

HTTP Request, Email Send
General

This template creates a nightly backup of all n8n workflows and saves them to a Google Drive folder. Each night, the previous night's backups are moved to an “n8n_old” folder and renamed with the corr

Move Binary Data, Google Drive, Item Lists +1
General

Code Itemlists. Uses stickyNote, moveBinaryData, googleDrive, itemLists. Scheduled trigger; 33 nodes.

Move Binary Data, Google Drive, Item Lists +1