Welcome to
Help Desk

Product Updates
Training
Support
Ideas Contact Support

Salesforce Flows with Egnyte Actions

Overview

Egnyte for Salesforce provides seamless file and folder management within Salesforce, enabling users to automate file-related actions using Salesforce Flow. With Apex Invokable Actions, users can create workflows that trigger Egnyte operations such as folder creation, file uploads, metadata assignment, and permission management—enhancing efficiency and compliance.

By leveraging Salesforce Flow, admins can configure actions without writing custom Apex triggers, ensuring a flexible and scalable implementation.

Mapped Folder Creation

Mapped Folder Creation Apex Invokable Action is designed to substitute classic Apex triggers used by Egnyte for Salesforce to react to changes on records of objects configured to be synced with Egnyte.

Mapped Folder Creation action checks Egnyte Sync Config for records object and creates an Egnyte Sync Queue element according to settings found.

Setup

This is controlled by a new Flow Only checkbox in Egnyte Sync Configurations tab for each object separately. The user may choose to sync Accounts through Triggers and set up just one custom object to use Mapped Folder Creation Flow Action.

To prevent operational errors, ensure that only one of the following actions runs: either the Trigger or the Mapped Folder Creation Flow Action, but not both.

For standard objects preconfigured in the package (Account, Contact, Lead, Opportunity and Case), the user just needs to check the Flow Only checkbox. Trigger disabling will be handled by Egnyte’s package. Also, to start using Triggers again, uncheck the Flow Only checkbox.

For custom objects, the user needs to create the Egnyte Sync Configuration in flow only mode – without trigger generation and verification.

Alternatively, they can manually disable the Apex trigger (Setup -> Apex Triggers -> Select Trigger -> Edit -> Uncheck is active -> Save) before checking Flow Only checkbox.

To re-enable the Trigger for a custom object follow the following steps:

  1. Uncheck Flow Only
  2. Activate the trigger on the Object
  3. A. Create the trigger and test class manually and enter the names in the Egnyte Sync Configuration
    OR
    B. Delete Egnyte Sync Config for that object and create a new one using trigger auto generation.

Flow Configuration

To utilize Mapped Folder Creation Flow Action instead of a trigger, a Record Triggered Flow must be created. 

Follow the creation wizard choosing Record Triggered Flow as flow type.

Mapped Folder Creation Flow Action can work with both Creation and Update context. 

  • In the Configure Trigger screen, select Object and decide to which operations the flow should react. In Optimize the Flow for: section choose Actions and Related Records to run the flow in after insert or update context.

  • Click ‘+’ in the Flow Builder main section to Add Element and choose Action.

  • Select Egnyte folder in the pane on the right
  • Select Mapped Folder Creation action
  • Provide a Label, API Name and Description. In the Select Objects section, select the object type that this flow is configured for. Object for ‘New Record’ is always required.  Object for ‘Old Record’ is required only if the Flow was configured to react to update or both create and update events. In the Set Input Values section, for New Record select Triggering <Object name> (for example, Triggering Account) or type in "{!$Record}". For Old Record (required for update or both create and update triggered flows), select Prior Values of Triggering <Object name> (for example, Prior Values of Triggering Account) or type "{!$Record__Prior}".
  • Save and make sure to Activate the flow

Folder Creation, Folder Move or Rename and Folder or File Delete

Basic folder operations can be performed using these three actions. Folders created and modified through those actions won’t be mapped in any way to any record and can be invoked from any kind of flow. 

Egnyte does not recommend using them on folders mapped to Salesforce records as those are managed by the integration. Example usage:

  • Create set of subfolders when an Opportunity reaches certain stage
  • Delete a folder when retention period is expired

Parameters

Create and delete actions both require just one parameter: Path, it should follow the format used in Egnyte for example, ‘/Shared/Salesforce.com/New Folder’.

Folder Move or Rename requires three parameters:

  • Origin path – which folder to move or rename
  • Target path – the effective path
  • Keep permissions – true or false – true: keep original permissions, false: inherit from the new parent folder

Output

Creation action returns two fields:

  • folderId – populated with Egnyte folder id if the action was successful or null if errors occurred
  • error - populated with error message or null in case of success

Unmapped Folder Move/Rename returns:

  • path – new folder path in case of success
  • folderId – Egnyte folder id in case of success
  • error - populated with error message or null in case of success

Deletion action returns:

  • parentFolderPath – parent folder path of the deleted item
  • error - populated with error message or null in case of success

Upload File to Egnyte

Used to upload a file stored on Salesforce, identified by Salesforce Content Document ID, to a path on Egnyte.

Parameters

  • Path – target folder path for the file
  • Content Document ID – Salesforce Content Document ID

Output

  • entryId - uploaded files Egnyte Entry ID
  • groupId - uploaded files Egnyte Group ID
  • error - populated with error message or null in case of success

Link Creation

Action used to create an Egnyte link, supports different kinds of links, and allows for its send out through Egnyte. Click here for details on Parameters and response. 

Response contains ‘links’ element in JSON format to support multiple usage scenarios, to search for the URL of the link and simply utilize Text Formulas functions such as FIND, LEFT, RIGHT, and MID to manipulate the result and retrieve required information.

Assign Folder or File Permissions

Used to assign user or group permissions to the Egnyte folder.

Parameters

  • Path – Egnyte folder, subject of the permissions
  • Permission – choose from None, Viewer Only, Viewer, Editor, Full, Owner
  • Group name – Egnyte group name if group permission is assigned
  • User email – email assigned to a user in Egnyte that is supposed to get permission assigned

Output

  • error - populated with error message or null in case of success

Add Metadata to File or Folder

Used to assign metadata to a file or folder, works only with Namespace set in Domain Config and already existing keys.

Parameters

  • Key-value pairs – comma separated list of pairs <key> : <value> for example, “type”:”invoice”
  • Path to folder or file – file or folder that will be assigned the metadata in Egnyte format for example, /Shared/Salesforce.com/New Folder

Output

  • error - populated with error message or null in case of success

 All parameters can be passed as literals or flow variables, outputs from other actions etc.

Was this article helpful?
0 out of 0 found this helpful

For technical assistance, please contact us.