Hello,
I am using the Get Events service on a Google Calendar, which retrieves my a list of events and stores them in a variable I named ‘response’
service: calendar.get_events
metadata: {}
data:
start_date_time: "2024-02-29 00:00:00"
end_date_time: "2024-03-06 23:59:00"
target:
entity_id: calendar.example_gmail_com
response_variable: response
I am returned with following data:
context:
id: {removed}
parent_id: {removed}
user_id: null
response:
calendar.example_gmail_com:
events:
- start: '2024-02-29T07:00:00+01:00'
end: '2024-02-29T08:00:00+01:00'
summary: RECYCLING BAG
- start: '2024-03-02T07:00:00+01:00'
end: '2024-03-02T08:00:00+01:00'
summary: Black Bag
I am trying to iterate over the events listed using a For each, in the repeat scope
repeat:
sequence: []
for_each: "{{response.calendar.example_gmail_com.events}}"
Although I can see the data there and I know the variable exists with those attributes, I keep getting the error:
Error: UndefinedError: ‘dict object’ has no attribute ‘calendar’
How can I succesfully access the list under events, stored inside my response variable.
Thank you in advance