Using DocuSign Webhooks to Push Completed PDF files to FileMaker Server

Earlier this year we wrote about how you can integrate FileMaker with DocuSign, the leading electronic signature platform, to automate the electronic document signing workflow using the FileMaker platform. In that article and video we demonstrated how you could generate a PDF from a FileMaker layout with merge fields then send a document signing request to the recipient using the DocuSign API, all from within FileMaker Pro.

At the time we were manually downloading the completed/signed PDF from DocuSign once we received the email notification from DocuSign that it had been completed. Since that article we done a number of FileMaker/DocuSign integrations and had some requests to automate the downloading of the completed PDF so users don’t need to manually download this. There’s two main options available here – Polling or Webhooks:

  • Polling involves making a request to DocuSign for the current status of an envelope. For example you could create a FileMaker Server scheduled script to run periodically to check the status of a DocuSign request, and then if it is completed download the final PDF. You are limited to checking the status of each envelope to once every 15 minutes – polling rates are checked by DocuSign and exceeding this limit can lead to failures with the automated review process
  • Webhooks are the preferred option as DocuSign can automatically notify you when the status of a DocuSign envelope changes. You don’t have to make unnecessary polling requests to continually check the status of an envelope – DocuSign will notify your application via the URL you specify when setting up your particular webhook.

In our experience we receive the Webhook notification within 15-30 seconds on average after the event without having to make any requests to DocuSign. We just wait for the notification from DocuSign that a request has been completed and then download the completed PDF into a FileMaker container field. We’ve written about how we use Webhooks for some of our other solutions, including XeroWooCommerce and Shopify to be automatically notified of specified events, such as a new online order or a customer payment. Using DocuSign Webhooks is another example of how you can automate your business workflows and remove any unnecessary polling requests.

Here’s a short video showing the ‘Envelope Signed/Completed’ Webhook in action (you can also watch it on YouTube here):

If you would like to discuss integrating DocuSign with your FileMaker solution please get in touch for a free initial consultation to discuss your requirements.

 

Webhooks are coming to Xero

Earlier this year Xero announced that Webhooks would be coming to the Xero API, which was exciting news for Xero developers who have been asking for webhooks support for a long time (there is a request from 2010 in the Xero API Customer Feedback site!). Webhooks allow you to subscribe to certain events that happen in Xero: the Contacts endpoint was the first to receive webhooks support and Xero have said they will quickly move to Invoices and other high-use endpoints (hopefully including Payments which our customers would love).

The events that are currently support for the Contacts endpoint are:

  1. Create: A new contact has been created
  2. Update: An existing contact has been updated (including when contacts are archived)

When one of these events are triggered the Xero API sends a HTTPS POST to the webhook’s configured URL – you can then perform the appropriate actions based on the contents of the webhook payload, such as creating a new contact or updating an existing contact in FileMaker.

Xero started a closed beta for the Contacts webhooks which Databuzz was lucky enough to be invited to join and we’ve been working on ways to implement webhooks with our fmAccounting Link (Xero Edition) solution, initially using the FileMaker PHP API. Databuzz has been working with webhooks for many years, for example adding webhooks support to our fmEcommerce Link (WooCommerce Edition) solution to allow new orders to be pushed automatically, and to fmSMS to allow incoming messages to be pushed to FileMaker without requiring users to download these manually. Adding webhooks support to our fmEcommerce Link solution was fairly straightforward – we created a PHP file that uses the FileMaker PHP API and processes the webhook payload to update the existing contact or create a new Contact as required.

We still need to polish these off but we wanted to demonstrate how you could use Contacts webhooks (and Invoices and other endpoints that are supported in the future) with our fmAccounting Link (Xero Edition) solution. If Contacts are created or updated directly in Xero and you need to make the same updates in your FileMaker solution web hooks will save you having to either re-enter these manually or downloads these from Xero via the Xero API.

Check out our video below (or on YouTube) that shows how you can use webhooks to have updates from Xero pushed automatically to fmAccounting Link (Xero Edition) (or your FileMaker solution that you have integrated this into). If you have any questions about webhooks and Xero please post them in the comments below or contact us directly.

Update November 30, 2017: webhooks for Invoices are now available.