Automating your VRBO rental with Zapier and Smart Things: Part 2

In the previous post, we covered our motivations for automating, and the high-level of what we want.  This post will detail how to do it.

What you'll need

  1. A Smart Things hub.  Make sure your lock is already added to it and working.
  2. A ZWave lock.  I use the Kwikset 910 with ZWave card...making it essentially a Kwiket 915.
  3. Zapier account.  A free account level will work.
  4. A Zapier Parser Account.  I don't know why it's a separate account from Zapier...
  5. A Google/Gmail account.  This is used for the calendar functionality.  You can also use the filter functionality instead of a zap to forward emails.
  6. A SmartThings IDE account. 

How it works

  1. VRBO sends email about new reservation
  2. Augment reservation email with guest email and forward to a Zapier zap (#1)
  3. Zapier parses out the guest name, email, phone, check-in, and check-out dates from the email and creates a Google Calendar event for it.
  4. The calendar event sends an invite to another Zapier zap(#2) that emails the cleaners
  5. The calendar event has an email notification set for 7 days before check-in.
  6. 7 days before check-in, google sends a notification email. 
  7. The notification email is forwarded by another zap(#3) to two others: one (#4) that that emails the guest a welcome email and another (#5) that hits a Smart Things web hook.
  8. The Smart Things web hook schedules the door code to be added to the door about a day before check-in and removed about half-a-day after check-out.
  9. The guest door code is added to the door about a day before check-in.
  10. The guest door code is removed about half-a-day after check-out.
  11. The Smart Things web hook monitors door unlocks with the name "cleaners" and sends an SMS notification a few hours after use.

Zap #1: Email Parser from Zapier to Google Calendar

The first step is to setup the zap that will receive our forwarded reservation email.   It uses the Email Parser from Zapier as the trigger on a new email.  Then creates a detailed GooGle Calendar event for the action.

Trigger: New Email

The email parser sets up a new mailbox @robot.zapier.com, I chose propertyname@robot.zapier.com.  You setup the parser by sending an email to it and then highlighting the fields you want to pull out.    It's somewhat magical, but it's not perfect.  Just pull out what you need.  I had to play with it a bit to make it work right.  You'll want several reservation emails to send to it.  I created a field for user, email, phone, check-in, and check-out dates.

Action: Create Detailed event

You want to create a detailed event, using the user, email, phone, check-in, and check-out dates from the trigger.  

Put all the information in the description so its easy to parse out
Add a static time to the dates, else you'll get midnight

This is what will fire off the welcome email and locks.  10080minutes = 1 week.

The only other item worth noting is you'll want to add an invitee.  The email is the email of another zap.  For now, just pick the email address, I chose propertynameinvite@robot.zapier.com, we'll create that zap next.

Zap #2: Email Parser from Zapier to SMTP

This rule takes the "you've been invited to this event" email sent from Google Calendar and turns it into an email to your cleaning crew.

Trigger: New Email

We've created an email here of propertyinvite@robot.zapier.com, which is invited to each event from google calendar.  So, as soon as we make the event, an email is sent and we translated into a something more condensed for the cleaners.  We set up parsers again to pull out all the fields from the event invite so that we can use them in the action step.

Action: SMTP

Here, we condense just the parts we need into a nice format for the cleaners.

What I send my cleaners

Zap #3: Forward calendar notifications

One week before check-in, Google Calendar will email your GMail with a reminder.  We need to essentially bounce that email to Zapier, this rule does that.

Trigger: New Email matching search

What we watch for

Action: New Email

Set the to address to another Zapier parser address, I used propertyalert@robot.zapier.com.  Set the subject and body to be that from the original email from the trigger step.

Zap #4: Email Parser from Zapier to SMTP

This Zap takes the inbound email sent to propertyalert@robot.zapier.com and converts it to a nice email for your upcoming guest.

Trigger: New Email

Similar to the email to the cleaners, except this time it's customized for the notification email.  It pulls out name, email, phone, and dates to be used in the action.

Action: SMTP

Just fill out the fields for the email for your guest and wallah!

Zap#5: Email Parser from Zapier to Webhook

This zap warrants it's own post for setting up the webhook in smartthings.  Read on!