Zapier and Airtable work particularly well together for both integrating with other apps, and also automating processes within Airtable. However, there is a type of Zap, called a Push Zap with which many may be unfamiliar. Push Zaps require a browser 'extension' which is currently only available for Google Chrome but they provide the means of push button automation within your bases.
The Base
I'm going to base this example on my KasPer Lite base which is available from the Airtable Universe.
This is an HR Base which covers a lot of the features found in HR applications (Absence Management, Training, Appraisals, etc.) - but available for you to customise for yourself in Airtable. One of the tables in the base is an Activities table which holds a historical record of activities relating to an employee with Types you can define as a Single Select field. It could be used to record emails sent (which is how we're going to use it in this example) or for disciplinary actions, etc.
📷
The Scenario
One of the requests that managers / HR staff get all the time is confirmation of how many days holiday (vacation) they have remaining in the current leave year. What we're going to implement here is a zap which can be triggered at any time by the user which will send an email to the employee with this information and also update the employee's activity history with a copy of the email sent.
Push Zaps
Before you can run a push Zap (or test it) you need to install the Zapier extension into Google Chrome. You can find out more about Push Zaps and get a link to download the extension here:
Setting up the Zap
Firstly, I should point out that you will need a paid Zapier account in order to be able to implement this (because the Zap has more than 2 steps).
So, first, create a new Zap and select its trigger as Push (by Zapier):
📷
This type of Zap then gives you two options, Push with Text or just Push. These are very similar except that the first option also allows your user to enter some text which can then be used within your zap (for example to add a note to the automatic email being sent). We're going to choose this option:
📷
You will then need to test your Zap and this is the slightly tricky part because we are going to run this zap when the employee's record is Expanded:
📷
The reason for the expanded record is that Zapier puts the record ID of the employee into the page URL - and we can use this in our Zap. I found testing this step difficult because I needed to run the test with the Airtable page open in Chrome. I found it easiest to create the Zap in a different browser (I used Safari). Clicking the Testing option then asks you to enter some text (which we'll add to the email later):
📷
Filtering the Zap So It Only Runs for Employees
This step is needed because it would be possible for a user to click this option whatever web page they are on - and we want to limit it to when the Employee table in our KasPer Lite base is open with an employee record Expanded.
To do this we need to add a Zapier Filter step:
📷
Here, we are testing the values from the previous step (the URL of the page we were displaying). The first test looks for the ID of the table and is preceded with 'tbl'. If you look at your own base then you should be able to find the value you need.
If you had the employee in expanded view, then you should also have the employee record id shown at the end of the URL - this is always preceded with 'rec'. The combination of these should be enough to be certain that you are on the correct table with a record in expanded view.
Extracting the Employee ID from the URL
Next we need to separate the employee's record ID from the rest of the URL. This can be done using a Text option with the Zapier Formatter app. In this we are going to use the Split Text transformation to each for the 'rec' in the URL and take the remaining characters using the Last option in the Segment Index field (which is the ID we need):
📷
Finding the Employee Record
Next we need to find the employee's record so that we have access to their information (for example their name) for later use:
📷
Note that we are searching here based on a field on the employee record called RecordID and that we had to precede the ID gained from step 3 with 'rec' as the actual ID has this value at the start. This is a Formula field which holds the ID of the employee record. Often, when using Zapier with Airtable, you will find it useful to add such a field so that a specific record can be found using the ID.
So now we have all the information we need to update the employee activity and send the email.
Creating the Activity
First let's create a record in Activities to record the event:
📷
Not shown on the above screen shot is the final field, Type, which can be completed as follows:
📷
Sending the Email
The last step in this process is to actually send the confirmation email to the employee (obviously you could use any other form of notification available through Zapier:
📷
Note that I've used exactly the same values in the Email body as I had to update the Notes field in the Activities table - and here is an example of the resulting email:
📷
Summary
This is just one example of how you could use Zapier's Push Zaps feature to help automate Airtable. I hope you've found this article useful and please feel free to make any comments or suggestions!
Comments