Getting Started
To get started, you need to create an account with Zapier. Sign up at zapier.com if you don’t have an account already. Once you have created an account, log into Zapier to create a Zap. A Zap is an automated workflow that tells your app to perform an action when an event happens. Every Zap has a trigger and one or more actions. A trigger is an event that starts a Zap and an action is what your Zap does for you.Add a Trigger
By using a Zap with a webhook trigger, you can catch information coming from Firmhouse and push that information to Klaviyo.Steps
- Click on Create Zap on the top left corner of your Zapier account.
- Search for Webhooks by Zapier and press Enter.
- Click on the event dropdown menu to choose an event, select Catch Hook and click Continue.
- You will see a field Pick off a child key. Leave this field empty and click Continue.
- The catch hook trigger gives you a unique URL (something like
https://hooks.zapier.com/hooks/catch/xxxxxxxx/xxxxxxx/) that you can make POST requests to. Copy this URL for use in the next steps.
Configure Webhook in Firmhouse
Now that you have your custom webhook URL generated by Zapier, it is time to create a Firmhouse webhook which will get triggered when someone completes the checkout for a subscription.Steps
- Go to your portal in Firmhouse and navigate to the Apps section located on the sidebar.
- Look for Webhooks and click Configure. You will be taken to the Outgoing webhooks page.
- Click on New outgoing webhook on the top right corner and fill out the form fields.
- In the Name field, enter the name of your webhook. For example, use Signed up.
- In the Endpoint url field, enter the URL you copied earlier from Zapier.
- Leave the Authentication type to none.
- In the Event dropdown menu, select Subscription signed up.
- In the Template field, paste the following snippet. See the Liquid tags documentation for more tags you can use.
- Click Save to save the outgoing webhook.
Test the Trigger
This step ensures the trigger works as expected.Steps
- To get your test to work correctly, you must first start a subscription in Firmhouse via your regular checkout so that a webhook will trigger towards your Zap.
- Head over to your Zapier account and click Test trigger.
- You should see a green tick and a success message that a request was found. You will also see a display of the webhook payload or the data it carries.
- Click Continue to proceed to the next stage which is setting up an action.
Set Up Zap Action
After setting up the Zap trigger correctly and passing the test, the next step is to add actions to your Zap. You will be adding two action steps: finding a subscriber in Klaviyo and updating the subscriber in Klaviyo.Add Find a Subscriber Event
Steps
- In your Zap editor, click on the plus [+] icon underneath the Zap trigger to add a new action.
- Search for the Klaviyo app and select Klaviyo.
- Click the Event dropdown menu, select Find a subscriber and click Continue.
Connect Your Klaviyo Account
Steps
- If you already have an account connected to Zapier for the Klaviyo app, select it from the account menu.
- If not, you will be asked to connect your Klaviyo account. Click on the Sign in button and you will be taken to a pop up page requesting your Klaviyo public and private API keys to allow Zapier access to your Klaviyo account.
- Sign in to your Klaviyo app and copy/create your API keys from Account Settings.
- Copy and paste the API keys on the specified fields in the pop up page and click Yes, Continue.
Set Up the Find Subscriber Action
Steps
- Now your Klaviyo account is connected with Zapier. Click Continue to set up the action. This step sets up the data you want to send over to Klaviyo. You will see dropdown menus and form fields to fill in.
- Click on the dropdown menu of the List field (required), select List and choose Newsletter as your option.
- Click on the Email field (required), then click on Catch Hook in Webhooks by Zapier dropdown menu and select Email to insert data.
- Note that the data displayed in the dropdown of Catch Hook in Webhooks by Zapier will depend on the information passed by your outgoing webhook from Firmhouse. For this tutorial, we used Email, First and Last name, Event and id. By default Zapier will display the first three data items; click Show all options to display all the data.
- You will also find an optional Create a new record if the search doesn’t find anything checkbox.
- Select the Create [item] if it doesn’t exist yet? checkbox.
- Fill in the fields with the values you want to use for the new record.
- Click Continue.
Test the Find Subscriber Action
Click on Test action to see if your action works as expected.Add Update Subscriber Event
In the next steps, you will add another action step to the workflow.Steps
- Click on the plus [+] icon to add a new action.
- Search for the Klaviyo app and select it.
- In the choose app & event dropdown menu, choose an Event by clicking on the Event field, select Update subscriber, and click Continue.
Choose Account
Steps
- Click Choose account dropdown and select your Klaviyo account which will be listed in the dropdown menu.
- Click Continue to set up the action.
Set Up the Update Subscriber Action
Steps
- Click Set up action to display the different fields to fill in.
- Click on the Subscriber field and then click the Custom tab in the dropdown menu.
- Click on Find a Subscriber in Klaviyo to expand it and select ID.
- Click outside the dropdown box to exit the Subscriber field in order to enter other fields.
- Click on the Email field, then click on Find a Subscriber in Klaviyo dropdown menu and select Email.
- Follow the same process for First name and Last name fields.
- Click Continue.
Test and Publish
Steps
- To test your Zap action, create an updated subscriber and click on Test action. If everything is done correctly, your test will pass and you can now publish your Zap.
- Click Publish to automate your workflow.