> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Chat By ID

Retrieves the chat history between Glean Assistant and the user for a given Chat.

**Note**, this action belongs to `Glean Chat API`, therefore requires using either the `Global Client Token` or the `User Client Token` connection methods.

<Note>
  External Documentation

  To learn more, visit the [Glean documentation](https://developers.glean.com/api/client-api/chat/getchat).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter       | Description                                                                                                              |
  | --------------- | ------------------------------------------------------------------------------------------------------------------------ |
  | Chat ID         | The ID of the Chat to be retrieved. Can be obtained by using the `List Chats` action.                                    |
  | Timezone Offset | The offset of the client's timezone in minutes from UTC. For example, `PTD` is `-420` because it's 7 hours behind `UTC`. |
</div>

## Example Output

```json theme={"dark"}
{
	"chatResult": {
		"chat": {
			"messages": [
				{
					"agentConfig": {
						"agent": "DEFAULT",
						"mode": "DEFAULT"
					},
					"author": "USER",
					"citations": [
						{
							"trackingToken": "string",
							"sourceDocument": {
								"id": "string",
								"datasource": "string",
								"docType": "string",
								"title": "string",
								"url": "string",
								"metadata": {
									"container": "container",
									"parentId": "JIRA_EN-1337",
									"createTime": "2000-01-23T04:56:07.000Z",
									"author": {
										"name": "name"
									},
									"documentId": "documentId",
									"status": [
										"Done"
									]
								}
							},
							"sourcePerson": {
								"name": "George Clooney",
								"obfuscatedId": "abc123"
							}
						}
					],
					"fragments": [
						{
							"structuredResults": [
								{
									"document": {
										"title": null,
										"url": null,
										"metadata": null
									},
									"person": {
										"name": "George Clooney",
										"obfuscatedId": "abc123"
									},
									"code": {
										"repoName": "scio",
										"fileName": "README.md",
										"matches": [
											{
												"lineNumber": 1,
												"content": "Welcome to the beginning"
											},
											{
												"lineNumber": 2,
												"content": "Second line of the file"
											}
										]
									}
								}
							]
						}
					],
					"trackingToken": "string",
					"text": "string"
				}
			],
			"id": "string",
			"createTime": 0,
			"createdBy": {
				"name": "George Clooney",
				"obfuscatedId": "abc123"
			},
			"updateTime": 0,
			"name": "string"
		}
	}
}
```

## Workflow Library Example

[Get Chat by Id with Glean and Send Results Via Email](https://library.blinkops.com/workflows/get-chat-by-id-with-glean-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/get-chat-by-id-with-glean-and-send-results-via-email/canvas" />
</div>
