Capabilities
- Retrieves a list of your search queries performed in Glean during a specified time period.
- Analyze historical search behavior to identify trends or recurring topics.
- Use in Glean Agents to power workflows that require search history context.
- Only retrieves search queries for the authenticated user and you cannot access other users search histories.
Limitations
- The action returns raw search queries, which may include sensitive or personally identifiable information (PII).
- The date range must be valid, start date before end date, formatted as yyyy-mm-dd.
- Results are limited to the available search history within your organization’s data retention policy.
Prerequisites and permissions
- You must have an active Glean account and you must be signed in.
- No special permissions are required beyond standard user access.
- The action is available in Glean Agents and may require your admin to enable it in the agent builder or action pack configuration.
Inputs
| Name | Type | Required | Default | Allowed values | Example | Notes |
|---|---|---|---|---|---|---|
| start_date | string | Yes | None | yyyy-mm-dd, week ago | 2025-03-01 | Inclusive. The beginning of the period to retrieve search queries from. |
| end_date | string | Yes | None | yyyy-mm-dd, now | 2025-03-08 | Exclusive. Must be after start_date. |
- Both dates must be provided in ISO format (yyyy-mm-dd) or as relative phrases like last week or now.
Outputs
- Returns a JSON object containing details of the user’s search queries within the specified period.
- Each entry typically includes:
- Query text
- Timestamp
- Additional metadata if available, such as search context.
- Example output:
Usage examples
-
Minimal:
“What did I search for last week?”
Returns all your search queries from the previous week. -
Typical:
“List all my searches from March 1 to March 8, 2025.”
Returns your search queries between those dates. -
Advanced:
“Show my search history for the last month and highlight repeated queries.”
Returns your search queries for the last month; further analysis can be performed on the output.
Troubleshooting
| Error message | Cause | Fix |
|---|---|---|
| Invalid date format | Dates not in yyyy-mm-dd or recognized phrase | Use ISO format or supported relative phrases. |
| End date must be after start date | end_date is before or equal to start_date | Adjust the date range so end_date is after start_date. |
| No search history found | No queries in the specified period | Try a different or broader date range. |
| Permission denied | User not authenticated or lacks access | Sign in to Glean and ensure you have standard user access. |
FAQs
Can I retrieve another user’s search history?
Can I retrieve another user’s search history?
No. The action only allows you to access your own search queries.
Are search queries redacted for PII?
Are search queries redacted for PII?
No. Raw search queries are shown. If your organization requires redaction, the admin can disable this feature.
What is the maximum date range I can query?
What is the maximum date range I can query?
This depends on your organization’s data retention policy and system limits. If you receive partial results, try narrowing the date range.