How to Set Up Webhooks

In this article, we'll guide you through the process of setting up webhooks within your Pabau account.

Webhooks are essential for facilitating real-time communication between different applications, enabling automation and data synchronization. 

In this article, we'll walk through a simple example of building a webhook in Zapier. However, you have the flexibility to use any other workflow automation tool you prefer. Webhooks offer a wide range of possibilities for automating your workflow, depending entirely on your objectives and use cases. In this instance, we'll guide you in setting up a webhook that will automatically update a Google Sheet with any new leads created in Pabau.

NOTE:  Third-party automation tools such as Zapier are not covered by your Pabau subscription and may require a separate subscription.

Step 1: Create a New App in Pabau

Log into your Pabau account and navigate to the "Setup" section in the left sidebar menu. Click on "Private Apps" under the "Developer & Other" section. 

Click the "New App" button to start the process. On the App Store Listing page, you'll need to fill in essential details such as the app name in the “Name” field and a description in the “Description” field. Additionally, you can upload an icon and input URLs for the Terms of Service, Privacy Policy, and Documentation.

Under “What type of app are you building?”, select "Webhook". Then, in the “What permissions should this app have?” section, choose the specific objects in Pabau that the webhook will monitor. These include Clients, Appointments, Leads, and Sales. To view the events that can be activated for each type, simply click on the arrow next to each category.

For this example, we'll focus on setting up a webhook specifically for new leads.

Once you've configured the app settings, click on “Create app” located in the top-right corner of the screen.

Step 2: Set Up the Webhook

Once your app is successfully created, you'll be directed to the new Webhooks tab. To begin setting up a webhook, click on “Create Webhook” located in the top-right corner. The URL required in the “Webhook URL” field must be generated through a third-party app. For this article, we'll use Zapier.

Head over to zapier.com and either create an account or log in if you already have one.

Next, initiate the creation of an automated workflow, called a Zap, by clicking on “Create” at the top-left corner and selecting "Zap" from the dropdown menu.

Within the Zap building interface, click on the Trigger step, which kickstarts the Zap, and choose Webhook.

Then, in the Event field, opt for “Catch Hook”.

Proceed to the Test tab on the right and copy the URL provided in the “Your webhook URL” section.

Return to Pabau and paste the copied link into the Webhook URL field. Then, specify the object type and the events you wish to monitor. In this example, we've selected "Leads" as the object type and "Created" as the event.

Click on “Save” to finalize the webhook subscription.

In the Webhooks tab, you'll find details of the subscription, including the events covered, the source, the URL, the creation date, and available actions such as testing, editing, or deleting.

Step 3: Test the Webhook

To ensure the connection between Pabau and Zapier is established, click "Test" in the Actions within Pabau Webhooks. Then, go back to Zapier and click "Test trigger" to verify the connection. If the connection is successful, you should see test lead information fields, confirming that the setup is working correctly.

With the trigger tested, let’s proceed to the next step of building the Zap - adding an action that will occur whenever the specified event triggers the Zap.

Step 4: Action Configuration

In the “Choose action” step, select the app where the action will occur. For our example, we chose Google Sheets, as we aim to transfer new leads to a Google Sheet.

Within the App & event tab, navigate to the Event field and select the action to be performed when the Zap runs. 

NOTE: The available options depend on the chosen app.

In our case, we chose “Create Spreadsheet Row” to ensure each new lead appears in a separate row within our target spreadsheet.

In the Account tab, link your Google account where the target spreadsheet resides.

In the Spreadsheet field of the Action tab, specify the spreadsheet and worksheet where you want the leads to be added.

Proceed to match the data fields from Pabau to the corresponding fields in your spreadsheet. For instance, map the Lead First Name column to Data Fname, Lead Last Name to Data Lname, Lead Date of Birth to Data DOB, Lead Created Date to Data Created Date, and Lead Email column to Data Email.

 

This mapping process ensures that the spreadsheet is dynamically populated with the relevant lead data.

Once you’ve completed the field mapping, click on Continue. Test this step by clicking on “Test step”. If everything functions correctly and your spreadsheet is populated with the test lead information fields, click on “Publish”.

From this point forward, the Zap will be live and will capture all leads created in Pabau, populating the designated spreadsheet accordingly.

Following these steps will enable you to set up webhooks in your Pabau account. Using webhooks opens the door to a variety of automation possibilities. While we've demonstrated a simple example of populating a Google Sheet with new leads, the versatility of webhooks extends far beyond this singular use case. From syncing data between applications to triggering actions based on specific events, webhooks empower you to streamline your workflow and boost productivity.

Experiment with different integrations, explore creative use cases and leverage the full potential of webhooks to revolutionize how you manage and interact with your data.


For more guides, refer to related articles below, select additional guides, or use the search bar at the top of the page. These guides will help you get the most out of your Pabau account.

Additionally, to help you fully utilize and understand your Pabau account, we recommend exploring additional guides and resources offered at the Pabau Academy. It offers in-depth video tutorials and lessons, offering a holistic learning experience that can equip you with the essential skills for achieving success with Pabau.