Workflow Actions

Update Resource Action

8min

Introduction

The "Update Resource" action in CloudFiles allows you to update metadata, such as renaming files and folders or adding descriptions. It is very useful when you want to update custom columns in SharePoint.

To make sure this action works with your Cloud Storage, you need to understand What is an 'Automation User' and how does it work?

Document image


Input Parameters

The "Update Resource" action takes in various parameters to specify the source & destination of the file.

  1. Library: The location where the file/folder name or description needs to be updated, such as in SharePoint, Google Drive, or other storage platforms.
  2. Path to Resource: The exact path to the file/folder. There may be more than one parameters required to specify this path based on library selection.
  3. Property to update: The API name of property to be updated.
  4. Value: The updated name or description of the file or folder.
  5. Return Values: Various values returned by this action after execution.
Document image


These parameters have been detailed in the section below:

1 - Library

Select the cloud storage platform from which the file or folder's name/description needs to be updated. You can choose from CloudFiles, OneDrive, SharePoint, Box, or Dropbox. Depending on your selection, additional parameters will appear in the action, which are explained in the sections below.

Document image


2 - Path to Resource:

This specifies the source from where the files/folder’s name/description needs to be updated. You can specify the full path using a simple '/' separated string with the file name at the end.

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 metadata on the right side of the screen.

This meta data example is shown below -

Document image


3 - Property to update

In this parameter, specify "name" when renaming a file or folder. Similarly, for Google Drive, enter "description" when updating the description. The API name of the column is required if you want to update columns in SharePoint.



Document image


4 - Value

In this parameter, enter the new name for the file or folder you want to rename. Similarly, for the description, provide the updated description in the respective field.



Document image


Return Values

The Move Resource 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 was executed correctly.
Document image