Actions252
- Api Keys Actions
- Attachments Actions
- Blocklists Actions
- Calendar Channel Event Associations Actions
- Find Many Calendar Channel Event Associations
- Create One Calendar Channel Event Association
- Create Many Calendar Channel Event Associations
- Find One Calendar Channel Event Association
- Delete One Calendar Channel Event Association
- Update One Calendar Channel Event Association
- Find Calendar Channel Event Association Duplicates
- Companies Actions
- Calendar Channels Actions
- Calendar Event Participants Actions
- Calendar Events Actions
- Connected Accounts Actions
- Favorite Folders Actions
- Favorites Actions
- Message Channel Message Associations Actions
- Find Many Message Channel Message Associations
- Create One Message Channel Message Association
- Create Many Message Channel Message Associations
- Find One Message Channel Message Association
- Delete One Message Channel Message Association
- Update One Message Channel Message Association
- Find Message Channel Message Association Duplicates
- Message Channels Actions
- Message Folders Actions
- View Fields Actions
- Message Participants Actions
- Messages Actions
- Message Threads Actions
- Notes Actions
- Note Targets Actions
- Opportunities Actions
- People Actions
- Tasks Actions
- Task Targets Actions
- Timeline Activities Actions
- View Filter Groups Actions
- View Filters Actions
- View Groups Actions
- Views Actions
- View Sorts Actions
- Webhooks Actions
- Workflow Automated Triggers Actions
- Workflow Runs Actions
- Workflows Actions
- Workflow Versions Actions
- Workspace Members Actions
Overview
This node operation allows you to create a single attachment in the system. It is useful when you want to programmatically add files or references to notes, tasks, opportunities, companies, or persons within your workflow. For example, you might use this node to upload a document related to a task or attach an image to a note automatically as part of a larger automation process.
Properties
| Name | Meaning |
|---|---|
| Depth | Determines how much nested related object information to include in the response: 0 (only primary object), 1 (primary + directly related objects), or 2 (primary + directly related + their related objects). |
| Note Id | The identifier of the note to which the attachment will be linked. |
| Task Id | The identifier of the task to which the attachment will be linked. |
| Author Id | The identifier of the author who created the attachment. |
| Name | The name of the attachment. |
| Type | The type/category of the attachment (e.g., file type or custom classification). |
| Full Path | The full path or location reference of the attachment file. |
| Opportunity Id | The identifier of the opportunity to which the attachment will be linked. |
| Company Id | The identifier of the company to which the attachment will be linked. |
| Person Id | The identifier of the person to which the attachment will be linked. |
Output
The output JSON contains the details of the newly created attachment object. Depending on the Depth parameter, it may include nested related objects up to two levels deep. This typically includes metadata such as attachment ID, name, type, associated entities (note, task, etc.), author information, and file path details.
If binary data is involved (e.g., actual file content), it would be represented separately in the binary output field, but this node primarily handles metadata and references rather than raw binary uploads.
Dependencies
- Requires an API key credential for authenticating with the external Twenty API service.
- The node uses the Twenty API base URL configured via credentials.
- No additional environment variables are explicitly required beyond standard API authentication setup.
Troubleshooting
- Missing Required IDs: If you do not provide at least one of the entity IDs (noteId, taskId, opportunityId, companyId, personId), the attachment may fail to link properly. Ensure you specify the correct target entity.
- Invalid Depth Value: Using a depth value outside 0, 1, or 2 may cause unexpected responses or errors.
- Authentication Errors: Verify that the API key credential is correctly configured and has sufficient permissions.
- Attachment Metadata Issues: Ensure that fields like
name,type, andfullPathare correctly formatted and valid according to the API's expectations.
Common error messages usually relate to invalid parameters or authentication failures. Checking the input properties and credential configuration typically resolves these issues.
Links and References
- Twenty API Documentation (hypothetical link for reference)
- n8n Documentation on Creating Attachments (general guidance on custom node creation)