Skip to main content

Glean

Glean is an enterprise search and knowledge discovery platform that helps organizations find and access information across all their tools and systems. The Glean connector reads search results, documents, people, chats, agents, and other content through Glean's Client API, and sends documents, permissions, users, groups, employees, and teams to Glean's Indexing API.

Glean icon

Power end-to-end data operations for your Glean API with Nexla. Our bi-directional Glean connector is purpose-built for Glean, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Glean or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Glean workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites​

Glean issues two kinds of API token, and each Glean template works with only one of them:

TokenUsed by
Client API tokenThe 25 data source templates that read from Glean, such as Search, Get Document, and List People.
Indexing API tokenAll destination templates, plus the Get Datasource Config, Get Datasource Status (Beta), and Check Document Access data source templates.

A Nexla credential holds one token. If you plan to both read from Glean and send data to it, create two credentials: one with a Client API token and one with an Indexing API token. Both kinds of token are sent in the Authorization header as Bearer <token>.

You also need your Glean instance name for the Domain field. It is the part of your Glean API URL before -be.glean.com; for example, if your API URL is https://acme-be.glean.com, the domain is acme.

Create a Client API token​

  1. In the Glean admin console, open Client API token management, and click Add New Token.

  2. Under Permissions, select USER, and enter the User Email of the Glean user whose access the token should have. The templates return what that user can see in Glean.

    The connector does not send the X-Glean-ActAs header, which Glean requires for global Client API tokens. A token with GLOBAL permissions will not work with this connector; use a user-scoped token.

  3. Under Scopes, select every scope for the templates you plan to use. To use all of the Client API templates, select SEARCH, DOCUMENTS, SUMMARIZE, CHAT, AGENTS, TOOLS, ANSWERS, COLLECTIONS, PINS, SHORTCUTS, VERIFICATION, ENTITIES, and PEOPLE. Each template below lists the scope it needs.

    Glean does not let you change a token's scopes after it is created. If you need a scope later, create a new token with all of the scopes you need, and update the Nexla credential with it.

  4. Optionally set an expiration date, and save the token. Glean shows the token only once, so copy it and store it securely.

Super Admins can create user-scoped tokens for any user; Admins and API Token Creators can create them only for themselves. For details, see Glean's Client API authentication guide.

Create an Indexing API token​

  1. In the Glean admin console, go to Platform > API Tokens, open the Indexing Tokens tab, and click Add API token.

  2. Either turn on Has global permissions so the token works with every datasource, or leave it off and list the custom datasources the token may use under Scopes. A datasource-limited token works only with those datasources, so the datasource you enter in a template or send in a record must be one of them.

  3. Set Expires On (Glean requires it), and save the token. Glean shows the token only once, so copy it and store it securely.

Setup Admins, Admins, and Super Admins can create global or datasource-limited Indexing tokens; API Token Creators can create datasource-limited tokens only. For details, see Glean's Indexing API authentication guide.

Authenticate​

Credentials required​

FieldRequiredSecretDescription
DomainYesNoYour Glean instance name: the part of your Glean API URL before -be.glean.com. For https://acme-be.glean.com, enter acme. Do not include -be, https://, or .glean.com.
API TokenYesYesA Glean Client API token (for the data source templates) or Indexing API token (for the destination templates and the three Indexing API data source templates). See Prerequisites.

Create a credential in Nexla​

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – Glean

GleanCred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field. Include the token kind in the name, for example Glean (Client API) or Glean (Indexing API), so you can tell the credentials apart later.

  2. Enter your Glean instance name in the Domain field, for example acme if your Glean API URL is https://acme-be.glean.com. Nexla adds -be.glean.com to build the request URL.

    Enter only the instance name. If you enter acme-be or acme-be.glean.com, Nexla builds a URL with the wrong host (such as https://acme-be-be.glean.com), and requests fail.

  3. Enter the Client API token or Indexing API token in the API Token field. Nexla sends it in the Authorization header as Bearer <token>.

    The API token is sensitive and should be kept secure. If it is exposed, revoke it in the Glean admin console, create a new token, and update this credential.

  4. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source​

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Glean connector tile, then select the credential that will be used to connect to your Glean instance, and click Next; or, create a new Glean credential for use in this flow. Use a credential with a Client API token for all templates except the three under Indexing API reads, which need an Indexing API token.

Endpoint templates​

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Glean endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below, grouped by area.

Each template makes a single request per run and returns the records in that response; Nexla does not page through results automatically. Templates with a Cursor setting return one page, sized by Page Size. Each template lists the Client API token scope it needs; a token without that scope gets an authorization error from Glean. Text settings are inserted into the JSON request body as entered, so avoid double quotation marks and backslashes in them.

Search and discovery​

Search

Searches everything in Glean that the token's user can see, such as documents, tickets, and messages, and returns ranked results with each result's title, URL, snippets, and datasource.

  • Scope: SEARCH.
  • Enter the Query, for example vacation policy. Glean search operators such as app:confluence or updated:past_week work here.
  • Optionally set Page Size (default 20) and Cursor. Leave Cursor empty for the first page; to read the next page, enter the cursor value from the previous response.
  • See the Glean API reference for the response fields.

Autocomplete

Returns query suggestions and matching documents for a partly typed query. Use it to turn a vague term into likely search queries or document titles.

  • Scope: SEARCH.
  • Enter the Query (the partial text). Optionally set Result Size (default 10).
  • See the Glean API reference for the response fields.

Recommend Documents

Returns documents related to a given document.

  • Scope: SEARCH.
  • Enter the Document ID: the Glean document ID, which is the document.id of a Search result. Optionally set Page Size (default 20).
  • See the Glean API reference for the response fields.

Get Feed

Returns the user's personalized Glean home feed: suggested and trending documents, announcements, mentions, meetings, and verification reminders.

List Search Datasources

Lists the datasources (apps) that can be searched in your Glean instance, with their filter values. Use it to find valid app and datasource names before filtering a search.

  • Scope: SEARCH.
  • No settings are required. This template calls Glean's Platform API (GET /api/search/filters).
  • See the Glean API reference for the response fields.

Documents​

Get Document

Returns one document's metadata, such as its title, URL, datasource, author, and create and update times, by its Glean document ID.

  • Scope: DOCUMENTS.
  • Enter the Document ID: the document.id of a Search result.
  • See the Glean API reference for the response fields.

Get Document by URL

Returns one document's metadata, such as its title, datasource, author, and create and update times, by the document's URL in its source app.

  • Scope: DOCUMENTS.
  • Enter the Document URL, for example a Confluence page or Google Docs link.
  • See the Glean API reference for the response fields.

Summarize Document

Generates an AI summary of a document, optionally focused on a question.

  • Scope: SUMMARIZE.
  • Enter the Document ID: the document.id of a Search result. Optionally enter a Focus Question.
  • See the Glean API reference for the response fields.

Glean Assistant and chats​

Ask Glean Assistant

Asks Glean Assistant a question and returns its answer, written from your company's knowledge with cited sources. Use it when you need a written answer rather than a list of results.

  • Scope: CHAT.
  • Enter the Question, for example What is our parental leave policy?
  • The request is sent with saveChat set to false, so the conversation is not saved in Glean and does not appear in List Chats.
  • See the Glean API reference for the response fields.

List Chats

Lists the user's saved Glean Assistant chats with each chat's ID, name, and creation time. Messages are not included; use Get Chat to read them.

Get Chat

Returns the full message history of one saved Glean Assistant chat.

  • Scope: CHAT.
  • Enter the Chat ID. Use the List Chats template to find it.
  • See the Glean API reference for the response fields.

Agents and tools​

The three agent templates call Glean's Platform API under /api/agents.

Search Agents

Searches the Glean agents built in Agent Builder by name, and returns each agent's ID, name, and description.

  • Scope: AGENTS.
  • Optionally enter an Agent Name. Leave it empty to list all agents the user can see.
  • See the Glean agents API overview for the response fields.

Get Agent

Returns one Glean agent's details, such as its name, description, and capabilities.

  • Scope: AGENTS.
  • Enter the Agent ID. Use the Search Agents template to find it.
  • See the Glean agents API overview for the response fields.

Get Agent Schemas

Returns a Glean agent's input and output schemas. Use it to see which inputs an agent expects.

  • Scope: AGENTS.
  • Enter the Agent ID. Use the Search Agents template to find it.
  • See the Glean agents API overview for the response fields.

List Tools

Lists the Glean tools (actions) available to the user, with each tool's name, description, and input schema.

Answers, collections, pins, shortcuts, and verifications​

Get Answer

Returns one Glean Answer (a curated question-and-answer entry) with its question, answer body, author, and verification state.

  • Scope: ANSWERS.
  • Enter the numeric Answer ID. To find answers, use the Search template with a query that includes app:answers.
  • See the Glean API reference for the response fields.

List Collections

Lists Glean Collections (curated groups of documents) with each collection's name, description, owner, and item count.

  • Scope: COLLECTIONS.
  • Optionally enter a Query to match collection names. Leave it empty to list all collections.
  • See the Glean API reference for the response fields.

Get Collection

Returns one collection with its items (the linked documents and URLs).

  • Scope: COLLECTIONS.
  • Enter the numeric Collection ID. Use the List Collections template to find it.
  • See the Glean API reference for the response fields.

List Pins

Lists pins: documents that admins have pinned to the top of the results for specific search queries.

List Shortcuts

Lists the Go Links (shortcuts) that the user owns or can edit, with each link's alias, destination URL, and owner.

  • Scope: SHORTCUTS.
  • Optionally enter a Query to match aliases, and set Page Size (default 20) and Cursor. Leave Cursor empty for the first page.
  • See the Glean API reference for the response fields.

Get Shortcut

Returns one Go Link with its destination URL, owner, and description. Use it to find where go/<alias> points.

  • Scope: SHORTCUTS.
  • Enter the Alias without the go/ prefix, for example benefits.
  • See the Glean API reference for the response fields.

List Verifications

Lists the documents the user owns that need verification, with each document's verification state and due date.

  • Scope: VERIFICATION.
  • Optionally set Count, the maximum number of documents to return (default 50).
  • See the Glean API reference for the response fields.

People and teams​

List People

Lists people in your company directory with each person's name, title, department, email, and manager.

  • Scopes: ENTITIES and PEOPLE.
  • Optionally enter a Query (a name or other text) to filter the list; leave it empty to list everyone. Optionally set Page Size (default 20) and Cursor.
  • See the Glean API reference for the response fields.

Get Person

Returns one person's directory profile, such as their name, title, department, manager, direct reports, and location.

  • Scopes: ENTITIES and PEOPLE.
  • Enter the person's work Email.
  • See the Glean API reference for the response fields.

List Teams

Lists teams in your company directory with each team's name, description, and members.

  • Scopes: ENTITIES and PEOPLE.
  • Optionally enter a Query to match team names; leave it empty to list all teams. Optionally set Page Size (default 20) and Cursor.
  • The result is empty if no teams are set up in your Glean instance.
  • See the Glean API reference for the response fields.

Indexing API reads​

These three templates call the Indexing API, so they need a credential with an Indexing API token, not a Client API token. If the token is limited to specific datasources, enter one of those datasources.

Get Datasource Config

Returns the configuration of a custom datasource.

  • Enter the Datasource: the custom datasource name as registered in Glean.
  • See the Glean API reference for the response fields.

Get Datasource Status (Beta)

Returns the overall indexing status of a custom datasource. Glean marks this endpoint as beta, so it may change without notice.

  • Enter the Datasource: the custom datasource name as registered in Glean.
  • See the Glean API reference for the response fields.

Check Document Access

Checks whether a user can see a document in a custom datasource.

  • Enter the Datasource, the document's Object Type (as defined in the datasource), the Glean Document ID, and the User Email of the user to check.
  • The datasource must be one that the Indexing token can index.
  • Values that contain quotation marks, backslashes, or an equals sign are not supported.
  • See the Glean API reference for the response fields.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving. Testing Ask Glean Assistant or Summarize Document runs the request in Glean, which generates a new answer or summary each time.

Manual configuration​

Glean data sources can also be manually configured to ingest data from any valid Glean API endpoint not covered by the pre-built templates. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers. Client API endpoint URLs take the form https://<domain>-be.glean.com/rest/api/v1/...; see the Glean Client API reference for the available endpoints.

Not yet available as templates:

  • Listing documents by facet needs a feature that Glean must enable on your instance.
  • Document permissions (reading who can access a document) needs the DOCPERMISSIONS scope.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Glean data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination​

Click the + icon on the Nexset that will be sent to the Glean destination, and select the Send to Destination option from the menu. Select the Glean connector from the list of available destination connectors, then select a credential with an Indexing API token, and click Next; or, create a new Glean credential for use in this flow. Destination templates do not work with a Client API token.

Endpoint templates​

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Glean endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

Every destination template sends a POST request to Glean's Indexing API at https://<domain>-be.glean.com/api/index/v1/.... Each record in the Nexset is sent as the JSON body of one request, one record at a time, so shape each record to match the request body that Glean documents for the endpoint. If the Indexing token is limited to specific datasources, every record must name one of them. Templates are marked Side effect when they delete more than the record names.

Documents​

Index Document

Adds a document to the index, or updates the document if it already exists. Each record must include document (the document definition, with its datasource and ID).

Index Documents

Adds or updates a batch of documents in one datasource. Each record must include datasource and a documents array. Glean accepts up to 600 documents per minute on this endpoint.

Update Document Permissions

Changes who can see a document without changing its content. Each record needs datasource and permissions, plus the document's id or viewURL.

Delete Document

Deletes a document from the index. Each record needs datasource, objectType, and id. The request succeeds if the document is not in the index.

  • Side effect: the document is removed from Glean search.
  • See the Glean API reference for the request body fields.

Process All Documents

Asks Glean to process uploaded documents now instead of on its regular schedule. Send one record with datasource.

  • Glean allows one call per datasource every 3 hours.
  • See the Glean API reference for the request body fields.

Datasources​

Add or Update Datasource

Adds or updates a custom datasource and its schema. Each record is a CustomDatasourceConfig.

Datasource users, groups, and memberships​

Index User

Adds or updates a datasource user. Each record needs datasource and user.

Delete User

Deletes a datasource user and that user's memberships. Each record needs datasource and email.

  • Side effect: the user's memberships are deleted too.
  • See the Glean API reference for the request body fields.

Index Group

Adds or updates a group in a datasource. Each record needs datasource and group.

Delete Group

Deletes a group and its memberships from a datasource. Each record needs datasource and groupName.

  • Side effect: the group's memberships are deleted too.
  • See the Glean API reference for the request body fields.

Index Membership

Adds a group membership in a datasource. Each record needs datasource and membership.

Delete Membership

Deletes a group membership from a datasource. Each record needs datasource and membership.

Process All Memberships

Asks Glean to process uploaded group memberships now instead of on its regular schedule. Send one record with datasource; without it, Glean processes all custom datasources.

Employees and teams​

Index Employee

Adds an employee, or replaces the stored information about an employee.

Delete Employee

Deletes an employee. The request succeeds if the employee is not present.

Index Team

Adds a team, or updates the stored information about a team.

Delete Team

Deletes a team by ID.

Process All Employees and Teams

Asks Glean to process uploaded employee and team data now instead of on its regular schedule.

  • The API takes no request body, so the record's content is not used; send one record per run.
  • See the Glean API reference for the request body fields.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to send a test payload. The result will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the destination is configured correctly before saving. The test sends a real request, so test delete templates with records you can afford to lose.

Manual configuration​

Glean destinations can also be manually configured to send data to any valid Glean API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

Glean's Indexing API expects JSON request bodies at https://<domain>-be.glean.com/api/index/v1/<endpoint>. Nexla adds the Authorization: Bearer <token> header from the credential. See the Glean Indexing API reference for the available endpoints.

Save & activate​

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured Glean endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the Glean endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.