> Documentation index: https://developers.google.com/workspace/chat/llms.txt

- [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#SCHEMA_REPRESENTATION)
- [FormattedText](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#FormattedText)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#FormattedText.SCHEMA_REPRESENTATION)
- [FormattedTextElement](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#FormattedTextElement)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#FormattedTextElement.SCHEMA_REPRESENTATION)
- [HyperLink](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#HyperLink)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#HyperLink.SCHEMA_REPRESENTATION)
- [InlineIcon](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#InlineIcon)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#InlineIcon.SCHEMA_REPRESENTATION)
- [TextSyntax](https://developers.google.com/workspace/chat/api/reference/rest/v1/TextParagraph.md.txt#TextSyntax)

A paragraph of text that supports formatting. For an example in Google Chat apps, see [Add a paragraph of formatted text](https://developers.google.com/workspace/chat/add-text-image-card-dialog.md.txt#add_a_paragraph_of_formatted_text). For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages.md.txt#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).

![](https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg) ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Chat apps and Google Workspace add-ons.

| JSON representation |
|---|
| ``` { "text": string, "formattedText": { object (`FormattedText`) }, "maxLines": integer, "textSyntax": enum (`TextSyntax`) } ``` |

| Fields ||
|---|---|
| `text` | `string` The text that's shown in the widget. |
| `formattedText` | ``object (`FormattedText`)`` Optional. A structured representation of the message text, incorporating formatting elements (e.g., bold, italics). If present, this field takes precedence over the `text` field for rendering purposes. <br /> > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview.md.txt), which grants early access to certain features. <br /> |
| `maxLines` | `integer` The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored. |
| `textSyntax` | ``enum (`TextSyntax`)`` The syntax of the text. If not set, the text is rendered as HTML. ![](https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg) Available for Google Chat apps and unavailable for Google Workspace add-ons. |

## FormattedText

Represents a block of text with rich formatting options including styles, hyperlinks, and interactive elements.

<br />

> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview.md.txt), which grants early access to certain features.

<br />

| JSON representation |
|---|
| ``` { "formattedTextElements": [ { object (`FormattedTextElement`) } ] } ``` |

| Fields ||
|---|---|
| `formattedTextElements[]` | ``object (`FormattedTextElement`)`` Optional. FormattedTextElements is a collection of formatted text elements, each with their own styles and content. |

## FormattedTextElement

A single element within a FormattedText message, which can be styled text, a hyperlink, or a chip.

| JSON representation |
|---|
| ``` { "styledText": { object (`StyledText`) }, "hyperlink": { object (`HyperLink`) }, "chip": { object (`Chip`) }, "inlineIcon": { object (`InlineIcon`) } } ``` |

| Fields ||
|---|---|
| Element represents one of several possible elements that can be displayed in the UI. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `styledText` | ``object (`StyledText`)`` StyledText represents text with rich styling options. |
| `hyperlink` | ``object (`HyperLink`)`` HyperLink represents a clickable link that can navigate the user to another location. |
| `chip` | ``object (`Chip`)`` Chip represents a small, interactive element that can display information or perform actions. |
| `inlineIcon` | ``object (`InlineIcon`)`` InlineIcon represents an icon or image displayed inline with text. <br /> > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview.md.txt), which grants early access to certain features. <br /> |
| End of mutually exclusive fields. ||

## HyperLink

Represents a clickable hyperlink element.

| JSON representation |
|---|
| ``` { "link": string, "text": string } ``` |

| Fields ||
|---|---|
| `link` | `string` The destination URL to which the user will be directed upon clicking. |
| `text` | `string` The visible text displayed to the user, representing the hyperlink. |

## InlineIcon

Represents an icon or image embedded inline within formatted text.

<br />

> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview.md.txt), which grants early access to certain features.

<br />

| JSON representation |
|---|
| ``` { "icon": { object (`Icon`) } } ``` |

| Fields ||
|---|---|
| `icon` | ``object (`Icon`)`` Required. Displays the icon inline. Supports built-in icons, custom HTTPS image URLs, and Material symbols. |

## TextSyntax

Syntax to use for formatting text.

![](https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg) Available for Google Chat apps and unavailable for Google Workspace add-ons.

| Enums ||
|---|---|
| `TEXT_SYNTAX_UNSPECIFIED` | The text is rendered as HTML if unspecified. |
| `HTML` | The text is rendered as HTML. This is the default value. |
| `MARKDOWN` | The text is rendered as Markdown. |