Overview

Glean supports crawling and indexing Salesforce Files, allowing users to find and question file content directly in Glean Search and Assistant. The connector respects all Salesforce permissions, ensuring users can only see the files they are authorized to access.

Prerequisites

  • Verify the Salesforce admin account has the Query All Files permission.
  • Ensure your Salesforce connector is set up per the Salesforce Connector Overview.

Quick Start Checklist

  • Authorize the connector with a Salesforce admin account.
  • Add ContentDocument to the list of objects to crawl.
  • Enter the custom login domain during setup, if your Salesforce org uses a custom login domain (for example, a sandbox).
  • Validate the setup by searching for a known file in Glean after the crawl is complete.

How it Works

The Glean connector crawls Salesforce Files, which are represented by the ContentDocument object. This process follows the connector’s standard crawl behavior and limits.

What Gets Indexed

  • Object: ContentDocument. Glean fetches file content through the related ContentVersion record.
  • File Types (default): PDF, DOCX, TXT, and HTML.
  • File Size: Files up to 64 MB are fully indexed for search. Files larger than 64 MB are indexed by their metadata only.
  • Unsupported Files: The connector does not support encrypted or compressed files or rich media such as images and videos.

How Permissions Work

A single file can be linked to multiple records (for example, an Opportunity, a Case, and a Contact) via the ContentDocumentLink object. Glean computes the union of permissions from all linked records for that file.
  • Permissions from indexed records: If a file is linked to multiple records that are indexed by Glean, a user can access the file if they have permission to view any one of those linked records.
  • Permissions from non-indexed records: If a file is linked to a record that Glean does not index (e.g., a custom object not in the crawl list), the permissions from that specific link will not be applied.

Setup

To enable Salesforce document attachments, follow these steps in the Glean Admin Console.
  1. In Glean Admin, navigate to your Salesforce data source and open the Setup tab.
  2. In the list of Salesforce objects to be crawled, add ContentDocument.
    • Note: Do not add ContentDocumentLink to the list; it is used internally by Glean for permission resolution. The Attachment object is a legacy object and is not recommended for new setups.
  3. If your organization uses a sandbox or a non-standard login endpoint, set the optional custom login domain.
  4. Click Authorize and complete the OAuth flow using a Salesforce admin account that has the Query All Files permission.
  5. Click Save to save the changes. The connector will begin to crawl the ContentDocument objects.
Salesforce Attachment Setup

FAQs