Hi,
I’m new working with the templates, i tried searching for a way to make it work but i only get error when trying to save this automation.
The error is Message malformed: extra keys not allowed @ data[‘actions’][0][‘sequence’][2][‘repeat’][‘foreach’]
This is the code i for the automation.
alias: "Generate shopping list"
triggers:
- trigger: conversation
command:
- I need to buy {things}
conditions: []
actions:
- sequence:
- action: google_generative_ai_conversation.generate_content
metadata: {}
data:
prompt: >-
You are a shopping assistant, you are going to receive an order with things.
All the items that are mentioned must be separated by a comma.
The items are {{trigger.slots.things}}
response_variable: response
- repeat:
foreach: "{{response.text.split(',')}}"
sequence:
- action: shopping_list.add_item
metadata: {}
data: {
name: {{repeat.item}}
}
mode: single
It’s my first post, sorry if I’m doing it wrong.