How to use dynamic variables on email templates?

DaySchedule workflow email templates can be customized with dynamic email contents to send better meeting reminders and personalized email follow-ups automatically.

You can insert the following variables dynamically when creating an email template to auto send when an event is booked. These variable must be enclosed with curly braces e.g. {{variable}}

How to use variables

  • Go to workflow and select email trigger
  • Click on any of the given template to customize

Data

Sample data from booking API available for variables

{
  "booking": {
    "_id": "6465ddb705d41673561e58e4",
    "org_id": 1386,
    "ical_uid": "[email protected]",
    "source": "dayschedule",
    "resource": {
      "resource_id": "62c680301febe90596203a33",
      "type": "event",
      "event_type": "one_on_one",
      "name": "Meeting with Vikash",
      "slug": "/meeting-with-vikash",
      "description": "Setup a 1:1 meeting with Vikash, Founder and CEO of Agenty."
    },
    "host": {
      "user_id": 1411,
      "name": "Vikash Rathee",
      "email": "[email protected]",
      "phone": "+91 9xxxxxxx",
      "avatar": null,
      "time_zone": "Asia/Kolkata"
    },
    "subject": "Priyanka and Vikash Rathee: Meeting with Vikash",
    "start_at": "2023-05-22T03:30:00.000Z",
    "end_at": "2023-05-22T03:45:00.000Z",
    "duration": {
      "type": "minutes",
      "value": 15
    },
    "time_zone": "Asia/Kolkata",
    "status": "confirmed",
    "color": "#1d76db",
    "location": {
      "name": "Google Meet",
      "type": "google_meet",
      "remarks": "Web conference using Google meet",
      "join_url": "https://meet.google.com/xgk-beei-reh"
    },
    "booking_url": "https://vikash.dayschedule.com",
    "links": [
      {
        "type": "google",
        "id": "7l1ts096vvk3h67aqcd1dtvap0",
        "url": "https://www.google.com/calendar/event?eid=N2wxdHMwOTZ2dmszaDY3YXFjZDFkdHZhcDAgdmlrYXNoLnJhdGhlZUBhZ2VudHkuY29t",
        "connection_id": "63b7e855a59cb9d4ee7c8331"
      }
    ],
    "reschedules": [],
    "attendees": [],
    "busy": true,
    "recurrence": [],
    "created_at": "2023-05-18T08:11:35.205Z",
    "updated_at": "2023-05-18T08:11:36.840Z",
    "description": "<p>Priyanka scheduled Google Meet meeting with Vikash Rathee on <a href=\"https://vikash.dayschedule.com/meeting-with-vikash\">https://vikash.dayschedule.com/meeting-with-vikash</a></p><h3>Topic: Meeting with Vikash</h3><h4>Time: May, 22 2023 9:00 am (GMT +05:30)</h4><hr/><p><strong>Name:</strong><br/>VK</p><p><strong>Email address:</strong><br/>[email protected]</p><p><strong>Mobile number:</strong><br/>+91 9xxxxxxxx</p><hr/><p><a booking_id=\"6465ddb705d41673561e58e4\" href=\"https://vikash.dayschedule.com/bookings/in_6465ddb705d41673561e58e7\">See details on DaySchedule &rarr;</a></p>",
    "checkin_url": "https://dayschedule.com/checkin/?domain=vikash&invitee_id=6465ddb705d41673561e58e7",
    "host_time": "Monday, May 22, 2023 9:00 AM (GMT +05:30)",
    "invitee_time": "Monday, May 22, 2023 9:00 AM (GMT +05:30)"
  },
  "invitee": {
    "_id": "6465ddb705d41673561e58e7",
    "booking_id": "6465ddb705d41673561e58e4",
    "org_id": 1386,
    "name": "Priyanka",
    "email": "[email protected]",
    "phone": "+91 9717302595",
    "guests": [],
    "status": "confirmed",
    "time_zone": "Asia/Calcutta",
    "token": "ZIONIIPDPG",
    "questions": [
      {
        "type": "text",
        "name": "name",
        "label": "Name",
        "value": "Priyanka"
      },
      {
        "type": "text",
        "name": "email",
        "label": "Email address",
        "value": "[email protected]"
      },
      {
        "type": "tel",
        "name": "question3",
        "label": "Mobile number",
        "value": "+91 9xxxxx"
      }
    ],
    "services": [],
    "tracking": {
      "ip": "299.xxx.xxx",
      "client": {
        "type": "browser",
        "name": "Chrome",
        "version": "113.0",
        "engine": "Blink",
        "engineVersion": ""
      },
      "os": {
        "name": "Windows",
        "version": "10.0",
        "platform": "x64"
      },
      "device": {
        "type": "desktop",
        "brand": "",
        "model": ""
      },
      "bot": null
    },
    "created_at": "2023-05-18T08:11:35.229Z",
    "updated_at": "2023-05-18T08:11:35.229Z"
  }
}

Variables

Here is the list of variables -

Note: We use popular handlebars library to merge parameters, so all the handlebars functionality will work e.g. if/else, loop, index based variable etc. So let’s say you want to use an attendee answer on your email template from the invitee.questions array. Just use the 0 based index in this format {{invitee.questions.2.value}} to merge answers on your email automatically.

Variable Example value
booking.org_id 121
booking.source dayschedule
booking.resource.resource_id xxxxx
booking.resource.type event
booking.resource.event_type one_on_one
booking.resource.name Product demo
booking.resource.slug /product-demo
booking.resource.description Welcome to my event page
booking.host.user_id 123
booking.host.name Vikash Rathee
booking.host.email [email protected]
booking.host.phone +91xxxxxxx
booking.host.avatar
booking.host.time_zone Asia/Kolkata
booking.subject Booking confirmed: Product demo - October, 01 2022 4:00 pm (GMT +05:30)
booking.start_at 2022-10-01T10:30:00.000Z
booking.end_at 2022-10-01T11:20:00.000Z
booking.time_zone Asia/Kolkata
booking.status confirmed
booking.color #006b75
booking.location.name Zoom
booking.location.type zoom
booking.location.remarks Web conference using Zoom
booking.location.join_url https://meet.google.com/kde-ktvf-jef
booking.booking_url https://meet.dayschedule.com
booking.calendars.0.type google
booking.calendars.0.id xxx
booking.calendars.0.url https://www.google.com/calendar/event?eid=xxx
booking.reschedules
booking.attendees
booking.created_at 2022-09-30T03:02:52.678Z
booking.updated_at 2022-09-30T03:02:52.678Z
booking.booking_id xxxx
booking._id xxxx
booking.description Welcome to my event page
booking.reschedule_url https://example.com/reschedule
booking.cancel_url https://example.com/cancel
invitee.booking_id 63365c5cbeb0603503e1fad7
invitee.org_id 121
invitee.name Tester
invitee.email [email protected]
invitee.guests
invitee.status confirmed
invitee.reason
invitee.time_zone Asia/Calcutta
invitee.token XXXXX
invitee.questions.0.type text
invitee.questions.0.name name
invitee.questions.0.label Name
invitee.questions.0.value Tester
invitee.questions.1.type email
invitee.questions.1.name email
invitee.questions.1.label Email address
invitee.questions.1.value [email protected]
invitee.questions.2.type tel
invitee.questions.2.name question8
invitee.questions.2.label Mobile phone
invitee.questions.2.value +91 9xxxxxxxx
invitee.questions.3.type text
invitee.questions.3.name question5
invitee.questions.3.label Your State?
invitee.questions.3.value Maharashtra
invitee.questions.4.type radio
invitee.questions.4.name question4
invitee.questions.4.label Fresher
invitee.questions.4.value No
invitee.payment.amount 479
invitee.payment.currency INR
invitee.payment.gateway Razorpay
invitee.payment.data {“account”:“acc_Er6bd9OANNyYtj”}
invitee.payment.reference_id order_KNxLxqzfBJoEjF
invitee.created_at 2022-09-30T03:02:52.686Z
invitee.updated_at 2022-09-30T03:03:48.069Z
invitee.invitee_id 63365c5cbeb0603503e1fad9

Sample template

Using variables in an email template allows you to personalize your emails and dynamically insert information specific to each recipient. For example, here is an reminder template with custom variables to insert the calendar link, and date time of an event.

Hi {{invitee.name}},

Friendly reminder about our scheduled meeting today.

Here's everything you need:

* {{booking.invitee_time}}
* {{booking.resource.name}}
* {{booking.checkin_url}}


Thanks and Regards
{{booking.host.name}}
  • {{invitee.name}}: This variable is used to insert the invitees name who booked your event. For example, it might become “Hi Vikash,” if you are sending the email to Vikash.
  • {{booking.invitee_time}}: This variable is used to insert the scheduled meeting time for the invitee. Replace it with the specific meeting time for each recipient, such as “July 12, 2023 2:00 PM.”
  • {{booking.resource.name}}: Here, you can insert the name of the event, such as “Conference Room A.”
  • {{booking.checkin_url}}: This variable can be used to provide a unique URL for each recipient to check in for the meeting. it will be auto-replaced for each recipient to send specific check-in link.
  • {{booking.host.name}}: You can personalize the sender’s name by using this variable. It will be replaced with the meeting host’s name, making it more personable. For example, in a round-robin event, the meeting can be assigned to anyone in your team, so this will help to send the reminder exact from same person who has been selected as the host by round-robin algorithm.

By incorporating these variables, you can easily customize your email content for each recipient, making your email reminders more engaging and relevant to the individual invitees.

Event ICS

You can also send the invite.ics file as attachment on email, to let your customers add an event on Google Calendar, Microsoft Outlook, Apple iPhone and other Calendars.

Use the following variable on email body to insert the attachment dynamically.

[attachment:calendar.ics]