Skip to main content
The retrieve chat insights action enables you to access and review your past chat queries within Glean. By specifying a time window, you can retrieve raw chat queries which can help you understand your information-seeking patterns and recurring topics over time by using analyzing tools. This action is read-only, does not modify any data, and is idempotent that is repeated requests with the same parameters yield the same results. Supports pagination for large result sets (if applicable). The action returns partial results if the time window is too large or if there are system-imposed limits. Results are typically returned in chronological order.

Capabilities

  • Retrieve your chat queries from Glean for a specified time period.
  • Supports filtering by custom date ranges like last week, last month, or specific start and end dates.
  • Returns raw chat queries.
  • You can use this action agent workflows to provide context-aware, personalized responses based on your chat history.
  • Only retrieves chat queries for the authenticated user and you cannot access other users chat histories.

Limitations

  • The action does not analyze or summarize chat content by itself. To generate summaries or further analysis, combine this step with a Think or Respond step in your workflow.
  • Data retention is subject to your organization’s chat history policy.
  • If chat history is disabled for your organization or user, this action may not return results.
  • Large time windows like over 14 days may result in slower performance or incomplete results in some cases.

Prerequisites and permissions

  • You must be authenticated in Glean and have access to the Assistant and chat features.
  • Chat history must be enabled for your account or organization.
  • No additional connectors or scopes are required beyond standard Glean access.

Inputs

NameTypeRequiredDefaultAllowed valuesExampleNotes
start_datedateYesNoneyyyy-mm-dd, week ago2025-03-01Inclusive. The beginning of the time window for chat retrieval.
end_datedateYesNoneyyyy-mm-dd, now2025-03-08Exclusive. Must be after start_date. End of the time window.
  • Dates can be provided as absolute like 2025-03-01 or relative like week ago, now.
  • The action will extract these values from natural language queries when used in conversational workflows.

Outputs

  • Returns a JSON object containing details of the user’s chat queries within the specified time period.
  • Output fields may include:
    • List of chat queries (text).
    • Timestamps for each query.
  • Example output payload:
{
  "chatsSessions": [
    {
      "timestamp": "2025-03-02T10:15:00Z",
      "query": "How do I access the quarterly report?"
    },
    {
      "timestamp": "2025-03-05T14:30:00Z",
      "query": "List all my open tickets"
    }
  ]
}

Usage examples

  • Minimal:
    “What did I chat about last week?”
    Automatically sets start_date and end_date to cover the previous week.
  • Typical:
    “Show my chat queries from March 1 to March 8, 2025.”
    Returns all chat queries in that date range.
  • Advanced:
    “List all my chats about troubleshooting in the last month.”
    Returns chat queries filtered by topic, further analysis can be performed on the output.

Troubleshooting

Error messageCauseFix
No chat history found for the specified periodNo chats exist in the selected time window, or chat history is disabled.Check your date range and ensure chat history is enabled.
Invalid date range: end_date must be after start_dateThe end date is not after the start date.Adjust your input dates so end_date is after start_date.
Partial results returnedThe time window is too large or system limits were reached.Narrow the date range or try again with a smaller window.
Action unavailableChat history is disabled for your account or organization.Contact your Glean admin to enable chat history.

FAQs

No, you can only retrieve your own chat history.
Data retention is typically 30 days, but your organization’s policy may differ.
No, it only retrieves chat queries. For analysis or summarization, add a Think or Respond step after this action.