Append sheet
Use this action to add rows of data to the Google Sheets document that was created when you set up the integration. This is handy for storing data from Home Assistant for further processing, for example, logging energy usage over time.
Using this action from the user interface
If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You pick what to target, tweak a few options, and save. No YAML knowledge required.
To append data from an automation or a script:
- Go to Settings > Automations & scenes.
- Open an existing automation or script, or select Create automation > Create new automation.
- If you’re setting up a new automation, add a trigger in the When section. Scripts don’t need a trigger. They run when something else calls them.
- In the Then do section, select Add action.
- From the search box, search for and select Google Sheets: Append sheet.
- Under Integration, select the Sheet you want to add to.
- Optionally, set the Worksheet and whether to add a Created column.
- Set the Data to append.
- Select Save.
This action does not support targets. You select the document through the Config entry field instead of choosing an area, device, entity, or label.
Options in the UI
Whether to add a created column with the date and time to the appended data.
Using this action in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, refer to this action as google_sheets.append_sheet. A basic example looks like this:
action: google_sheets.append_sheet
data:
config_entry: 1b4a46c6cba0677bbfb5a8c53e8618b0
worksheet: "Car Charging"
add_created_column: false
data:
Date: "{{ now().strftime('%-d-%b-%y') }}"
KWh: "{{ states('input_number.car_charging_kwh') | float(0) }}"
Cost: "{{ states('input_number.car_charging_cost') | float(0) }}"
This appends a single row with the date, energy, and cost.
Options in YAML
Whether to add a created column with the date and time to the appended data.
Try it yourself
Ready to test this? Open Developer tools > Actions, search for this action, fill in the fields, and select Perform action. You see what happens on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] without writing a line of YAML.
Automation: append multiple rows at once
You can append more than one row in a single call by passing a list of mappings as the data.
YAML example for appending multiple rows
action: google_sheets.append_sheet
data:
config_entry: 1b4a46c6cba0677bbfb5a8c53e8618b0
worksheet: "Car Charging"
data:
- Item: "Car 1 cost"
Cost: "{{ states('input_number.car_1_charging_cost') | float(0) }}"
- Item: "Car 2 cost"
Cost: "{{ states('input_number.car_2_charging_cost') | float(0) }}"
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.
Related actions
These actions work well alongside this one:
- Get sheet: Retrieves rows of data from a Google Sheets document.