#Notify Data: key

1 messages · Page 1 of 1 (latest)

jaunty fiber
#

The keys in the data: statement depend on the notify service you are using. I have no way of knowing that. You would need to share a link to the blueprint .

quick cloak
jaunty fiber
#

So the service would need to be expecting a key to use the object you are sending it.

#

You might be able to just add a key name and the object item. Not sure what will happen, will it error, will it ignore it, will it be available in the service to do something with it, I don't know

quick cloak
#

Thanks for helping out. I think I'll have to go the trial and error route.

gaunt grove
#

you'll have to do this:

variables:
  click_action: !input notification_click_url
  url: !input notification_click_ur
  object_data:  !input object_selector 

Then in your service...

- service: "{{ notify_services_list[repeat.index-1] }}"
  data:
    message: !input notification_message
    title: !input notification_title
    data: >
      {{ dict(clickAction=click_action, url=url, **object_data) }}
#

@quick cloak