Skip to main content

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

FieldTypeDescriptionRequired?
typeStringThe type of object; in this case, "attachment_mention".Required
urlStringThe URL of the app attachment or entity to reference.Required
textStringFallback text if attachment not found.Optional
app_idStringThe app ID that produced the unfurl. Used to fetch the app's profile for use in rendering.Optional
entity_idStringThe Work Object entity ID when the attachment is a Work Object.Optional
icon_urlStringAn 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_idStringThe encoded channel ID where this attachment lives.Optional
tsStringThe encoded message timestamp where this attachment lives.Optional
full_size_preview_enabledBooleanWhether the work object supports full size preview.Optional
icon_nameStringAn optional icon name identifier for the attachment (e.g., sf-account, sf-record, sf-list for Salesforce attachments).Optional
reference_object_typeStringAn optional type identifier for the referenced object (e.g., list_view, record for Salesforce attachments).Optional
product_nameStringThe 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
styleObjectAn object of optional boolean properties that dictate style: bold, italic, strike, highlight, client_highlight, underline, and unlink.Optional

Example

{
"blocks": [
{
"type": "rich_text",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "attachment_mention",
"url": "https://example.com/attachment"
}
]
}
]
}
]
}

View in Block Kit Builder