Loading...
New Winner – Cross-Border Excellence | Payoneer India 2026 Check out
Featured Recognized by Salesforce; Proven by impact! Check out

ShareFile by Citrix is more than just a secure file-sharing platform; it’s also a document management powerhouse, particularly in businesses that value compliance, traceability, and automation. However, when multiple departments or teams require access to the same document versions in various folders, things can quickly become messy and disorganised.

This blog will show you how to use Salesforce Apex, OAuth 2.0 authentication, custom webhooks, and batch processing logic to automatically copy or update files from a central ShareFile folder to all subfolders. This scalable, low-maintenance solution ensures that your files remain consistent without requiring any manual intervention.

What is ShareFile?

ShareFile is a cloud-based file sharing and storage solution developed by Citrix, designed to help businesses securely manage, access, and collaborate on documents. It offers robust features for file storage, syncing, secure sharing, and remote access, making it especially valuable for industries with strict compliance requirements, such as legal, finance, and healthcare.

What sets ShareFile apart?

ShareFile has a strong emphasis on security and control. Users can send encrypted files, set access permissions, and track downloads. It also supports workflows like electronic signatures, feedback collection, and automated file retention, helping teams stay productive and compliant.

Whether you’re working from the office or remotely, ShareFile provides seamless access to your files through web, desktop, and mobile apps. With integration capabilities for tools such as Microsoft Outlook, Salesforce, and document management systems, it seamlessly integrates into most modern workflows.

In short, ShareFile is more than just a file-sharing tool, it’s a secure platform for document collaboration and business continuity.

Business Use Case of ShareFile

In many business environments, it’s important to keep files consistent across multiple folders, especially when different teams or departments rely on the same documents. With ShareFile, you can easily copy or update files from a central folder to various subfolders, ensuring everyone always has access to the most current version.

Below are the steps to copy or update files from one folder to all other folders or subfolders:

Step 1: Head to the ShareFile Login “https://api.sharefile.com” to generate an API Key.

Log in with your credentials for the ShareFile Account.

image 1

Enter your Subdomain name and enter the Email and password of your ShareFile Account.

Innovative Salesforce Customization Services

Step 2: Click on Get an API Key.
Step 3: Click on Create New to generate an API Key.
Step 4: Copy Client ID and Client Secret.

Updated Image 4

Log in to Salesforce and create an Auth. Provider with Open ID Connect.

Enter Client Id, Client Secret, Default Scopes and Token Endpoint URL as https://[subdomain].sf-api.com/oauth/token

Updated Image 5

Copy the Callback URL and update the Redirect URI in your ShareFile API key. Now, we will be creating External Named Credentials and Named Credentials.

Enter your domain URL as https://[subdomain].sf-api.com in the URL field for Named Credentials from your ShareFile API Account that you logged in earlier.

image 6 1
Updated Image 7

Step 5: Now, create Principal in External Credentials and configure it with your ShareFile account.

Create Remote Site Settings, add the URL of ShareFile and your ShareFile API account.

Now, we will be creating a Site for setting up webhook.

Updated Image 8

Step 6: We will add the permissions for External Credentials to our Site Profile and add the read permission to User External Credentials.

image 9

Step 7: We are all done with the setup of Auth 2.0 and will execute the webhook code using the specific folder ID we want to configure.

Step 8: After setting up the webhook for a specific folder, we will add our code to process folders and copy or update the files from the source folder to all target folders.

Step 9: Now, we will create a batch to process all child folders.

Step 10: We will create one more batch to process file uploading to all target folders.

At last, grant access to all the apex classes we created for ShareFile to the Site profile.

Here’s the demo video:

Conclusion:

Automating file management with ShareFile, especially tasks like copying and updating files across folders, can make a big difference in how efficiently your team works. By combining secure authentication, webhook integration, and custom logic, you can reduce manual effort and keep your documents consistent and up to date.

This setup not only saves time but also helps maintain better organization and control over your content. As your needs grow, you can continue to build on this foundation with more advanced automation or integration features.

No Data Found.

Related Articles
From SMBs to Enterprises: Why Salesforce CRM Remains the Choice for Every Business Size

Running a modern business requires a robust Salesforce CRM platform that connects teams, organizes customer data, and delivers real-time operational insights. In today’s competitive environment, waiting for information across disconnected systems is no longer practical, especially when modern buyers expect immediate responses across every channel. For years, the software was primarily associated with large corporate […]

Read More
How to Integrate NikoHealth to Salesforce

Healthcare organizations using NikoHealth often need patient, insurance, order, invoice, and prescription data available inside Salesforce. As data grows, manually updating records across systems becomes difficult and can lead to delays, duplicate work, and data inconsistencies. NikoHealth to Salesforce integration helps solve this challenge by automatically synchronizing data between both platforms. Instead of building custom […]

Read More
Flow Orchestrator vs. Traditional Flows: When to Use Each for Salesforce Automation

Businesses use Salesforce automation to reduce manual work, improve efficiency, and automate repetitive business processes. Two commonly used automation approaches inside Salesforce are Traditional Flows and Flow Orchestrator. Traditional Flows are mainly used for simple automation tasks such as updating records, sending notifications, creating tasks, and automating business logic. Flow Orchestrator is designed for more […]

Read More
The Rise of Agentic Government: How AI Agents Are Transforming Public Services

Government technology has often been seen as slower to evolve than the private sector. But Salesforce’s latest research challenges that idea in a big way. In fact, the new findings suggest that public sector organizations may now be moving faster than many businesses when it comes to adopting AI agents and preparing for a more […]

Read More
How To Use Email Service in APEX

Managing approvals, updates, and record changes directly from email can significantly improve efficiency within Salesforce workflows. Instead of logging in, navigating records, and manually updating fields, users can simply respond to emails and trigger automated updates using Email Service in APEX. This approach is especially useful for businesses leveraging Salesforce automation and looking to enhance […]

Read More
Design and Implementation of Salesforce-Jira Task Integration

Businesses have been using Salesforce for CRM operations and Jira for Agile project tracking. However, without integration, teams manually update both systems, leading to data inconsistency and inefficiency.This mechanism establishes a real-time integration between Salesforce and Jira, allowing seamless synchronization of tasks and agile board statuses.  A custom Salesforce dashboard was developed that replicates Jira-style […]

Read More
Our Location worldwide
Indian Flag India
7th Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203669505
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
CA Flag Canada
HIC Global Solutions INC
6D - 7398 Yonge St #1124 Thornhill, ON L4J 8J2 Canada +1(262) 310-7818