Michael Gasch and I recently had an internal discussion with an Engineer about our VMware Event Broker Appliance (VEBA) project and they had shared some additional integration ideas that could be useful for our community. The solution was a cloud service called Zapier, that makes it easy for users (non-developers) to automate workflows across a number of web applications. In the case of Zapier, they have a catalog of over 4k+ integrations and users can also create their integration into Zapier by creating what they call a Zap.
The really cool thing about a Zap is that it can be trigged via an incoming webhook! Why is that cool, well you can probably guess from the title of this article? š
Simliar to how VEBA can easily send a notification to Slack or Microsoft Teams via a webhook, VEBA can also be used to integrate with over 4k+ apps within Zapier using this exact same pattern. In fact, the code to trigger a Zapier workflow within a VEBA function is exactly the same and it was literally copy/paste, which took me less than 5 minutes to fully implement!
The use case that I thought would be cool to demonstrate with Zapier is to react to all failed vCenter Server login attempts and automatically send that information to a Google Spreadsheet as shown in the final implementation below.
A huge benefit of using a solution like Zapier is that it simplifies the more complex integrations. One example is if you wish to integrate with Google Docs, you will need to figure out the authentication scheme and understand the required Google APIs and the finally write the code to perform the task you are interested in. With Zapier and simliar solutions, all of that is automatically handled for you and requires very little configuration, which can all be setup using the Zapier UI.
If you are interested in using Zapier or implement the solution above, take a look at the instructions below.
Step 1 - Create a new Zap and select the "Webhooks by Zapier" and specify the Trigger Event as "Catch Hook" and click on Continue. Once you have completed that step, you will be provided with the specific incoming webhook URL, this is what you will call to trigger the Zap, so make sure to save this off and not share this with anyone.
The really cool thing about setting up a custom Zap, is that you can manually test it by sending a POST (cURL or Postman) to the incoming webhook URL with your desired payload. This is also needed to map the values from your payload to the specific integration, in our case Google Spreadsheet columns.
Here is the sample JSON that I am using for my VEBA function which will extract the vSphere Username, Client IP Address and the Timestamp in which the failed vCenter Server login attempt occurred.
{ "Username": "*protected email*", "UserIP": "192.168.30.4", "TimeStamp": "2022-04-22T21:54:38.628999Z" }
Step 2 - Next select the "Google Sheets" app and then choose the "Create Spreadsheet Row" action. You will then be asked to connect your Google account and assuming you have already created a Google Sheet with following three columns: Username, UserIp and Timestamp you can then map the values from the previous step into the desired columns within your Google Sheet.
Step 3 - You are now ready to perform a final test of your Zap using the data from Step 1. Once the test has successfully completed, you can verify that a new entry has been added to your Google Sheet before enabling for use with VEBA.
Step 4 - Lastly, you can deploy the VEBA Zapier PowerShell function by following the instructions in example repo https://github.com/vmware-samples/vcenter-event-broker-appliance/tree/development/examples/knative/powershell/kn-ps-zapier
Thanks for the comment!