🎉 Pipedream raises $20M Series A 🎉
Read the blog post and TC Techcrunch article.
← Trello

Card Moved (Instant) from Trello API

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

Trigger workflow on
Card Moved (Instant) from the Trello API
Next, do this
Connect to 700+ APIs using code and no-code building blocks
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Trigger a workflow on Card Moved (Instant) with Trello API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Card Moved (Instant) trigger
    1. Connect your Trello account
    2. Select a Board
    3. Optional- Select one or more Lists
  2. Add steps to connect to 700+ APIs using code and no-code building blocks
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Details

This is a pre-built, open source 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.

Card Moved (Instant) on Trello
Description:Emit new event each time a card is moved to a list.
Version:0.0.7
Key:trello-card-moved

Code

import common from "../common-webhook.mjs";

export default {
  ...common,
  key: "trello-card-moved",
  name: "Card Moved (Instant)",
  description: "Emit new event each time a card is moved to a list.",
  version: "0.0.7",
  type: "source",
  props: {
    ...common.props,
    board: {
      propDefinition: [
        common.props.trello,
        "board",
      ],
    },
    lists: {
      propDefinition: [
        common.props.trello,
        "lists",
        (c) => ({
          board: c.board,
        }),
      ],
    },
  },
  methods: {
    ...common.methods,
    _getListAfter() {
      return this.db.get("listAfter");
    },
    _setListAfter(listAfter) {
      this.db.set("listAfter", listAfter);
    },
    isCorrectEventType(event) {
      const eventTranslationKey = event.body?.action?.display?.translationKey;
      return eventTranslationKey === "action_move_card_from_list_to_list";
    },
    async getResult(event) {
      const cardId = event.body?.action?.data?.card?.id;
      const listAfter = event.body?.action?.data?.listAfter?.name;
      /** Record listAfter to use in generateMeta() */
      this._setListAfter(listAfter);
      return this.trello.getCard(cardId);
    },
    isRelevant({
      result: card, event,
    }) {
      const listIdAfter = event.body?.action?.data?.listAfter?.id;
      const listIdBefore = event.body?.action?.data?.listBefore?.id;

      return (
        (!this.board || this.board === card.idBoard) &&
        (!this.lists ||
          this.lists.length === 0 ||
          this.lists.includes(listIdAfter) ||
          this.lists.includes(listIdBefore))
      );
    },
    generateMeta({
      id, name,
    }) {
      const listAfter = this._getListAfter();
      return {
        id,
        summary: `${name} - moved to ${listAfter}`,
        ts: Date.now(),
      };
    },
  },
};

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.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
BoardboardstringSelect a value from the drop down menu.
Listslistsstring[]Select a value from the drop down menu.

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