API: Create Autotask Attachments
The API: Create Autotask Attachments action attaches files from an incoming email to an Autotask entity. This is a low-level API action that creates attachment records in Autotask for each file.
This is a single API call action. You must supply the parent entity type and ID directly. Learn more about the difference between workflow actions and single API call actions.
When to Use This Action
Use this action when:
- You need to attach email files to an existing Autotask entity
- You want to attach files to entity types other than tickets (e.g., Accounts, Projects)
- You need control over attachment visibility settings
Note: The Create Autotask Ticket and Update Existing Autotask Ticket workflow actions include built-in attachment options. Use this action only when those don't meet your needs.
Configuration
Connection
| Field | Description |
|---|---|
| Autotask Connection | Select the Autotask connection to use. If you have multiple connections, you can override the default. |
Attachment Information
Configure where attachments will be stored. These fields are part of the Autotask AttachmentInfo entity.
| Field | Description |
|---|---|
| Parent Type | The type of entity to attach files to. See supported parent types below. Default: 4 (Ticket). |
| Parent ID | The ID of the parent entity. Supports template variables like {{custom.ticket.id}}. Not used when Parent Type is Opportunity (use Opportunity ID instead). |
| Opportunity ID | The ID of the Opportunity to attach to. Only shown when Parent Type is 14 (Opportunity). |
| Publish | Controls visibility of attachments (e.g., All Autotask Users, Internal Only). Default: All Autotask Users. |
Which Attachments?
| Field | Description |
|---|---|
| Attach email attachments to ticket | When enabled, attaches all files from the incoming email. Default: enabled. |
| Prevent duplicate attachments | When enabled, checks for existing attachments with the same name and skips duplicates. Only available when "Attach email attachments to ticket" is enabled. |
| Attach original email as .eml file | When enabled, attaches the complete original email as a downloadable .eml file. |
| Attachment Settings for .eml file | Configure the title and publish settings for the .eml attachment. Only shown when "Attach original email as .eml file" is enabled. |
| Attach HTML email as image | When enabled, converts the HTML email content to an image attachment. |
Advanced
| Field | Description |
|---|---|
| Suppress Autotask API exceptions | If enabled, the workflow continues even if an attachment fails. |
Supported Parent Types
| Value | Entity Type |
|---|---|
| 1 | Account |
| 3 | Project |
| 4 | Ticket or Task |
| 6 | Resource |
| 11 | Expense Report |
| 12 | Knowledge Base Article |
| 13 | Installed Product (Configuration Item) |
| 14 | Opportunity |
| 15 | Sales Order |
| 18 | Time Entry |
| 20 | Account Note |
| 21 | Contract Note |
| 22 | Project Note |
| 23 | Ticket Note or Task Note |
| 24 | Installed Product Note |
| 25 | Document |
How to Create Attachments
- Select Autotask Direct API: Create Autotask Attachments from the action dropdown
- Choose the Parent Type (e.g., 4 for Ticket)
- Enter the Parent ID from a previous action
- Enable the attachment options you need
- Configure the Publish setting for visibility
Returned Variables
This action does not return variables. Success or failure for each attachment is logged to the workflow history.
Example Use Cases
Attach Files to Ticket
After creating or finding a ticket:
| Setting | Value |
|---|---|
| Parent Type | 4 (Ticket) |
| Parent ID | {{custom.ticket.id}} |
| Attach email attachments to ticket | Enabled |
| Publish | All Autotask Users |
Preserve Original Email
Save the complete email for reference:
| Setting | Value |
|---|---|
| Parent Type | 4 (Ticket) |
| Parent ID | {{custom.ticket.id}} |
| Attach original email as .eml file | Enabled |
| Publish | All Autotask Users |
Attach to Account
Add documentation to an account record:
| Setting | Value |
|---|---|
| Parent Type | 1 (Account) |
| Parent ID | {{custom.account.id}} |
| Attach email attachments to ticket | Enabled |
| Publish | Internal Project Team |
Attach to Project
Add files to a project:
| Setting | Value |
|---|---|
| Parent Type | 3 (Project) |
| Parent ID | {{custom.project.id}} |
| Attach email attachments to ticket | Enabled |
FAQs
What file types can be attached?
Most common file types are supported. Autotask may block certain file types (e.g., executable files) based on your security settings.
Is there a file size limit?
Yes. Autotask has attachment size limits that vary by entity type and your Autotask configuration. Large files may fail to upload.
What does the .eml attachment contain?
The .eml file contains the complete original email including headers, body, and all attachments. Recipients can open it in any email client to see the message exactly as it was received.
Can I attach files to multiple entities?
Use this action multiple times with different Parent Type and Parent ID values, or use the Iterate action to attach to multiple entities.
What does "Prevent duplicate attachments" do?
Before attaching each file, the action checks if an attachment with the same filename already exists on the parent entity. If found, it skips that file to avoid duplicates.
Related Actions
- API: Create an Object: Create other entity types
- Create Autotask Ticket: Includes built-in attachment options