upload_attachment
Upload files to Pega as temporary attachments for linking to cases, with automatic expiration after 2 hours if unused. Supports multiple input methods including file paths, base64 content, and URLs for cross-client compatibility.
Instructions
Upload a file to Pega as a temporary attachment that can later be linked to cases. Creates a temporary attachment instance that auto-expires after 2 hours if not linked. Supports multiple input methods for cross-client compatibility.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | No | Path to file on local filesystem (preferred for desktop clients like Cline). Example: "/home/user/document.pdf" or "C:\Users\user\file.txt" | |
| fileContent | No | Base64-encoded file content (for web clients or when file system access is restricted). Use this when filePath is not available. | |
| fileUrl | No | URL to file that can be fetched (http://, https://, file://, data:// schemes). Alternative when direct file access is not possible. | |
| fileName | No | Original filename with extension (required when using fileContent or fileUrl). Example: "report.pdf", "image.jpg" | |
| mimeType | No | MIME type override (auto-detected from filename/content if not provided). Example: "application/pdf", "image/jpeg" | |
| appendUniqueIdToFileName | No | Whether to append a unique identifier to the filename to prevent naming conflicts. Pega will add timestamp-based unique ID to filename. | |
| sessionCredentials | No | Optional session-specific credentials. If not provided, uses environment variables. Supports two authentication modes: (1) OAuth mode - provide baseUrl, clientId, and clientSecret, or (2) Token mode - provide baseUrl and accessToken. |