Download Notifications through Zapier

Files.com includes a Notifications feature that administrators can use to automatically send email notifications to users when files are uploaded to a specific folder on your site.

However, there may be times when you want more flexibility than these built-in upload notifications provide. For example, you may want to have notifications triggered for other type of events, such as file downloads, moves, deletions, etc. Or you may want to customize the content of the notification emails. The Files.com Zapier integration allows you to do this and more.

The following tutorial will guide you through an example of creating a custom email notification to be sent through Gmail when any files are downloaded from a specific folder on your site.

Log in to your Zapier account and click the Make a Zap button. Enter a title for your Zap and you are ready to begin configuring this webhook integration.

Setting the Trigger

By default, a grid of Zapier integrated apps should show in the panel on the right side of the screen. This will prioritize based on your most frequently used apps. For this Zap, we will be using the app Webhooks by Zapier. Begin typing this in the Search Hundreds of Apps search field and then click the entry once displayed in the filtered dropdown box.

Select the Catch Hook option since this zap will trigger as soon as Files.com sends the notification to Zapier (via this webhook) of the file download.

The next screen displays that your custom webhook URL has been created and is ready to be added in the Files.com platform. First, click the Copy button to transfer the webhook URL to your clipboard. In a separate tab, open the Files.com site and login as an administrator.

Once logged in, click the Files icon and navigate to the folder you want to enable download notifications for and open the folder settings by clicking the gear icon. To receive notifications for all site downloads, configure the webook in your root folder settings.

From the settings list, click the Webhooks option and then click the Add new webhook button. Paste the Zapier webhook URL in the Primary URL field and click Save.

Once saved, switch back to the Zapier tab in your web browser and click the Ok, I did this button to continue. The box now shows the sample webhook request sent from Files.com when testing the validity of the webhook. Clicking on the hook entry will expand the request and show all details pushed from the Files.com platform. For additional testing, upload a file into the Files.com directory then click Get More Samples. The pane will refresh and an entry will display for the notification. Once satisfied the webhook is receiving data from Files.com, click Continue.

The final step in configuring the webhook is to limit which file actions will trigger the Zap. Files.com sends a webhook for every file action which occurs within the designated folders. If the goal is to have this Zap whenever any action occurs, then you can skip to the next section for configuring the next step. If only specific file actions should trigger this Zap, then proceed by clicking Edit Options.

In the blank configuration field, enter {"action": "read"} and click Continue. On the test screen, click Continue once again to pass through.

At this point, the Zapier trigger has been configured and the Zap is ready for the action to be created.

Configuring the Action

This section describes what actions Zapier should take once alerted by the webhook configured above. This example illustrates the process for sending an email from a Gmail account in response to the trigger; however, Zaps can be configured with thousands of other actions.

To begin, click the Add a Step button and then click Action/Search to view the grid of integrated applications. Begin typing Gmail in the Search Hundreds of Apps field and then click the entry once displayed in the filtered dropdown box.

To connect your Gmail account, begin by clicking Connect an Account. A new window will open with a Google Sign In dialog. Continue through entering your Gmail credentials. Finally, click the Allow button granting Zapier access to Manage drafts and send emails and View and modify but not delete your email.

Once added, you are able to test the connection, or click the Save + Continue button to move to the next screen.

After connecting an account, or selecting one already connected, it is time to begin configuring the message to be sent.

Enter the email address that you would like email notifications sent to in the To field. This address could be a single person, a group address, or a list of email addresses. To send to multiple addresses, add each individually using the + button between each address.

Configure your message header information including the From Address (typically your connected Gmail account), a custom From name, and the email address for replies.

Next, configure the subject and body of the message you would like to send. Both fields allow the option to include custom data supplied via the webhook. In this example, the username has been included in the subject and additional metadata in the body.

Finally, save your template by clicking the Continue button at the bottom of the Action panel.

Enable & Test Your Zap

The last step in the process of creating your download email notification is to enable the Zap and perform a live test. Click the toggle to turn on your Zap and then download a file from the Files.com selected folder. Within a few minutes your download notification will arrive.

This Zap is incredibly powerful and is often used by customers who wish to customize the email notifications that are sent out. Often, customers will create an HTML message including their logos, extended formatting and more.

Webhooks can be created for any folder and multiple hooks can be associated with a folder. Click here to review more information on the Files.com Webhook API and the many tasks this tool can accomplish. In addition, you can review Zapier’s extensive app-specific documentation here.