visit
{
"message":{
"to":{
"email":"[email protected]"
},
"content":{
"title":"Password Reset!",
"body":"Hi Bruce, here is your temporary password: {{new_password}}"
},
"data":{
"new_password":"hf73*sh1!hfshjsk"
},
"routing":{
"method":"single",
"channels":[
"email"
]
}
}
}
{
"message": {
"to": {
"email": "[email protected]"
},
"content": {
"elements": [
{
"type": "meta",
"title": "Citizen in Need"
},
{
"type": "text",
"content": "Hey Bruce, {{citizen_name}} is in need of assistence!"
},
{
"type": "action",
"style": "button",
"content": "Directions",
"href": "{{directions_to_incident}}"
},
{
"type": "image",
"src": "{{citizen_image}}",
"href": "{{citizen_profile}}",
"align": "center",
"altText": "{{citizen_name}} Image"
}
]
},
"data": {
"citizen_name": "Distressed Damsel",
"citizen_profile": "www.bat-signal.com/profile/distressed-damsel",
"citizen_image": "www.bat-signal.com/profile/distressed-damsel/profile.png",
"directions_to_incident": "//www.google.com/maps/dir/ghct"
},
"routing": {
"method": "all",
"channels": [
"email",
"sms",
"slack",
"push"
]
}
}
}
{
"message":{
"to":{
"email":"{{citizen_email}}"
},
"content":{
"title":"Rescue Feedback Survey",
"elements":[
{
"type":"text",
"content":"Hi {{citizen_name}}, we're so happy that your rescue was successful!
Please complete this survey and tell us how we did.",
"if":"data.rescue_success === true"
},
{
"type":"text",
"content":"Hi {{citizen_name}}, we're so sorry that your Batman was not able to provide you
with a successful rescue. Please complete this survey and tell us how we did.",
"if":"data.rescue_success === false"
},
{
"type":"action",
"style":"link",
"content":"Complete Survey",
"href":"{{survey_link}}"
}
]
},
"data":{
"citizen_name":"Distressed Damsel",
"citizen_email":"[email protected]",
"survey_link":"//bit.ly/3BFUief"
},
"routing":{
"method":"single",
"channels":[
"email"
]
}
}
}
We've also put together an to show what notifications built with Elemental look like in a real codebase.