Question

Send a SMS to a customer 1 day before an appointment date stored in HubSpot

  • 4 September 2021
  • 5 replies
  • 361 views

Userlevel 1

Hi all,

I have been struggling to get the following to work:

  1. A customer appointment date is stored in HubSpot
  2. One day before the appointment date, a SMS is sent to them to remind them of their appointment

Some notes:

  • I use ClickSendSMS for sending out text messages
  • The appointments are usually booked in 1-3 weeks before the actual appointment
  • All appointment dates are stored in HubSpot

 

How can I do this?

 

Currently, I have integration setup with Zapier that captures the appointment date from Hubspot and then send a SMS through ClickSendSMS however it triggers as soon as an appointment date is saved in Hubspot. This doesn't work well because we book appointments around 1-3 weeks before the appointment.

 

How can i send a SMS 1 day before the appointment date? Any help is much appreciated.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 2
Badge

Hi @cloak 

 

Depending on the HubSpot integration you have, there are a few ways you could handle an integration of this type.

 

One option would be add a webhook for 'appointments' into your HubSpot instance by going to 'Automation > Workflows' within your HubSpot account and set the webhook url to go to a 'webhooks by zapier' 'catch hook' Trigger.

 

This will bring through the appointment data payload including the date when booked. You can then use a 'delay until' step based on the date of appointment to Trigger an SMS.

 

Alternatively, if the appointment is associated to a HubSpot Contact, you could Trigger on an 'Updated Conact' which will fire when appointment data is added to the contact, and then add an action step to 'find associations' to bring through the connected appointment data.

Again, you can then use a delay step to delay sending an sms until the appointment date -1 day.

 

If you need any assistance with this feel free to reach out any time. 

 

Regards, Michael

Userlevel 1

Thanks Michael,

 

I have been working through this and a bit stuck at the delay bit. I have setup the following:

 

  1. Trigger - Hubspot: New Deal Property Change in HubSpot
    • Set up trigger - Property Name - Deal information: Appointment Date
  2. Action - Format: Change date from UNIX to dd-mm-yyyy (Hubspot sends through UNIX date which is not any good to send to customers).
  3. Action - Delay
  4. Action - Send SMS in ClickSendSMS

 

I’m a bit stuck with step 3. If I select the following:

Action Event: Delay Unit

Date/Time Delayed Until: ???

How should we handle dates in the past?: ???

 

How would i set this up to be delayed exactly 1 day before the appointment date? The section which is for ‘Date/Time Delayed Until’ does not let me enter in something like 1 day before etc.

Also, for appointments in the past, I would not want this to trigger as this sounds like it will end up sending appointment reminders to all my appointments which is not needed. Maybe i’m reading this wrong.

 

Thanks

Userlevel 2
Badge

Hi @cloak 

 

There are a couple of ways you can handle the desired delay and ensure this doesn't trigger for previous appointments depending on the specifics of your Trigger.

 

One way would be to add a filter step after step 2 once you have converted the date and time of your appointment. The filter would be to only continue if 'formatted date' is 'After' and then enter the current days date/time as the condition similar to below, with the current days date and time:

 

 

That way the zap only continues if the 'appointment date' is after the current days dates, ensuring it is in the future.

 

For the delay, once you have the formatted appointment date in step 2, you can enter this date in the step 4 delay (now step 4 as you may have added a filter) and modify the date using modifiers like -1d.

The following link might help in showing the required formatting:

https://zapier.com/help/create/customize/adjust-date-and-time-values-in-zaps

 

Using the above you can 'delay until' and then use the 'appointment date' -1d to ensure the SMS sends the day before the appointment time.

 

If you need any assistance with the above feel free to reach out any time.

Regards, Michael

Userlevel 1

Hi @Michael Lucas

 

Thanks for your help - I am getting closer to the end result!

 

For the ‘only continue if...’ didn't have a selection for ‘today’ or similar so what I have done is added in ‘Last Modified Date’ from Hubspot. This date is automatically updated whenever there is a change to a Hubspot record so when an appointment date is entered, it updates ‘Last Modified Date’ to the date & time of the change. I thought  this would be the best time to compare the appointment date to not trigger unless its after today (Last Modified Date).

 

I currently have this:

 

  1. Trigger - Hubspot: New Deal Property Change in HubSpot
    • Set up trigger - Property Name - Deal information: Appointment Date
  2. Action - Format: Change Appointment date from UNIX to dd-mm-yyyy (Hubspot sends through UNIX date which is not any good to send to customers).
  3. Action - Format: Change Last Modified date from UNIX to dd-mm-yyyy (Hubspot sends through UNIX date which is not any good to send to customers).
  4. Action - Filter: Only continue if… Appointment Date is After Last Modified Date (last Modified Date is always today's date when this zap is run)
  5. Action - Delay Until
  6. Action - Send SMS in ClickSendSMS

 

 

On the Delay Until section, when testing it i receive the following error:

 

 

At the bottom it says ‘Date/Time Delayed Until 2021-07-08T00:00:00+01:00’. I’m not sure why it would pick up this date (2021-07-08) as my appointment date is pulling through / formatted as 07-09-2021 as below:

 

It looks as if the Delay Until is picking up a different date or a date format - how can i fix this?

 

Also, if I have an appointment that is delayed because its a week away, does Zapier store it and remembers to send the SMS when it is 1 day before the appointment date or does something have to ‘re-trigger’ the zap? I ask as the customer record in Hubspot would not usually change so there would be nothing currently designed to re-trigger the Zap. If Zapier is storing these - where am I able to see what Zapier has stored/held back to trigger when they reach the -1 day from appointment date?

 

Quick note, I have be mentioning appointment date however in screenshots is shows as ‘Survey date’. This is the same thing, my mistake for calling it appointment date however kept using this term for consistency.

 

Thanks again.

Userlevel 2
Badge

Hi @cloak 

 

One option for the date to use rather than the 'modified' date in step 4 is the {{zap_meta_human_now}} method:

https://zapier.com/help/create/customize/insert-the-time-your-zap-runs-into-a-field

 

This will input the current date and time when the zap runs, and you can then use this in your filter step to compare the appointment date to the current date - you would then 'only continue if appointment date is after current date' to ensure you only send messages to appointments in the future.

 

The 'delay until' step using the appointment date -1 day is correct, you would simply need to ensure that date it is deducting from is using the correct format - it looks like the date you are using is mm/dd/yyyy which is causing this to minus from the wrong value.

 

Items to check would be the timezone listed in your Zapier account settings, then check any time format steps you have when converting the HubSpot time to ensure these are converting to the format you desire.

The delay -1 day will then work as required.

 

If you need any additional information feel free to reach out.

Regards, Michael