There are many integration platforms that help with connecting unrelated software to work with each other. Most popular ones include Zapier, Pabbly Connect, Make.com and Integrately. In a world where everyone uses countless apps and services, automating them to talk to each other in can be a game-changer.
But what are webhooks? They’re like the digital version of “if this, then that,” allowing you to customize how SparkReceipt interacts with other tools you use daily. This article is your guide to understanding webhooks and how they can help you in the way you use SparkReceipt, making your work life a whole lot easier and more connected.
We will use Zapier in this article, as it is the pioneer in helping create automations that connect software to each other, but the steps mentioned in this article will apply to virtually all other similar platforms as well.
Creating a webhook listener in Zapier
Register or Log into Zapier.
Click on the big “+ Create” button and select Zaps. This will take you to an initial draft of your new “Zap”, an automated task that starts from the webhook and ends in whatever other apps you need.
Select the “1. Trigger” step, and search for “Webhooks by Zapier”. Select that and a setup window will open for you.
From the “Event” dropdown, select “Catch Webhook”. If you are technologically savvy, you may also choose to catch a raw hook, but in vast majority of cases this is not necessary.
Click on “Continue”. Then, select the “Test” accordion to see the webhook URL. This is the URL you need to enter to SparkReceipt to listen to changes in your documents.
For the first step, you should create a webhook listener in Zapier or other integration management tool of your choice.
Setting up the Zapier webhook in SparkReceipt
Enter your Zapier’s or other tool’s webhook URL into this setting in SparkReceipt.
Log into the SparkReceipt web application.
From the top right menu, select “Integrations”.
From the “Webhook” section, click on “+ Add webhook” and copy paste the URL from the previous section here. Also make sure the “Enabled” checkbox is checked.
SparkReceipt will now call the webhook on every document creation, update and deleted event. By default the webhooks are delayed by 10 minutes so you will have ample time to fill any missing details you want to the receipt, invoice or other document before it is sent for automations.
Next, scan or create a test receipt to generate a webhook event. After scanning, navigate back to the Integrations -> Webhooks and select “Event log”. You should now see an upcoming webhook event in “Queued” status. Click on “Send now” to trigger it immediately.
Back in the Zapier app, you should now have an example event to work with. Select the “Response A” and click on “Continue with selected record”.
Now you can start building your automations with this example record.
Uploading receipt scans to Google Drive
If you want to automatically upload every file added to SparkReceipt to your Google Drive folder, you can create an automation for that. First, since you probably only want to do this on document creation, and not on every update, first click on “+ Add step” and select “Filter”.
I recommend the following two filter parameters:
“Entity” exactly equals “document”
“Event” exactly equals “created”
(Optional) “Document Primary Category” exactly equals “expense”
This ensures that if additional webhooks events are added to SparkReceipt in the future, this will filter them out of this automation. Also, the second condition ensures that the automation only executes on document creation. Zapier allows you to test the conditions, so do that to ensure that the setup is correct. If the expense filter is added, then the automation will only run for expenses, and not other types of documents.
Use these filter parameters to only upload files to Google Drive when a new document is created.
Then, again create a new step, and from the list of apps select Google Drive. From the event dropdown, select “Upload a file”. In the Account section, Connect Zapier with your Google account if necessary. In the Action section, you will connect the webhook event to the file upload like this:
Choose a drive from the list.
Select a folder to where you would like to upload your receipts and documents. This can also be based on the webhook data, e.g. the document date field.
In the File field, connect the “Document Files URL” field from the 1. Catch Hook phase here. It is a (short-lived) public URL to the file that allows Google Drive to download it.
(Optional) Generate a custom file name based on receipt details. You may choose to generate a filename from the webhook response fields. One popular approach is to name the file based on the fields “{{document date}} {{document name}} {{total value}}”.
The most important connection here is the “Document Files Url” parameter in the webhook field data.
Now every new receipt, invoice or document you upload are automatically also backed up to Google Drive.
Creating a bill in Quickbooks Online
Quickbooks Online is strict about vendors. That is why a Find Vendor step is crucial to connect between SparkReceipt and QB Online.
If you use Quickbooks Online to manage your books, here is a short summary of how you could add every new bill automatically there.
If you did not create a Filter step already in the previous chapter, make one now with the following parameters.
Enter the following filter parameters:
“Entity” exactly equals “document”
“Event” exactly equals “created”
“Document Primary Category” exactly equals “expense”
Then, add a step to your zap with the small “+” button, then search for Quickbooks Online.
Since Quickbooks is very strict that the Vendor for every bill is registered / added to the system, the first automation event should be “Find Vendor”. This will allow us to match the loose vendor name from SparkReceipt to a strict vendor record in Quickbooks. Select the “Find Vendor” event and click Continue.
In the Account section, connect to your Quickbooks Online account.
In the Action section, connect “Document Name” from the “1. Catch Webhook” step to the “Full name” field. Also enable the “Create QuickBooks Online Vendor if it doesn’t exist yet?” option to force-create a vendor if one is not found. Test the step to receive an example vendor record based on your receipt.
Again, add a step with the “+” button, find Quickbooks Online, and in the event select “Create bill (Account Based)”.
In the Action section, to the “* Vendor” field connect the ID from the previous Find Vendor step’s response.
Connect the vendor found or created in the previous step here.
Then you can connect any matching fields with the Quickbooks equivalents. The exact setup will vary depending on your Quickbooks account, but you should connect at least the following fields:
Transaction date -> Document Date
Currency -> Document Currency
Line Item
Description -> Description
Amount -> Document Total
Also note that “Account” is required. You may choose uncategorized, or create a “Find Account” step where you’ll match the SparkReceipt category with your Quickbooks Online account equivalent. Here you’ll need to just make sure that a match is found in Quickbooks Online, otherwise the step will fail.
We also have a dedicated Quickbooks Online and Xero integrations planned in the near future roadmap of SparkReceipt, so if that interests you, stay tuned!
Conclusion
The webhooks in SparkReceipt is a fairly recent feature addition, so it is still in active development, and we’d love to hear about any problems you face in creating your automations.
Please send an email to sparkreceipt@valorbyte.com with any requests, bug reports or questions about the webhooks feature.