← Trello

Add Existing Label to Card with Trello API

Pipedream makes it easy to connect APIs for Trello and 1000+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Add Existing Label to Card with the Trello API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

Create a workflow to Add Existing Label to Card with the Trello API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Add Existing Label to Card action
    1. Connect your Trello account
    2. Configure id
    3. Configure value
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Add Existing Label to Card with Trello API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Trello
 
Try it
Add Existing Label to Card with Trello API on New Item in Feed from RSS API
RSS + Trello
 
Try it
Add Existing Label to Card with Trello API on New Message from Discord API
Discord + Trello
 
Try it
Add Existing Label to Card with Trello API on New Message In Channels from Slack API
Slack + Trello
 
Try it
Add Existing Label to Card with Trello API on New Message in Channel from Discord Bot API
Discord Bot + Trello
 
Try it

Details

This is a pre-built, source-available component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Add Existing Label to Card on Trello
Description:Add an existing label to a card.
Version:0.1.1
Key:trello-add-label-to-card

Code

// legacy_hash_id: a_xqi4E7
import { axios } from "@pipedream/platform";

export default {
  key: "trello-add-label-to-card",
  name: "Add Existing Label to Card",
  description: "Add an existing label to a card.",
  version: "0.1.1",
  type: "action",
  props: {
    trello: {
      type: "app",
      app: "trello",
    },
    id: {
      type: "string",
      description: "The ID of the card.",
    },
    value: {
      type: "string",
      description: "The ID of the label to add",
    },
  },
  async run({ $ }) {
    const oauthSignerUri = this.trello.$auth.oauth_signer_uri;

    let id = this.id;
    const trelloParams = [
      "value",
    ];
    let p = this;

    const queryString = trelloParams.filter((param) => p[param]).map((param) => `${param}=${p[param]}`)
      .join("&");

    const config = {
      url: `https://api.trello.com/1/cards/${id}/idLabels?${queryString}`,
      method: "POST",
      data: "",
    };

    const token = {
      key: this.trello.$auth.oauth_access_token,
      secret: this.trello.$auth.oauth_refresh_token,
    };

    const signConfig = {
      token,
      oauthSignerUri,
    };

    const resp = await axios($, config, signConfig);
    return resp;
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
TrellotrelloappThis component uses the Trello app.
idstring

The ID of the card.

valuestring

The ID of the label to add

Authentication

Trello uses OAuth authentication. When you connect your Trello account, Pipedream will open a popup window where you can sign into Trello and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Trello API.

Pipedream requests the following authorization scopes when you connect your account:

readwrite

About Trello

Trello keeps track of everything, from the big picture to the minute details

More Ways to Use Trello

Triggers

Card Moved (Instant) from the Trello API

Emit new event each time a card is moved to a list.

 
Try it
New Card (Instant) from the Trello API

Emit new event for each new Trello card on a board.

 
Try it
Card Updates (Instant) from the Trello API

Emit new event for each update to a Trello card.

 
Try it
New Label Added To Card (Instant) from the Trello API

Emit new event for each label added to a card.

 
Try it
New Notification from the Trello API

Emit new event for each new Trello notification for the authenticated user.

 
Try it

Actions

Add Attachment to Card via URL with the Trello API

Create a file attachment on a card by referencing a public URL

 
Try it
Add Attachment to Card via URL with the Trello API

Adds a file attachment on a card by referencing a public URL. See the docs here

 
Try it
Add Existing Label to Card with the Trello API

Adds an existing label to the specified card. See the docs here

 
Try it
Add Image Attachment to Card with the Trello API

Adds image to card

 
Try it
Add Member to Card with the Trello API

Adds a member to the specified card. See the docs here

 
Try it