Attachment mention element
This is a rich text element, compatible only with the rich_text block. It must be used within the rich_text_list, rich_text_quote, or rich_text_section block element within the rich_text block's elements array.
Fields
| Field | Type | Description | Required? |
|---|---|---|---|
type | String | The type of object; in this case, "attachment_mention". | Required |
url | String | The URL of the app attachment or entity to reference. | Required |
text | String | Fallback text if attachment not found. | Optional |
app_id | String | The app ID that produced the unfurl. Used to fetch the app's profile for use in rendering. | Optional |
entity_id | String | The Work Object entity ID when the attachment is a Work Object. | Optional |
icon_url | String | An optional override of the icon URL. This will typically be used for adding the Work Object product icon, which can be different from the app's icon. | Optional |
channel_id | String | The encoded channel ID where this attachment lives. | Optional |
ts | String | The encoded message timestamp where this attachment lives. | Optional |
full_size_preview_enabled | Boolean | Whether the work object supports full size preview. | Optional |
icon_name | String | An optional icon name identifier for the attachment (e.g., sf-account, sf-record, sf-list for Salesforce attachments). | Optional |
reference_object_type | String | An optional type identifier for the referenced object (e.g., list_view, record for Salesforce attachments). | Optional |
product_name | String | The product name for the Work Object (e.g., Google Docs, Google Sheets). Used to determine per-product click behavior preferences when the attachment is not available. | Optional |
style | Object | An object of optional boolean properties that dictate style: bold, italic, strike, highlight, client_highlight, underline, and unlink. | Optional |
Example
- JSON
{
"blocks": [
{
"type": "rich_text",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "attachment_mention",
"url": "https://example.com/attachment"
}
]
}
]
}
]
}