Upload Attachment
upload_attachmentUpload a file attachment to a ServiceNow record using base64-encoded content. Specify the table, record sys_id, file name, and content type.
Instructions
Upload a file attachment to a ServiceNow record. The file content must be provided as a base64-encoded string.
IMPORTANT: This creates an attachment on the ServiceNow instance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | The ServiceNow instance auth alias (e.g., "myinstance", "prod"). If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| table | Yes | The table name the record belongs to (e.g., "incident", "change_request"). | |
| record_sys_id | Yes | The sys_id of the record to attach the file to. | |
| file_name | Yes | The file name including extension (e.g., "report.pdf", "data.csv"). | |
| content_type | Yes | The MIME content type (e.g., "application/pdf", "text/csv", "image/png", "application/json"). | |
| content_base64 | Yes | The file content encoded as a base64 string. For text files, encode the text content to base64 before passing. |