Upload Attachment
servicenow_upload_attachmentUpload a file to a ServiceNow record by specifying the table, record sys_id, file name, content, and MIME type. Supports text and base64 binary content with optional encryption.
Instructions
Upload a file as an attachment to a ServiceNow record.
Args:
table_name (string): Table of the parent record (e.g., incident, change_request)
table_sys_id (string): sys_id of the parent record
file_name (string): Name for the file (e.g., "report.txt", "screenshot.png")
content (string): File content (text for text files, base64 for binary files)
content_type (string): MIME type (e.g., "text/plain", "application/json", "image/png")
encrypt (boolean): Encrypt the attachment at rest (default: false)
Returns: The created attachment record with sys_id and download link
Examples:
Attach a log file to an incident → table_name="incident", table_sys_id="...", file_name="server.log", content="...", content_type="text/plain"
Attach JSON config → file_name="config.json", content_type="application/json"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | File content (text as-is, binary as base64) | |
| encrypt | No | Encrypt attachment at rest | |
| file_name | Yes | Filename including extension | |
| table_name | Yes | ServiceNow table name (e.g., incident, change_request, sys_user) | |
| content_type | No | MIME type of the file (default: text/plain) | text/plain |
| table_sys_id | Yes | ServiceNow sys_id (32-character GUID) of the record | |
| response_format | No | Output format: 'markdown' (default) for human-readable or 'json' for structured data | markdown |