Info_Attachments
Read and upload attachments in the sheets of your Smartsheet account.
Table Specific Information
SELECT
Queries on this table may be slow if your account contains many sheets. To improve performance, specify SheetId. You can also use DiscussionId, RowId, or CommentId to retrieve attachments for the related object.Retrieve all attachments from all sheets.
SELECT * FROM Info_Attachments
Retrieve all attachments in a specific sheet.
SELECT * FROM Info_Attachments WHERE SheetId = '2940085806098308'
Retrieve all attachments in a specific discussion.
SELECT * FROM Info_Attachments WHERE SHEETId = '2940085806098308' AND DiscussionId = '8206230771525508'
Retrieve all attachments in a specific row of a sheet.
SELECT * FROM Info_Attachments WHERE SheetId = '2940085806098308' AND RowId = '6773684447799172'
Retrieve all attachments in a specific comment of a sheet.
SELECT * FROM Info_Attachments WHERE SheetId = '2940085806098308' AND CommentId = '1322606759569284'
Retrieve details of a specific attachment in a sheet.
SELECT * FROM Info_Attachments WHERE SheetId = '2940085806098308' AND Id = '3053958945105796'
INSERT
You can create an attachment in:- A sheet. In this case, the SheetId column is required.
- A row in a sheet. In this case, the SheetId and RowId columns are required.
- A comment in a sheet. In this case, the SheetId and CommentId columns are required.
The Name column is required in every case. Other required columns vary depending on the type of attachment you are creating. Refer to the query examples below.
INSERT INTO Info_Attachments (SheetId, Name, AttachmentType, URL) VALUES ('2940085806098308', 'Link Attachment', 'LINK', 'https://cdata.com')
INSERT INTO Info_Attachments (SheetId, RowId, Name, AttachmentType, AttachmentSubType, URL) VALUES ('2940085806098308', '6773684447799172', 'Sheet Attachment', 'GOOGLE_DRIVE', 'SPREADSHEET', 'https://docs.google.com/spreadsheets/d/xxxx_yyyy/edit?usp=drive_link')
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The unique identifier of the attachment. | |
| Name | String | False |
The name of the attachment. | |
| Url | String | False |
The temporary URL of the attachment. | |
| UrlExpiresInMillis | Long | True |
The temporary URL time to live for the attachment. | |
| AttachmentType | String | False |
The attachment type. Possible values are: 'FILE', 'GOOGLE_DRIVE', 'LINK', 'BOX_COM', 'DROPBOX', 'EVERNOTE', and 'EGNYTE'. | |
| AttachmentSubType | String | False |
The attachment subtype, valid only for either 'GOOGLE_DRIVE' attachments or 'EGNYTE' attachments. Possible values for 'GOOGLE_DRIVE' attachments: 'DOCUMENT', 'SPREADSHEET', 'PRESENTATION', 'PDF', 'DRAWING'. Possible values for 'EGNYTE' attachments: 'FOLDER'. | |
| CreatedAt | Timestamp | True |
A timestamp of when the attachment was originally added. | |
| UserId | String | True |
The unique identifier of the user who created the attachment. | |
| UserEmail | String | True |
The email address of the user who created the attachment. | |
| UserName | String | True |
The full name of the user who created the attachment. | |
| MimeType | String | True |
Attachment MIME type. For example 'PNG'. | |
| ParentType | String | True |
The type of the object the attachment belongs to. Possible values: 'SHEET', 'ROW', or 'COMMENT'. | |
| ParentId | String | True |
The unique identifier of the object the attachment belongs to. | |
| SizeInKb | Long | True |
The size of the file, if the attachment is a file. | |
| SheetId | String | False |
The Id of the sheet. | |
| RowId | String | False |
The Id of the row. | |
| DiscussionId | String | True |
The Id of the discussion. | |
| CommentId | String | False |
The Id of the comment. | |
| Description | String | False |
The description of the attachment. |