Tutorials

Selective File collection portal using HubSpot CloudFiles Integration

33min

In this tutorial, we will guide you in automating a conditional file collection portal within external storage, directly linked to HubSpot records using the CloudFiles-HubSpot integration. You'll learn how to dynamically generate parent folders, subfolders, and file request blocks based on user selections using CloudFiles workflow actions.

What to Expect

By the end of this tutorial, you will be able to:

  1. Set up an automated file collection portal (Dataroom).
  2. Create conditional file request blocks that adjust dynamically based on the user’s selections in a multiple-checkbox property.
  3. Automatically generate a Parent Folder linked to a HubSpot record (e.g., a Deal).
  4. Configure a customized folder hierarchy, ensuring the right number of subfolders are created based on selected document types.

The GIF below demonstrates the final output. If you’re familiar with these concepts, you can complete this 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 a new deal is created and a multiple checkbox property called "Request Docs" is known. Here’s how our final workflow looks like. We will detail these elements in the sections below.

Document image


2 - Create a Multiple Checkbox Property

In the Deals object, create a multiple-checkbox property named "Request Docs". Add the following options: ID, Passport, KYC Docs, and Tax Statements. You can also arrange the options in your preferred order for better visibility.

Refer to the GIF below for a step-by-step walkthrough.

Document image


3 - Create Deal-based Workflow

Create a new deal-based workflow from scratch and select the trigger to fire when a new deal is created and the "Request Docs" property is known as shown in the GIF below.

Document image


4 - Create Parent Folder 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 Parent folder in which sub-folders will be created automatically.

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 have simply used the Deal’s name but you can also create a complex text formula variable as well.

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




5 - Show Parent Folder on Deal Record using ‘Create Attachment’ Action

The Create Attachment action is used to associate created folder to HubSpot records. Attaching (or associating) our created deal 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 parent 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


6 - 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


7 - 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.

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.

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 the 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 - Set the sharing link to deal property using ‘Edit Record’ Action

In this step, we will set 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 ‘Dataroom Link’.

To set the shared link to the above property, we will use the Edit Record action. For the ‘Property to set’ parameter, we will choose 'Dataroom Link' and under 'Dataroom Link' parameter we will set it to the output ‘URL’ of the last action.

This is what the final Edit Record action looks like-

Document image


10 - Add Conditional Checks for Workflow Execution

The workflow now moves to evaluate branches by checking whether the Request Docs multi-select property contains "ID."

Here is a screenshot of the first branch-

Document image


If "ID" is present:

i - Create Sub-Folders using ‘Create Folder‘ Action

To create a sub-folder, we can simply use the same ‘Create Folder’ action that we used above with a couple of simple tweaks.

  1. Change the ‘Folder Name’ to reflect the sub-folder you want to create. We will create a subfolder names 'ID' within the Deal folder.
  2. Change the ‘Path to Destination’ to exact and full path to Parent folder name that we created in the previous action. This way, this new folder will get created inside the account’s folder we created previously.

Here’s how your Create Folder action should look like.

Document image


You can choose to have as many sub folders as you want. Simply duplicate the Create Folder action. You can also create sub-sub-folders and even deeper hierarchies using this method.

ii - Create a 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 to create file request blocks for ID. 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 the ‘Create Dataroom’ action
  • Type - File Request
  • Name - Name of documents requested as in this case I have added 'ID'
  • Add to destination - Yes
  • Path to destination folder - full and exact folder path of ID sub-folder created earlier
  • Description (Optional) - Describe the requested documents

Here’s how Add to Datatoom action looks like -

Document image


iii - Go to Action:

Even if 'ID' is selected from the multi-checkbox property, the workflow should still check whether 'Passport' is selected as well. This is why the 'Go to action' step is used—to ensure the workflow continues evaluating all selected options rather than stopping at the first match.

Now If "ID" is not present, the workflow directly goes to the Passport check branch.

Document image


2 - If "Passport" is present

i - Create Sub-Folders using ‘Create Folder‘ Action

Just like we created a subfolder for ID, we will now create a subfolder for Passport using the ‘Create Folder’ action. Follow the same steps as before, ensuring that:

  • Folder Name is set as 'Passport.'
  • Path to Destination is the full and exact path of the parent folder created in the previous step.

Here’s how your Create Folder action should look like.

Document image


This ensures that the Passport subfolder is correctly placed within the designated parent folder.

ii - Create a File Request block using ‘Add to Dataroom’

Just like we did for ID, we will now create a file request block for Passport using the ‘Add to Dataroom’ action. Follow the same steps as before, ensuring that:

  • Dataroom ID is the same as derived from the ‘Create Dataroom’ action.
  • Type is set to ‘File Request.’
  • Name is set as ‘Passport.’
  • Add to destination is set to ‘Yes.’
  • Path to destination folder is the full and exact path of the Passport subfolder created earlier.

Here’s how Add to Datatoom action looks like -

Document image


This ensures that the requested Passport document is correctly placed in the designated folder. Refer to the GIF below for a visual walkthrough of this step.

iii - Go to Action

Even if 'Passport' is selected, the workflow should still check whether 'KYC Docs' is selected as well. This is why the 'Go to action' step is used—to ensure the workflow continues evaluating all selected options rather than stopping at the first match.

Now, if 'Passport' is not present, the workflow directly moves to the KYC Docs check branch.

Document image


3 - If "KYC Docs" is present

i - Create Sub-Folders using ‘Create Folder‘ Action

Just like we created a subfolder for Passport, we will now create a subfolder for KYC Docs using the ‘Create Folder’ action. Follow the same steps as before, ensuring that:

  • Folder Name is set as 'KYC Docs.'
  • Path to Destination is the full and exact path of the parent folder created in the previous step.

Here’s how your Create Folder action should look like.

Document image


This ensures that the KYC Docs subfolder is correctly placed within the designated parent folder.

ii - Create a File Request block using ‘Add to Dataroom’

Just like we did for Passport, we will now create a file request block for KYC Docs using the ‘Add to Dataroom’ action. Follow the same steps as before, ensuring that:

  • Dataroom ID is the same as derived from the ‘Create Dataroom’ action.
  • Type is set to ‘File Request.’
  • Name is set as ‘KYC Docs.’
  • Add to destination is set to ‘Yes.’
  • Path to destination folder is the full and exact path of the KYC Docs subfolder created earlier.

Here’s how Add to Datatoom action looks like -

Document image


This ensures that the requested KYC Docs document is correctly placed in the designated folder. Refer to the GIF below for a visual walkthrough of this step.

iii - Go to Action

Even if 'KYC Docs' is selected, the workflow should still check whether 'Tax Statements' is selected as well. This is why the 'Go to action' step is used—to ensure the workflow continues evaluating all selected options rather than stopping at the first match.

Now, if 'KYC Docs' is not present, the workflow directly moves to the Tax Statements check branch.

Document image


4 - If "Tax Statements" is present

i - Create Sub-Folders using ‘Create Folder‘ Action

Just like we created a subfolder for KYC Docs, we will now create a subfolder for Tax Statements using the ‘Create Folder’ action. Follow the same steps as before, ensuring that:

  • Folder Name is set as 'Tax Statements.'
  • Path to Destination is the full and exact path of the parent folder created in the previous step.

Here’s how your Create Folder action should look like.

Document image


This ensures that the Tax Statements subfolder is correctly placed within the designated parent folder.

ii - Create a File Request block using ‘Add to Dataroom’

Just like we did for KYC Docs, we will now create a file request block for Tax Statements using the ‘Add to Dataroom’ action. Follow the same steps as before, ensuring that:

  • Dataroom ID is the same as derived from the ‘Create Dataroom’ action.
  • Type is set to ‘File Request.’
  • Name is set as ‘Tax Statements.’
  • Add to destination is set to ‘Yes.’
  • Path to destination folder is the full and exact path of the Tax Statements subfolder created earlier.

Here’s how Add to Datatoom action looks like -

Document image


If "Tax Statements" is not present, the workflow directly ends without further action.

11 - Test the Workflow

Now that everything is set up, let's test the workflow. Create a new Deal in HubSpot and select the required documents under the Request Docs property. The workflow may take a few seconds to execute, so refresh the page if needed. Once processed, navigate to the CloudFiles widget on the right panel, where you'll find a Deal folder automatically created along with subfolders corresponding to the selected document types.

The Dataroom link will also be available in the deal property. Click on the link to upload the requested documents. To verify, go back to the CloudFiles widget within HubSpot and check the internal folder, where the uploaded documents will be stored.

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

Document image