See llms.txt for all machine-readable content.

Gmail and Home Assistant integration

Save yourself the work of writing custom integrations for Gmail and Home Assistant and use n8n instead. Build adaptable and scalable Communication, HITL, workflows that work with your technology stack. All within a building experience you will love.

How to connect Gmail and Home Assistant

Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Gmail and Home Assistant integration: Create a new workflow and add the first step

Import E.ON W1000 energy meter data to Home Assistant with Spook integration

UPDATES: 2025-12-03 fix JS code in calculate hourly sum node E.ON W1000 → n8n → Home Assistant (Spook) “Integration” This workflow processes emails from the E.ON portal containing 15-minute +A -A (import/export) data and daily 1.8.0 2.8.0 meter readings. It extracts the required columns from the attached XLSX file, groups the 15-minute values by hour, then: updates the Spook/Recorder statistics under the IDs sensor.grid_energy_import and sensor.grid_energy_export, and sets the current meter readings for the entities input_number.grid_import_meter and input_number.grid_export_meter. > You may need to modify the workflow if there are changes in how E.ON sends scheduled exports. If the exported data format changes, please report it on Github! Requirements n8n (cloud or self-hosted) HACS addon available here: Rbillon59/home-assistant-addons Official n8n Docker Compose template Simplified n8n Docker Compose template available on Github (For Gmail) Gmail API authentication (OAuth2) read-only email access to the account receiving the messages Setup guide available here (For IMAP) IMAP provider credentials Home Assistant access via Long-Lived Access Token or API key Setup guide available here Spook integration Documentation and installation guide available here E.ON Portal Setup Create a scheduled export on the E.ON portal with the following parameters: Under the Remote Meter Reading menu, click on the + new scheduled export setting button. Specify POD identifier(s): choose one of the PODs you want to query. Specify meter variables: select the following: +A Active Power Consumption -A Active Power Feed-In DP_1-1:1.8.0*0 Active Power Consumption Daily Reading DP_1-1:2.8.0*0 Active Power Feed-In Daily Reading Export sending frequency: daily Days of historical data to include: recommended 7 days to backfill missed data. Email subject: by default, use EON-W1000]. If processing multiple PODs with the workflow, give each a unique identifier. Home Assistant Preparation Create the following input_number entities in configuration.yaml or via Helpers: [Helpers input_number: grid_import_meter: name: grid_import_meter mode: box initial: 0 min: 0 max: 9999999999 step: 0.001 unit_of_measurement: kWh grid_export_meter: name: grid_export_meter mode: box initial: 0 min: 0 max: 9999999999 step: 0.001 unit_of_measurement: kWh > If you name the entities differently, make sure to reflect these changes in the workflow. Create the following template_sensor entities in configuration.yaml or via Helpers: Segéd entitások input_number: grid_import_meter: name: grid_import_meter mode: box initial: 0 min: 0 max: 9999999999 step: 0.001 unit_of_measurement: kWh grid_export_meter: name: grid_export_meter mode: box initial: 0 min: 0 max: 9999999999 step: 0.001 unit_of_measurement: kWh >If you name the entities differently, make sure to reflect these changes in the workflow. create the following template_sensor entities in config.yaml or via Helpers: Segéd entitások template: sensor: name: "grid_energy_import" state: "{{ states('input_number.grid_import_meter') | float(0) }}" unit_of_measurement: "kWh" device_class: energy state_class: total_increasing name: "grid_energy_export" state: "{{ states('input_number.grid_export_meter') | float(0) }}" unit_of_measurement: "kWh" device_class: energy state_class: total_increasing > If you name the entities differently, make sure to reflect these changes in the workflow. n8n import and authentication importing the workflow In n8n → Workflows → Import from File/Clipboard → paste the JSON. Select the downloaded JSON and paste it into a new workflow using Ctrl+V. Set up n8n Credentials The credentials must be configured in the Home Assistant and Gmail nodes. The setup process is described in the Requirements section.

Popular ways to use the Gmail and Home Assistant integration

Build your own Gmail and Home Assistant integration

Create custom Gmail and Home Assistant workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Gmail supported actions

Home Assistant supported actions

Gmail and Home Assistant integration details

Gmail

Gmail

Gmail is a free of charge email service offered as part of Google Workspace. It is used by individuals and organizations to send and receive emails and communicate internally and externally. It remains the world’s most widely used email service.

Home Assistant

Home Assistant

Home Assistant is an open-source home automation service that provides local control and privacy. It is powered by a global community of DIY enthusiasts and tinkerers. Perfect for use on a local server or a Raspberry Pi.

FAQ about Gmail integrations

Need help setting up your Gmail and Home Assistant integration?

Discover our latest community's recommendations and join the discussions about Gmail and Home Assistant integration.

  • jake chard

    How do I remove n8n Email footer in Gmail node send message?

    jake chard

    Each email sent has “This email was sent automatically with n8n” in the footer or after the email. How do I remove this please?

    Open topic
  • Jan Koch

    Sending attachment via Gmail

    Jan Koch

    Describe the problem/error/question I am trying to send an email with an attachment using the Gmail node and get an error that I don’t understand. I am able to download that file from the original email and upload it to …

    Open topic
  • FawenYo

    Failed to send Gmail attachment

    FawenYo

    Describe the problem/error/question I’m trying to send an HTML file in the Gmail attachment, but it just raise an error. This question is similar to Sending attachment via Gmail , but I just couldn’t get it work …

    Open topic
  • Jean-Pierre GARNIER

    Gmail node subject text encoding issue

    Jean-Pierre GARNIER

    Describe the problem/error/question Hi, I’m facing an encoding problem while sending email with gmail node for every char with and accent (é,à,ô,î…). I noticed that this problem doesn’t occurs when i’m directly writing …

    Open topic
  • Anirudh Tugawe

    Update Google Sheets After sending Email

    Anirudh Tugawe

    Hi everyone, I’m working on a workflow where I’m using Google Sheets to get input data. I have a loop set up that correctly reads the data and processes it: it takes a Word document template, app…

    Open topic

Looking to integrate Slack and VirusTotal in your company?

Trusted by teams building smarter workflows.

Why

Why use n8n to integrate Gmail with Home Assistant

Handle branching, merging and iteration easily. Pause your workflow to wait for external events.

Re-run single steps to test changes in no time. And pin your data to avoid generating trigger events every time you execute.

Your data is displayed alongside your settings, making edge cases easy to track down.

Use 1000+ workflow templates available from our core team and our community.

Copy and paste, easily import and export workflows.

Simple enough to 
understand + sophisticated 
enough to ship