Tool

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.

Salesforce

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

NameTypeDescription
Namerequiredstring

Name of the attached file. Max 255 characters.

filePathOrContentrequiredstring

The file to attach. Provide either a file URL, a path to a file in the /tmp directory (for example, /tmp/myFile.txt), or base64-encoded file data.

ContentTyperequiredstring

The content type (MIME type) of the attachment. For example, image/png.

ParentIdrequiredstring

ID of the parent object of the attachment. See the documentation for supported objects.

Descriptionstring

Description of the attachment. Max 500 characters.

IsPrivateboolean

Whether this record is viewable only by the owner and administrators (true) or viewable by all otherwise-allowed users (false).

OwnerIdstring

ID of the user who owns the attachment.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .