The Search in Storage action by CloudFiles performs a fuzzy text search for a specified string in a specified destination inside any cloud storage and returns the file and folder results of the search. These results can provide refined paths and full file names which can be used in other actions to create more sophisticated automations.
It is important to note that fuzzy search does add some inherent uncertainty. It's advisable to use this along with deterministic strings such as HubSpot IDs to avoid attaching / sharing wrong files.
NOTE: The uncertainty of fuzzy search can cause wrong files to get attached / shared. Use this action with EXTREME CAUTION!
Make sure that you have connected an automation user in order for this action to work with your Cloud Storage.
The Search in Storage action will require the following parameters:
- Library - The desired library where the search must be performed
- Destination parameters - Various parameters that specify the target drive and folder where the search would be performed. Searching in a well-targeted folder reduces some uncertainty of fuzzy search.
- Search String - This is the text string that will be searched in above destination.
In the sections below, we detail out each of the parameters that you can see in this action.
1 - Library
Library is the desired Cloud storage where you want to search. The search can be done in CloudFiles, OneDrive, SharePoint, Box or Dropbox can be selected.
2 - Shared Drive ID / Drive
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 do the search in.
In order to retrieve this Drive ID, follow the simple steps below -
- Find the CloudFiles widget from any HubSpot record, and click on CloudFiles. It will redirect you to cloudfiles.io
- Under the libraries tab, navigate to the file or folder that you are trying to attach.
- Copy the parameter from the meta data on the right side of the screen.
These steps are shown in the GIF below -
3 - Path to destination
This specifies the destination folder in which the search would be performed. This means that files and folders sitting outside this destination folder would not be included in the search. The search will include this folder's sub-folders through.
You can specify this using a simple '/' separated path. The path to the folder can be simply copied from the meta data info in the CloudFiles Library using the same steps as specified in the shared drive ID section above.
If you leave this field blank, the search will be performed in the entire drive.
4 - Search String
This is the text string that you wish to search in the above destination. The search is the same as cloud storage search (we use cloud storage's own APIs). So a google drive user will get the same results that they get if they perform a destination search in their google Drive. The same applies to users of other storages.
The search will return 1 or more files / folders that can be read from the return values of this action.
NOTE: The uncertainty of fuzzy search can cause wrong files to get attached / shared. Use this action with EXTREME CAUTION! Using IDs in names & choosing destination folder to search helps refine results.
5 - Return Values
The Create Folder action returns the following values. These can be used in later actions to chain together actions and create complex automations.
- Action Status - This is a success or failure message based on whether the action executed correctly.
- Result Count - Number of results returned. Use this for error handling. Ideally only one result should be returned.
- Name - The full name (including extensions for files) for the search result. This may be a comma separated list in case of more than one results.
- Type - This specifies whether the returned result is a file or folder. This may be a comma separated list in case of more than one results.
- Path - Full path from root for the returned resource. This may be a comma separated list in case of more than one results.