Trello Label Component
Manage Trello labels by creating, reading, or deleting them on a card.
This component lets you add a label to a Trello card, list all labels on a card, or remove a label from a card. It works with your Trello account through an OAuth token and API key that you set up in Nappai’s credentials.
How it Works
The component talks to Trello’s REST API.
When you choose an operation, it sends a request to Trello:
- Create – sends a request to add a label to the specified card.
- Read All – asks Trello for all labels attached to the card.
- Delete – removes the specified label from the card.
All requests are made asynchronously, so the dashboard stays responsive while the API call is in progress. The component returns the API response as a Data output, which you can feed into other components or use as a tool for an AI agent.
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 label to a Trello card.
- Read All: Retrieve all labels that are currently attached to a Trello card.
- Delete: Remove an existing label from a Trello 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 the component will do – Create, Read All, or Delete.
- Visible in: Create, Read All, Delete
-
Card ID: The unique identifier of the Trello card you want to work with.
- Visible in: Create, Read All, Delete
-
Label ID: The unique identifier of the label you want to add or remove.
- Visible in: Create, Delete
-
Mapping Mode: Enable mapping mode to process multiple data records in batch.
- Visible in: Create, Read All, 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 All, 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 All, Delete
-
Tools arguments metadata: Defines the arguments metadata for the tools.
- Visible in: Create, Read All, Delete
Credential
This component requires a Trello Task API credential.
- In Nappai, go to the Credentials section 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.
The credential fields (OAuth token and API key) are not shown in the Input Fields list because they are handled by the credential system.
Outputs
- Data: The raw response from Trello. For Create, it returns the created label details. For Read All, it returns a list of all labels on the card. For Delete, it returns a simple success status.
- Tool: A tool representation that can be used by an AI agent. It contains the same information as the Data output but formatted for the agent’s toolkit.
Usage Example
-
Create a label
- Set Operation to Create.
- Enter the Card ID of the card you want to label.
- Enter the Label ID of the label you want to add.
- Click Run. The component will add the label and return the label details in the Data output.
-
Read all labels
- Set Operation to Read All.
- Enter the Card ID.
- Click Run. The component will list all labels attached to the card in the Data output.
-
Delete a label
- Set Operation to Delete.
- Enter the Card ID and Label ID.
- Click Run. The component will remove the label and return a success status.
Related Components
- Trello Card Component – Manage Trello cards (create, read, update, delete).
- Trello Board Component – Manage Trello boards and lists.
- Trello Search Component – Search for cards, lists, or boards.
Tips and Best Practices
- Keep your Trello OAuth token and API key secure; never share them publicly.
- Use Mapping Mode when you need to process many cards at once; it saves time and reduces API calls.
- Combine this component with the Trello Card Component to automatically add or remove labels when a card is created or updated.
- When using the component as a tool for an AI agent, provide a clear Tool Description so the agent knows when to apply it.
Security Considerations
- The OAuth token and API key are stored in Nappai’s credential store, which encrypts them at rest.
- The component never exposes these credentials in the dashboard or logs.
- Always use the latest Trello API version and keep your credentials up to date to avoid deprecation issues.