← Todoist

Create Label with Todoist API

Pipedream makes it easy to connect APIs for Todoist and 800+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Create Label with the Todoist API
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

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

  1. Configure the Create Label action
    1. Connect your Todoist account
    2. Configure Name
    3. Optional- Configure Order
    4. Optional- Select a Color
    5. Optional- Configure Favorite
  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

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.

Create Label on Todoist
Description:Creates a label. [See the docs here](https://developer.todoist.com/rest/v1/#create-a-new-label)
Version:0.0.1
Key:todoist-create-label

Code

import todoist from "../../todoist.app.mjs";

export default {
  key: "todoist-create-label",
  name: "Create Label",
  description: "Creates a label. [See the docs here](https://developer.todoist.com/rest/v1/#create-a-new-label)",
  version: "0.0.1",
  type: "action",
  props: {
    todoist,
    name: {
      propDefinition: [
        todoist,
        "name",
      ],
    },
    order: {
      propDefinition: [
        todoist,
        "order",
      ],
    },
    color: {
      propDefinition: [
        todoist,
        "color",
      ],
    },
    favorite: {
      propDefinition: [
        todoist,
        "favorite",
      ],
    },
  },
  async run ({ $ }) {
    const {
      name,
      order,
      color,
      favorite,
    } = this;
    const data = {
      name,
      order,
      color,
      favorite,
    };
    const resp = await this.todoist.createLabel({
      $,
      data,
    });
    $.export("$summary", "Successfully created label");
    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
TodoisttodoistappThis component uses the Todoist app.
Namenamestring

Enter the new name

Orderorderinteger

Order in a list

ColorcolorintegerSelect a value from the drop down menu:{ "label": "Berry Red", "value": 30 }{ "label": "Red", "value": 31 }{ "label": "Orange", "value": 32 }{ "label": "Yellow", "value": 33 }{ "label": "Olive Green", "value": 34 }{ "label": "Lime Green", "value": 35 }{ "label": "Green", "value": 36 }{ "label": "Mint Green", "value": 37 }{ "label": "Teal", "value": 38 }{ "label": "Sky Blue", "value": 39 }{ "label": "Light Blue", "value": 40 }{ "label": "Blue", "value": 41 }{ "label": "Grape", "value": 42 }{ "label": "Violet", "value": 43 }{ "label": "Lavender", "value": 44 }{ "label": "Magenta", "value": 45 }{ "label": "Salmon", "value": 46 }{ "label": "Charcoal", "value": 47 }{ "label": "Grey", "value": 48 }{ "label": "Taupe", "value": 49 }
Favoritefavoriteboolean

Whether this is a favorite

Authentication

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

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

task:adddata:read_writedata:deleteproject:delete

About Todoist

The to do list to organize work & life