Flow Actions

Get Resource Property

Introduction

The CloudFiles: Get Resource Property Flow Action allows you to retrieve specific property values of a a specific Resource. This includes:

  • A SharePoint Resource's Column Value.
  • Standard properties from other supported libraries (Eg: A Google Drive Folder's URL)

This action is ideal for scenarios where precise metadata details are required for automations or decision-making processes within a flow.

By fetching and using these property values, you can create dynamic and efficient workflows tailored to your business needs.

Document image


What this action does

The CloudFiles: Get Resource Property Flow action flow action allows you to:

  • Specify the target Resource using its metadata details.
  • Specify the Property whose Value is to be fetched using the Property's API Name.
  • Get the Property Value as a Text Output, which can be further used in the flow.

Example Use Case 1

Scenario:

In Salesforce, you have an automation that creates a GoogleDrive folder for every Opportunity record created. Additionally, you want the GoogleDrive URL of the newly created folder to be automatically populated into a custom field on the Opportunity record.

To achieve this, you can use the CloudFiles: Get Resource Property Flow Action to fetch the externalUrl property of the created folder and update the Opportunity record's relevant field.

Below is the flow snippet of the Example Use Case:

Document image


Example Use Case 2

Scenario: Salesforce users upload Opportunity-related files to SharePoint folders using CloudFiles LWCs. They tag these files using SharePoint columns like:

  • Document Type (choices: Agreement, Proposal, Marketing Collateral, Other)
  • Document Status (choices: In Review, Draft, Final)
Document image


When a file's column values are updated from the CloudFiles LWC, a Resource Updated Event is published. Suppose you want to automate the process of moving a Proposal file to a different folder whenever its Document Status is set to Final.

Steps to Automate:

  1. Trigger Automation: Configure a flow to start whenever a Resource Updated Event is published.
  2. Filter Events: Use decision elements to filter events based on the folder’s originating record type (e.g., Opportunity).
  3. Retrieve Column Values:
    • Use the Get Resource Property action to fetch the Document Type column value of the updated resource.
    • If DocumentType = Proposal, fetch the DocumentStatus column value.
  4. Perform Conditional Actions: If the DocumentStatus = Final, execute further actions, such as moving the file to a different location.

Below is the flow snippet of the Example Use Case:

Document image


Input Parameters

Resource

The Resource parameter is used to specify the Resource (File or Folder) whose Property Value is to be fetched.

How to Configure the Resource Parameter

If you do not have the Resource parameter directly available, you can configure it by:

  1. Creating a cldfs_Resource variable in your flow.
  2. Assigning the Resource's metadata details (e.g., DriveId, Id, Library) to the variable.

These metadata details can be obtained from:

Property Name

Input the File/Folder's (Resource) Property API Name in the external storage whose value must be updated/set. 

Where to find the Property's API Name

  • Find the API Names of Properties directly from the External Storage Library.
  • Alternatively, within Salesforce, go to:
    • CloudFiles App > Document Management > Widget Configuration
    • In the Widget Columns section, add required Columns to check their API Names by Navigating to the location or Document Library, locate the column, and find its API Name (displayed in brackets next to the Column Name).
Document image


List of few Standard SharePoint Property Names

  • name - gives the name of the resource
  • description - gives the description of the resource
  • id - gives the ID of the resource
  • driveId - gives the drive ID of the resource
  • library - gives the library that the resource is in
  • externalUrl- gives the cloud drive URL of the resource
  • path - gives the path of the resource in the cloud drive
  • type - gives the type of resource (file/folder)
  • size - gives the size of the resource
  • createdAt - gives the date of creation of the resource (not present in dropbox
  • updatedAt - gives the date when the resource was last updated
  • extension - gives the extension of the resource

Output Parameters

The CloudFiles: Get Resource Property Flow Action provides the output value of the specified property as a Text Variable

How to Identify the Output Variable ?

The output Text Variable can be identified by the action's label name. For example:

  • If the action is labeled as "Get DocumentType Column Value", the output Text Variable will be named: Text from Get DocumentType Column Value
Document image


Does the Output Vary Based on Column/Property Type ?

No, the output of the CloudFiles: Get Resource Property Flow Action is always a Text value, regardless of the type of column or property queried.

  • If a Date Property is queried, the output will be a text string like 12/23/2024.
  • If a Yes/No Column is queried, the output will be text like TRUE or FALSE.

This consistent output format ensures compatibility with various flow elements and simplifies automation configurations.