Hi everyone, I've been trying to transfer email content from my IMAP integration (triggered by the imap_content event) to a Google Sheet for some time now and I'm stuck.
YAML code used:
```ymal
alias: mails transfer
description: 'Transfer IMAP emails to Google Sheet'
trigger:
- platform: event
event_type: imap_content
action: - service: google_sheets.append_sheet
data:
config_entry: XXXXXX # My specific integration ID
worksheet: Sheet1 # The exact name of my worksheet (verified multiple times)
data:
-
- "{{ trigger.event.data.text }}"
mode: single ```
I consistently receive error messages like:
Message malformed: extra keys not allowed @ data['actions'][0]['description']
Message malformed: value should be a string for dictionary value @ data['actions'][0]['action']
extra keys not allowed @ data['alias']
These errors indicate that the entire automation structure (alias, description, trigger, action, mode) is mistakenly ending up within the data parameter of the google_sheets.append_sheet service call, even though the code in the automation's YAML editor (based on my understanding and the examples shared here) appears to be correct. However, I only get the word created data transferred into my sheet.
I have tried:
- Completely deleting and re-creating the automation.
- Restarting Home Assistant.
- Preparing the YAML code in a plain text editor to avoid invisible characters.
- Various indentation attempts for the
dataparameter of the Google Sheets action. - Also used the UI editor and only populated the
datafield via YAML.
Thanks in advance for any help!