DocuSign Webhooks using OttoFMS

OttoFMS from Proof+Geist can be used to receive webhooks from DocuSign and automatically download the completed PDF when it has been signed by all parties. You will need to make a few small modifications to your copy of fmESignature Link (DocuSign Edition) - we've added support for OttoFMS webhooks in v1.55 of fmESignature Link (DocuSign Edition). 

If you're using an earlier version of fmESignature Link the required changes are outlined on the OttoFMS website here and include creating a new layout, 2 new fields and 1 new script. You can copy/paste the OttoReceiver script from the v1.55 file to your file. Your new OttoReceiver layout (based on the Webhooks table) should look like this:

In the following example we will show you how to create an OttoFMS webhook to receive completed agreement notifications from DocuSign (similar to the webhookSignedEnvelope.php file). We will be using the optional eventNotification object that you can use to add a Webhook to the DocuSign envelope that will automatically send updates to the fmESignature Link file when certain events happen within DocuSign.

Once you've made the necessary changes you need to register a new webhook in the OttoFMS web console - follow the instructions here to register a new webhook.

When registering the new webhook for the fmESignature Link you can use the same FileMaker account that the webhookSignedEnvelope.php file uses here as it has the required access privileges for receiving incoming webhooks via the Data API.

When registering a new webhook you'll first be prompted to select your FileMaker file and enter the FileMaker Username and Password to use:

The webhook you create should look like the following screenshot:

Once you've registered the new webhook the OttoFMS Webhook Registry should look like this:

Once you've registered the webhook click the three dots icon to the right of the webhook entry and select View/Test to view the webhook, then click the copy button to copy the Webhook URL. The Webhook URL should look something like this:

https://otto-server-url/otto/receiver/fmESignature Link (DocuSign Edition).fmp12/docusign?apiKey=dk_yYZSGsrXmnyaf7Md9SMcYpxCF3IFB2n5

This is the URL you will enter in the Completed Event Webhook field when sending a Request - DocuSign will send a notification to that URL when the Envelope has been completed which will create a new record in the Webhooks table, the EnvelopeID field will be populated with the DocuSign Envelope ID and the Data field is populated with the complete body of the webhook JSON data and then the OttoReceiver script is performed which downloads the completed PDF. 

You can also enter this URL into the Completed Event Webhook field for the Template record so you don't need to enter this for each Request:

You can now test this is working successfully by sending another test Request to yourself from the fmESignature Link (DocuSign Edition) file - remember to enter the OttoFMS Webhook URL in the Completed Event Webhook field. Once you have completed signing for that request you can monitor the request and see if the Signed PDF and Envelope Status fields are updated automatically – this normally happens in under a minute in our experience. Each Webhook that is sent by DocuSign should also create a new record in the Webhooks table record which you can view by navigating to the Webhooks layout via the layouts menu.

Still need help? Contact Us Contact Us