Move HubSpot Files Action
The "Move HubSpot Files" action by CloudFiles enables you to move files stored in HubSpot file manager (such as the ones uploaded by through a HubSpot form) to an external storage system. This action is useful in scenarios where a HubSpot form is being used to collect files. If copying multiple files, each file copy is counted as 1 automation action.
To make sure this action works with your Cloud Storage, you need to understand What is an 'Automation User' and how does it work?
The "Move HubSpot Files" action takes in various parameters. The parameters can change based on the library selected.
1. Files: The HubSpot property which contains a public link of the HubSpot file. E.g. the property field associated to HubSpot form's file input.
2. Library: The desired library where the file must go (e.g. SharePoint, Google Drive etc...)
3. Destination Parameters: Various parameters used to specify the destination folder in which these files must be copied to.
4. File Name: You can use this parameter if you want to rename file while moving it. Leaving it blank will copy the file with the same name as the original file.
5. Return Values: Various values returned by this action after execution. Includes the full file name and path where the file was uploaded to be used in later actions if needed.
The sections below cover all the parameters in detail.
This parameter helps specify the file(s) that need to be copied. The value should come from a HubSpot property which stores a publicly accessible HubSpot URL of the file. E.g. when adding a file upload box to a HubSpot form, a HubSpot property needs to be associated to it. When files are uploaded, this HubSpot property contains a publicly accessible URL of the file.
It's also possible to copy multiple files at once. E.g. if multiple files are uploaded in the form, the property value will contain a semi-colon separated list of the URLs. Note that each file copy is counted as one automation action. If you need to rename the file or use the file name in further actions, it is advisable to copy one file in one action.
We used a HubSpot form related property on our contact to supply to this parameter.
The final cloud storage where you want to transfer these files to. Anything between CloudFiles, OneDrive, SharePoint, Box or Dropbox can be selected. Based on your choice, new parameters would become visible in the action. These are discussed in the sections below.
This specifies the destination folder in which the files must be copied. You can specify this using a simple '/' separated path. The path to the folder can be copied from the metadata on the CloudFiles dashboard and then personalized using the record tokens. Follow the simple steps below -
1. Find the CloudFiles widget from any HubSpot record, and click on CloudFiles. It will redirect you to app.cloudfiles.io
2. Under the libraries tab, navigate to the file or folder that you are trying to add.
3. Copy the parameter from the meta data on the right side of the screen.
The meta data example is shown -
This is important for Google Drive & SharePoint library selection. Both these cloud storage have multiple drives where files can be stored. E.g. Google Drive has My Drive & Shared Drive while SharePoint can have multiple drives inside multiple sites. This parameter helps CloudFiles identify which drive to pick / push the file or folder from.
The drive ID can be copied using the meta data in CloudFiles dashboard as shown in the steps in the Path to destination section above.
This is the name you wish to give your copied file. If left blank, the file will take it's original name. Usually it's a good practice to use personalization tokens such as deal name or ID or file type to create the file name. This can help avoid duplicity. As shown below, we use the Deal Name & ID to create our final file name. You don't need to specify the file extension here, CloudFiles picks it up automatically.
The Move HubSpot Files action returns the following values. These can be used in later actions to chain together actions and create complex automations.
1. Action Status - This is a success or failure message based on whether the action executed correctly.
2. File Name - The full name along with the extension of the finally copied file. This may be comma separated if multiple files were uploaded at once.
3. Path to File - The full slash separated path of the finally copied file. This may be comma separated if multiple files were uploaded at once.