Tutorials

Collecting sensitive documents in a compliant way using HubSpot with an external storage system

19min

In this tutorial, we will explore how you can create a document collection portal for sensitive documents in a compliant way using HubSpot-CloudFiles integration. Learn to create workflows that set up a secure dataroom, collect documents systematically, and organize them into folders stored in your preferred external storage.

What To Expect

By the end of this tutorial, you can expect to -

  1. Have an external Dataroom for sensitive documents collection within HubSpot
  2. Have a sharing link for customers to access and share the dataroom
  3. Have automated folder creation in external storage of your choice to store these sensitive documents

The GIF below shows the expected output. If you have a basic grasp of these concepts, you can expect to finish the tutorial in under 10 minutes.

Document image


1 - Pre-requisites

Before you start with the set-up, please ensure you have installed CloudFiles and connected it to your cloud storage of choice.

Install CloudFiles in HubSpot

CloudFiles is available on the app marketplace and can be installed using the standard app installation process. Check out Installation guide for CloudFiles HubSpot Integration.

Document image


Connect your storage

Login to your external storage of choice such as Google Drive, SharePoint etc. through the CloudFiles interface. This will give you instant access to your external files within HubSpot. The GIF below shows the steps quickly. Check out Quick start for file connector in HubSpot for more information.

Document image


Connect Automation User for Storage

In addition to installing CloudFiles in HubSpot, you also need to set an automation user for the workflow to work. This is the integration user that will be used by the workflow actions to pass files into the cloud storage.

To connect an automation user, simply head over to app.cloudfiles.io > Settings > Integrations > Google Drive and login through your google account. What is an 'Automation User' and how does it work? this article explains everything you need to know about the automation user, including what it is, why it's useful, and how it operates.

Document image


After connecting the desired storage, we will proceed to create deal based workflow which will be triggered when the deal reaches a certain stage. Here’s how our final workflow looks like. We will detail these elements in the sections below.

Document image


2 - Create Deal Workflow

Create a new deal based workflow from scratch and select the trigger to fire when the deal reaches a certain stage as shown in the GIF below. You can chose any stage as the deal stage. We have selected ‘Documents Collect’ as the deal stage to trigger the workflow. This is a custom stage that we created.

Document image


3 - Create automated Internal Folder for storing sensitive documents using ‘Create Folder’ Action

Create Folder action can be used to create folders in any location on any cloud storage platform from HubSpot flow action. We will use this action to first create the folder that will store the sensitive documents collected from the datatoom.

To use the “Create Folder” action, simply click on add button and search for ‘Create Folder’ as shown below. Once you add this action, it will ask you to fill in certain parameters.

Document image


This action requires a few parameters. The Library parameter is the desired Cloud storage where you wish to create the folder. Select the desired storage from the drop down field. The Folder name is the name you wish to give your created Folder. We simply use the Deal’s name but you can also create a complex text formula variable as well.

The GIF below shows how to populate the Library & Folder name parameter.

Document image


We also need to enter values for Shared Drive ID & Path to Destination. These are -

  • Shared Drive ID - This is important for google drive & sharepoint users only. These cloud storages offer multiple 'drives' where documents can be uploaded.
  • Path to Destination - This specifies the destination folder in which this new folder will be created.

These parameters can be easily copied from CloudFiles app library. Follow these steps -

  1. Find the CloudFiles widget from any HubSpot record, and click on CloudFiles. It will redirect you to your CloudFiles storage.
  2. Under the libraries tab, navigate to folder where you would like to store your files or simply create new folder.
  3. Copy the parameter from the meta data on the right side of the screen.

Check the GIF below for a quick walkthrough of these steps.

Document image


For a detailed description of the Create Folder action, refer to the Create Folder detailed guide. Here’s how our final Create Folder action looks like -

Document image


4 - Show Folder on Record using ‘Create Attachment’ Action

The Create Attachment action is used to associate created folder to HubSpot records. Attaching (or associating) our newly created folder is important since this will enable us to see and operate on the folder contents right from the HubSpot record.

To use this action, simply click on add button and search for ‘Create Attachment’ as shown below. Once you add this action, it will ask you to fill in certain parameters. “Shared Drive ID” and “Library” parameters will be same as above.

The “Path to folder” will be the exact and full path of the newly created folder. You can simply copy from the meta data info in the CloudFiles Library using the same steps as specified in the shared drive ID section above.

Here’s how our final Create Attachment action looks like -

Document image


5 - Create Dataroom using ‘Create Dataroom’ action

A Dataroom is a file portal, where you can request files from your customers. We will use “Create Dataroom” action to create a file request portal where customers can upload their sensitive documents.

To use this action, simply click on add button and search for ‘Create Dataroom’ as shown below. Once you add this action, it will ask you to fill in certain parameters. “Name” is the name of dataroom that appears on the dataroom, “Description” is an optional field that can be used to give additional description for conveying more information.

To read more about this action, visit “Create Dataroom Action”. Refer to the GIF below to get a visual understanding of above steps.

Document image


This is how your final Create Dataroom action looks like -

Document image


6 - Show Dataroom on Record using ‘Create Attachment’ Action

The Create Attachment action can also be used to associate created dataroom to HubSpot records. To use this action, simply click on add button and search for ‘Create Attachment’ as shown below.

After you add this action, you will have to fill 3 parameters. For attaching a dataoom, Library parameter should always be ‘CloudFiles’. Resource type will be ‘Dataroom’ and Resource ID will be ‘New Dataroom ID’ derived from the output of previous create Dataroom action.

Refer to the GIF below to have a visual understanding of this steps -

Document image


Here’s how our final Create Attachment action for Dataroom looks like -

Document image


Once the Dataroom is created and associated to the record, we will create file request block to request sensitive documents within the dataroom.

7 - Create File Request block using ‘Add to Dataroom’

The ‘Add to Dataroom’ action enables you to insert files, folders and file request blocks to your CloudFiles datarooms using a workflow. In this tutorial, We will use this action once to create file request blocks for KYC documents folder. You can add this action as many times as needed to request the required files.

To use this action, simply click on add button and search for ‘Add to Dataroom’ as shown below. Once you add this action, it will ask you to fill in certain parameters. “Shared Drive ID” and “Library” parameters will be same as above. For remaining parameters, refer below -

  • Dataroom ID - New Dataroom ID derived from the output of ‘Create Dataroom’ action
  • Type - File Request
  • Name - Name of documents requested
  • Add to destination - Yes
  • Path to destination folder - full and exact folder path of sub-folder created earlier
  • Description (Optional) - Describe the requested documents

Refer to the GIF below to have a visual understanding of this steps -

Document image


Here’s how our final Add to Datatoom action looks like -

Document image


8 - Create shareable link for Dataroom using ‘Share Attachment’ action

The Share Attachment action enables you to share attachments using HubSpot workflows. Sharing an attachment is exactly the same as manually creating a sharing link of a file / folder / dataroom from HubSpot record.

To use this action, simply click on add button and search for ‘Share Attachment’ as shown below. This action has only one parameter that can be set to specify the Attachment to be shared. You can derive this from the return value of previous Create Attachment action - ‘New Attachment ID’.

This is what the final Share Attachment action looks like -

Document image


9 - Copy the sharing link to deal property using ‘Copy Property Value’ Action

In this step, we will copy the link created in the last step to a deal property. For this, first create a single-line text property in the HubSpot Deal Settings. We created a property called ‘Sensitive Doc Collection Link’.

To copy the shared link to the above property, we will use the Copy Property value action. For the ‘from’ parameter, we will choose the output ‘URL’ of the last action. For the ‘to’ parameter, we will use our newly created deal property.

The GIF below shows the configuration for the Copy Property Value action.

Document image


That’s it. Save and activate the flow. In the next section, we will test the workflow and check the Analytics.

Test the Workflow

To test the workflow, create a new deal and set the stage to the one used in the trigger. Give it a minute to execute. Refresh the page. You will be able to see the dataroom link in the deal property and also the folder attachment in the CloudFiles widget in the right side.

Click on the dataroom link and upload document(s), as requested. Once you have uploaded the documents, you will be able to see that ‘Upload Checklist’ property has been updated. Upon all documents upload, you will receive an e-mail notification. Check the uploaded documents in the internal folder within HubSpot by navigating to CloudFiles widget. You can uncheck a particular document in case you want to request a re-upload.

Once you are satisfied with the uploaded documents, mark the ‘Document Upload Completed’ property to ‘Yes’ to confirm the approval process. An e-mail will be triggered to customers that the documents upload has been completed.

These steps have been illustrated in the GIF below for a better understanding -

Document image