DocuSign Webhooks Using Claris Connect
You can use Claris Connect to create a flow to handle incoming notifications from DocuSign when an agreement has been completed. This is a much simpler process than using the supplied PHP file for the FileMaker Data API as you don't need to worry about hosting the php file and dealing with web servers and PHP configuration changes etc. You can setup a new Claris Connect Flow in a few minutes which can receive updates from DocuSign and automatically download the completed PDF when it has been signed by all parties.
For information on the supported versions of FileMaker Server/FileMaker Cloud and other minimum requirements please see our Claris Connect Webhooks FAQ article.
In the following example we will show you how to create a Claris Connect flow 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.
N.B. in the following example we are creating a custom webhook notification flow and not using the Claris Connect DocuSign App. Creating a custom flow allows us to test this in the developer/Sandbox environment and easily replicate the functionality of the webhookSignedEnvelope.php file. You can if you prefer use the Claris Connect DocuSign App instead.
To setup a new Claris Connect Flow to automatically receive the completed PDF when it has been signed by all parties in DocuSign:
1. login to Claris Connect and create a new Project and give the Project a Name (e.g. Download DocuSign Completed PDF)
2. click the Webhooks button on the left to create a new Webhook that we can use for receiving the completed PDF:
Click the Create a webhook button to create a new Webhook for your Project
2. you will then be prompted to enter a webhook name that will appear in the URL. Enter your preferred name (e.g. getDocuSignPDF) and click the Create button:
A new webhook will be created showing the URL for this webhook:
Make a note of the URL and copy this somewhere else as you will need to enter this into your fmESignature Link (DocuSign Edition) Request record.
3. now that the webhook has been created click the Flows button on the left to create a new flow for this webhook. Search for HTTP in the list of triggers:
Click on the HTTP app that appears which takes you to the Incoming HTTP Request screen. You will then be prompted to choose the Webhook from the drop down list. You should see the webhook you created earlier:
You now need to test the webhook trigger by sending a Request from the fmESignature Link file with the Claris Connect Webhook URL as the Completed Event Webhook. Create a new Request in the fmESignature Link file and enter the Claris Connect Webhook URL in the Completed Event Webhook field. It should look something like this:
Now add yourself as the Recipient and send the Request and complete the agreement when you receive the email from DocuSign. DocuSign will send a completed agreement webhook notification to the Claris Connect Webhook URL. Once Claris Connect has received the webhook notification from DocuSign the Save Trigger button will become active - click the Save Trigger button to continue:
5. you now need to add another action to the Claris Connect Flow which will create a new record in the Webhooks table in the fmESignature Link (DocuSign Edition) file and populate the relevant fields with data from the incoming webhook. Click the + button and select Action to add a new Action:
In the list of apps search for 'FileMaker' and select the appropriate option for where your copy of fmESignature Link (DocuSign Edition) is hosted:
After selecting the appropriate Claris FileMaker option choose the Create record option and click Continue:
6. you will then be prompted to authenticate with your Claris FileMaker server (the process is slightly different for each option):
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. After you have successfully authenticated click the Continue button:
7. you then need to choose the FileMaker layout to use - select the Webhooks layout which is the same layout the PHP file uses and has the necessary fields:
To map the DocuSign webhook data from the incoming webhook to the matching FileMaker field click the blue icon to the right of the following fields and select the option from the list (you should see the data from your test DocuSign webhook notification):
You only need to map the following fields:
We are replicating the same behaviour as the webhookSignedEnvelope.php file - a new record is created in the Webhooks table, the EnvelopeID field is populated with the DocuSign Envelope ID and the Data field is populated with the complete body of the webhook JSON data.
Click the Save button - your Flow should now show the following 2 actions:
8. We now need to add another Action to perform a FileMaker script after the new Webhook table record has been created by the webhook. Click the + button to the right of the Create record action and select Action:
We are going to select the same FileMaker app that we used for the previous action. Select your FileMaker Server that was previously created which should appear under Your Apps and click Continue:
Select the Execute script option and click Continue:
Then click the Continue button at the next screen:
Select the Webhooks layout again and the webHookGetSignedPDF script (same as the PHP file version). For the Script parameter we are going to pass in the Envelope ID which you can select from the webhook payload as you previously did by clicking the blue icon to the right of the Script parameter field:
Click the Save button - your Flow should now show the following 3 actions:
You can now toggle the Disabled option to Enabled - you will receive the following prompt:
Click Save to make your Flow active. 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 Claris Connect 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.