Zapier allows seamless integration with dozens of APIs. In this post I’ll explain how to create an integration with the GroupDocs Storage API. Put simply the process of integration with Zapier is Read -> Process -> Write. The left side of the integration is called a trigger and the right side is an action. The central process simply converts your API response to a format suitable for the write action. We are going to create a trigger for new files. When you upload files to your GroupDocs account, a Zap (Zapier app) gets the file details and sends them (the write action) to one of the supported services. In this example, we’ll simply send an email using Gmail. Here is the brief overview of what needs to be done:
Create GroupDocs Storage service.
Add Auth Fields to support GroupDocs URL Signing based authentication.
The trigger recognizes that files have been uploaded and passes them to the process. Setting up a trigger involves several steps: adding a new trigger, adding polling info, adding a trigger field and, finally, adding sample results.
Still in Zapier, click Add a new trigger. in the Triggers section.
Fill in the form with following information:
Label: New File
Key: new_file
Help text: New file uploaded to GroupDocs.
Important: On
Data Source: Polling
Click Save.
The Trigger page is updated so you can enter polling info.
Paste the following into the Polling: URL Route field: client_id/folders/path?order_by=CreatedOn&order_asc=False
Click Save.
3a. Add Trigger Field for the path Placeholder
Click Add a new trigger field. .
Fill in the form with following information:
Label: Folder
Key: path
Help text: Folder path such as “myFolder”, also supports nesting as in “my/nested/folder”. To get contents of root folder use “/”.
Type: Unicode
Required: Yes
3b. Add sample result
Click the sample link in the Trigger Data Sources section.
We also had to change the Content-Type header from “application/json” to “text/html” or the GroupDocs API would try to parse the request body and fail because the GET request doesn’t have a body payload.
Once you are done with testing you can submit your service for global activation or enable invite only activation. In the next post I’ll describe how to create an action for the GroupDocs Storage API. That is, we’ll implement the right side of integration. Please talk to us using our Live Chat support or official feedback forum. Stay connected with our blog and newsletter to get updates regarding all GroupDocs enhancements.