メインコンテンツにスキップ

gas-todoist

Todoist Client for Google Apps Script.

AI Summary

GAS Todoist

GAS Todoist client using Sync API for adding items.

Target Users

GAS developers wanting to add tasks to Todoist automatically.

Problems Solved

Enables direct item addition to Todoist Sync API from GAS.

Script ID

  1. In GAS Editor: Click "Libraries +" → Paste into "Script ID" field → Click "Look up"
  2. "gas-todoist" will appear in the search results
  3. Select the latest version (highest number) from "Version" dropdown
  4. Click "Add"

Tags

Main Features
1
Easy Install

Add via library ID in GAS; set identifier to Todoist.

2
TS Support

TypeScript types like ItemAddArgs for safe task/note addition.

3
Add with Note

Optionally pass note to addItem for tasks with notes.

Examples

Main Functions

FunctionDescription
new Todoist.Client(token)Create Todoist client
todoist.addItem(item, note?)Add item optionally with note

Examples

Add Single Item
/**
 * 単一アイテム追加
 * ・APIトークン準備: TODOIST_TOKEN
 * ・クライアント作成: new Todoist.Client(TODOIST_TOKEN)
 * ・タスク設定と追加: todoist.addItem(task)
 */
function addSingleItem() {
  const task = {
    content: 'Single Item',
  };

  const todoist = new Todoist.Client(TODOIST_TOKEN);
  const addedItem = todoist.addItem(task);
}

Add Item with Note
/**
 * ノート付きアイテム追加
 * ・タスクとノート準備: itemとnoteオブジェクト
 * ・クライアント作成: new Todoist.Client(TODOIST_TOKEN)
 * ・追加実行: todoist.addItem(item, note)
 */
function addItemWithNote() {
  const item = {
    content: 'Item with Note',
  };
  const note = {
    content: 'Note !',
  };

  const todoist = new Todoist.Client(TODOIST_TOKEN);
  const addedItem = todoist.addItem(item, note);
}

Sample Code

Post a Sample

No sample codes for this library yet

Be the first to post a sample!

Post a Sample