Create IT Glue Attachment
itglue_create_attachmentAttach a file (PDF, image, config export) to an IT Glue record such as a document or flexible asset, using base64, URL, file path, or upload ID. The file appears in the record's Attachments panel.
Instructions
Attach a file (PDF, image, config export, …) to a record (document, flexible asset, configuration, etc.). The file appears in the record's Attachments side panel — it is NOT shown inside a document's body. To place a picture inside a document (inline in a Text/Step section or in a Gallery), use itglue_create_document_image instead. Provide exactly one source: content_base64 (small files only), url (the server fetches it), file_path (local stdio runs only), or upload_id (a file the client PUT via itglue_request_upload — use this for anything on the client's disk). Give file_name with an extension (e.g. network-diagram.pdf) so IT Glue detects the type; it is inferred from url/file_path/upload when omitted. Max 25 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL the server fetches and base64-encodes | |
| file_name | No | Display file name with extension; inferred from url/file_path if omitted | |
| file_path | No | Local filesystem path to read (stdio transport only) | |
| upload_id | No | ID from itglue_request_upload after the client has PUT the file to the returned URL — the server reads the bytes itself | |
| resource_id | Yes | The parent record ID | |
| resource_type | Yes | The record type to attach to | |
| content_base64 | No | Base64-encoded file bytes (a leading data: URI prefix is stripped) — small files only | |
| response_format | No | Output format: human-readable markdown (default) or structured JSON | markdown |