Create attachment
The Salesforce REST API Create Attachment tool enables seamless uploading of files as attachments to any supported parent object within Salesforce, enhancing data organization and accessibility.
Features
- Supports attaching files via URL, local /tmp directory path, or base64-encoded data.
- Accepts up to 255 characters for attachment name and 500 characters for description.
- Allows specifying MIME type for precise content handling.
- Enables setting attachment privacy to restrict access to owner and admins only.
- Integrates with Salesforce’s security model by allowing OwnerId assignment for attachments.
Benefits
- Streamlines file management by directly associating attachments with Salesforce records.
- Enhances collaboration by providing easy access to relevant documents within CRM objects.
- Improves data organization for better reporting and retrieval.
- Ensures security and compliance through customizable privacy settings.
- Saves time with automated attachment creation in workflows and integrations.
Description
Creates an Attachment on a parent object. See the documentation
Parameters
7 parameters
| Name | Type | Description |
|---|---|---|
| Namerequired | string | Name of the attached file. Max 255 characters. |
| filePathOrContentrequired | string | The file to attach. Provide either a file URL, a path to a file in the |
| ContentTyperequired | string | The content type (MIME type) of the attachment. For example, |
| ParentIdrequired | string | ID of the parent object of the attachment. See the documentation for supported objects. |
| Description | string | Description of the attachment. Max 500 characters. |
| IsPrivate | boolean | Whether this record is viewable only by the owner and administrators (true) or viewable by all otherwise-allowed users (false). |
| OwnerId | string | ID of the user who owns the attachment. |