Trello Attachment Component
The Trello Attachment Component lets you add, view, list, modify, or remove files attached to Trello cards directly from your Nappai dashboard. It connects to Trello’s API using a pre‑configured credential, so you can automate attachment handling without leaving the platform.
How it Works
When you use the component, Nappai sends a request to Trello’s REST API. Depending on the chosen operation, the component will:
- Create: Upload a file or link to a card.
- Read: Retrieve a single attachment’s details.
- Read All: Get a list of all attachments on a card.
- Update: (Not implemented in the current code but reserved for future use) would change attachment properties.
- Delete: Remove an attachment from a card.
The component runs asynchronously, so it won’t block other tasks in your workflow. If you enable Mapping Mode, you can feed multiple cards or attachments at once, and the component will process each record in a batch.
Operations
This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:
- Create: Add a new attachment (file or URL) to a Trello card.
- Read: Retrieve information about a specific attachment on a card.
- Read All: List all attachments attached to a card.
- Update: Modify an existing attachment’s details (reserved for future implementation).
- Delete: Remove an attachment from a card.
To use the component, first select the operation you need in the “Operation” field.
Inputs
Mapping Mode
This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write Javascript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Input Fields
The following fields are available to configure this component. Each field may be visible in different operations:
-
Operation: Choose what action the component will perform.
- Visible in: Create, Read, Read All, Update, Delete
-
Attachment ID: The unique identifier of the attachment you want to read, update, or delete.
- Visible in: Read, Update, Delete
-
Attachment Name: The name you want to give to a new attachment or update an existing one.
- Visible in: Create, Read, Update
-
Attachment Url: The URL of the file you want to attach to a card.
- Visible in: Create, Read, Update
-
Card ID: The unique identifier of the Trello card that holds the attachment.
- Visible in: Create, Read, Read All, Update, Delete
-
Mapping Mode: Enable mapping mode to process multiple data records in batch.
- Visible in: Create, Read, Read All, Update, Delete
-
Tool Name: The name of the tool that will be used when this component is connected as a tool. This name will be displayed to the agent when it selects tools to use.
- Visible in: Create, Read, Read All, Update, Delete
-
Tool Description: A detailed description of what this tool does. This description will help the agent understand when and how to use this tool effectively.
- Visible in: Create, Read, Read All, Update, Delete
-
Tools arguments metadata: Defines the arguments metadata for the tools.
- Visible in: Create, Read, Read All, Update, Delete
Credential
This component requires a pre‑configured Trello Task API credential.
- In the Nappai dashboard, go to Credentials and add a new credential of type Trello Task API.
- Provide the Trello OAuth token and API key (both are passwords).
- In the component, select this credential from the Credential dropdown.
Outputs
- Data: The raw data returned from Trello (e.g., attachment details, list of attachments, or a success status).
- Tool: A tool representation that can be used by Nappai’s AI agents to perform the same operation programmatically.
Usage Example
Scenario: Add a new attachment to a Trello card.
- Drag the Trello Attachment Component into your workflow.
- Set Operation to Create.
- Enter the Card ID of the card you want to attach a file to.
- Provide the Attachment Url (e.g.,
https://example.com/file.pdf
). - Optionally set an Attachment Name (e.g.,
Project Plan
). - Connect the component’s Data output to the next step (e.g., a notification or logging component).
- Run the workflow. The component will upload the file to the specified card and return the attachment details.
Related Components
- Trello Card Component – Create, read, update, or delete Trello cards.
- Trello List Component – Manage Trello lists within boards.
- Trello Board Component – Work with Trello boards and their properties.
Tips and Best Practices
- Use Mapping Mode when you need to process many cards or attachments at once; it saves time and reduces API calls.
- Keep your Trello OAuth token and API key secure; never expose them in public workflows.
- Test the component with a single card first before enabling batch processing.
- If you need to delete attachments, double‑check the Attachment ID to avoid accidental removal.
Security Considerations
- The component stores your Trello credentials in a secure credential store.
- Ensure that only authorized users have access to the credential and the component.
- When using Mapping Mode, be mindful of the number of API calls; Trello imposes rate limits that could affect large batches.