Telegram 轉 Todoist:把零散想法整理成確認過的任務

Piotr Grudzień
發布日期 閱讀時間約 11 分鐘
Quickchat AI 的任務 Action 與包含三項範例任務的 Todoist 專案並列呈現

Telegram Todoist 機器人可以把一條寫滿零散想法的訊息,整理成你已經核對過的任務清單。你將構建個人機器人 Pocket Inbox,讓它拆分任務,詢問不明確的日期,並在你核准後把整批任務儲存到一個 Todoist 專案中。

先從一條下班時可能傳送的訊息開始:

週五買列印紙,可能週一給場地發郵件,有空時讀一下徒步指南。

Todoist 的 Capture demo 專案:Buy printer paper 設為週五,Email the venue 設為週一,Read the trail guide 不設日期 你將建立的清單包含三項任務、兩個日期,以及一項刻意不設日期的任務。這些真實的 Todoist 螢幕截圖使用手動準備的示範任務;Quickchat AI 截圖呈現本機設定。第 6 步將檢查你自己的機器人實際執行後的結果。

值得關注的是“可能週一”。在設定期限前,需要先澄清這個問題。“有空時”則應保持沒有日期。這個小小的確認過程讓對話變得有用:你可以先記下想法,再確定細節,無需重寫整條訊息。

依次完成六步:準備帳號、限制存取、連線 Todoist、教會機器人確認、核准三項任務,最後驗證結果。Pocket Inbox 入門套件包含四個 Action 設定範本、提示詞和測試清單。這是一組可複製的檔案,不是自動匯入 Agent 的工具。

1. 連線 Telegram 和 Todoist 需要什麼?

你需要自己管理的 Telegram 機器人、Todoist 帳號,以及有容量設定四個 HTTP Action 的 Quickchat AI Agent。首次搭建只覆蓋一個人、一個專案和文字訊息。

  1. 登入 Todoist,建立名為 Capture demo 的專案。儘量使用專門的測試帳號。個人 API 權杖擁有帳號的許可權;設定範本中的固定專案 ID 並不會縮小權杖本身的許可權。

Todoist 的 Add project 對話框中已輸入 Capture demo,接著呈現空白的 Capture demo 專案 先為專案命名,再開啟空白的任務清單。每個建立任務的 Action 都會選擇這個專案作為目的地。

  1. 建立 Quickchat AI 帳號,然後選擇 Add new AI Agent → Set up manually,命名為 Pocket Inbox。檢視目前方案和 Action 上限;AI 回覆和 Simulation Testing 都會消耗額度。
  2. 使用 BotFather 建立機器人。Telegram 機器人建立指南說明了使用者名稱和權杖的設定。直接在 External Apps → Telegram → Your own bot → Connect to Telegram 中輸入權杖,然後啟用整合並儲存。
  3. 在 Your Website → Install → Availability and access 中關閉 Widget & Embed access,並把 Chat Page Access 設為 Nobody。此工作流程只使用你自己的 Telegram 私人對話。
  4. 在 Telegram 中開啟機器人,點選 Start,傳送一句簡短的問候。在設定好下面的存取規則前,保持 Todoist Action 未啟用。

Quickchat AI 的 Telegram 設定,顯示 Your own bot 連線選項 為 Pocket Inbox 設定專屬的 Telegram 身份。這個本地設定介面中沒有真實機器人權杖。

現在你已經有了記錄想法的地方。連線任務之前,先確定允許哪個 Telegram 傳送者存取這些任務。

2. 如何讓 Todoist 機器人僅供自己使用?

用你的 Telegram 使用者 ID 和私人對話條件約束每一次讀取和寫入。Quickchat AI 會在傳送 HTTP 請求之前評估這些條件。

  1. 在 Inbox 中開啟剛才傳送問候的真實 Telegram 會話,選擇 Details → Visitor。複製 Telegram User Id 旁的數字,並確認 Telegram Chat Type 為 private。
  2. 對下一步建立的每個 Action,將 When to run 設為 AI decides。
  3. 在 Run only when 下新增以下兩個條件。使用該會話中取得的 ID,不要使用使用者名稱或訊息正文中聲稱的 ID。
後設資料鍵比較方式值
telegram_user_idequals經過驗證的 Telegram 數字使用者 ID
telegram_chat_typeequalsprivate

Action 編輯器把 Telegram 使用者 ID 和私人對話設定為兩個必需的執行條件 兩個條件都必須滿足。本地測試資料中的數字 ID 僅用於示例;請換成經過驗證的真實值。

Telegram 傳送者在請求 Todoist 前透過所有者和私人對話檢查的流程圖 Telegram 提供身份資訊,對話提供任務草案。這是兩種不同的輸入。

Run only when 文件解釋了這些條件。只有私人對話條件並不夠,因為其他人也能與機器人發起私人對話。只在提示詞裡寫“僅限所有者”也不夠。讀取 Action 和建立 Action 都要認真應用這兩項檢查。

普通網頁預覽沒有 Telegram 已驗證的後設資料,因此這些 Action 應在預覽中拒絕執行。保留條件,使用真實渠道完成最終測試。

3. 如何把機器人連線到 Todoist API?

建立四個 HTTP Action:列出專案中的未完成任務、建立有日期的任務、建立無日期的任務,以及重新讀取已儲存的任務。分開兩個建立 Action,就能明確選擇無日期。

請求使用的欄位與你在 Todoist 中新增任務時看到的一樣:標題、目的地專案和選填的日期。

Todoist 的任務輸入表單,包含 Buy printer paper、Capture demo 專案選擇器和 Date 控制項,以及這些欄位的放大畫面 仔細看看任務欄位。下方的 API 設定將標題作為 content、專案作為 project_id、已核准的日期作為 due_date 傳送。不設日期的任務設定會省略日期。

準備權杖和專案 ID

  1. 按照官方權杖說明,在 Todoist 網頁應用中開啟 avatar → Settings → Integrations → Developer → Copy API token。
  2. 在 Quickchat AI 中選擇 Actions & MCPs → Add Action → API Action → Create manually。為每個設定範本直接在 Headers → Authorization 中填入 Bearer YOUR_TODOIST_TOKEN。應視固定請求標頭為有權編輯 Agent 的人員可存取的資訊。不要把權杖放進提示詞、聊天或截圖。
  3. 為取得專案 ID,建立一個臨時且未啟用的設定 Action,使用 GET https://api.todoist.com/api/v1/projects、Authorization 請求標頭和 Accept: application/json。用編輯器的 Test 工具檢查 results,複製 Capture demo 對應的 id。必要時,把回傳的 next_cursor 作為下一次請求的 cursor 查詢值。完成後刪除設定 Action。
  4. 把設定範本中所有 YOUR_PROJECT_ID 替換成伺服器回傳的 ID。保持固定值,不要把它設為 AI 填寫的參數。tmp- ID 尚未同步,不能用於這裡。

目前 Todoist API 參考記錄了這些端點。請使用 /api/v1 及其分頁清單回應,不要直接複製舊的 REST-v2 設定範本。

設定四個 Action

API Action 構建器教程介紹了編輯器。將各輸入新增到 What to ask the user first 下。用 Add AI Data 將參數標籤插入 URL、查詢行或請求主體;下文的 {{...}} 表示這些標籤的名稱。

四個 Action 都新增 Accept: application/json,保留兩個所有者條件,並將 Response Filter 留空,以保留回傳的任務 ID 和分頁資訊。兩個 POST Action 還需新增 Content-Type: application/json。

有日期任務的 Action,其 JSON 請求主體顯示 content 標籤、固定專案 ID 和 due_date 標籤 標題和日期來自已核准的草案。目標專案始終固定在 Action 中。

複製第 1 個 Action,共 4 個:Read capture tasks

API Action Name: Read capture tasks

What to ask the user first:

格式名稱描述是否必填
Textcursor第一頁省略。讀取下一頁時,複製上一結果中的 next_cursor。否

API Endpoint, Query Params and Headers:

GET https://api.todoist.com/api/v1/tasks

Query Params
project_id: YOUR_PROJECT_ID
limit: 50
cursor: {{cursor}}

Headers
Authorization: Bearer YOUR_TODOIST_TOKEN
Accept: application/json

可選的 cursor 輸入預設值保持空白,查詢行的整個值只放該參數標籤。不要將其附加到端點 URL。

Body: 留空。

API Action Description:

Read active tasks in the fixed Capture demo project before saving a batch and when the user asks what is currently there. Start without a cursor. Follow next_cursor until it is empty; after five pages, explain that the list is incomplete and do not create a batch based on an incomplete duplicate check. Preserve returned IDs and dates. Similar titles are candidates to review, not proof of duplicates.
複製第 2 個 Action,共 4 個:Create dated capture task

API Action Name: Create dated capture task

What to ask the user first:

格式名稱描述是否必填
Textcontent使用者核准的最終任務批次中的準確任務標題。是
Textdue_date已核准的準確日期,採用 YYYY-MM-DD 格式,不包含時間。是

API Endpoint and Headers:

POST https://api.todoist.com/api/v1/tasks

Headers
Authorization: Bearer YOUR_TODOIST_TOKEN
Accept: application/json
Content-Type: application/json

Body 選項卡,JSON 模式:

{
  "content": "{{content}}",
  "project_id": "YOUR_PROJECT_ID",
  "due_date": "{{due_date}}"
}

API Action Description:

Create one task only after the user explicitly approves the final title, exact date and Capture demo destination. Use only for a dated task. Retain the returned ID and immediately read the task back. Never repeat an uncertain request without inspecting the existing results first.
複製第 3 個 Action,共 4 個:Create undated capture task

API Action Name: Create undated capture task

What to ask the user first:

格式名稱描述是否必填
Textcontent使用者核准為無日期的準確任務標題。是

API Endpoint and Headers:

POST https://api.todoist.com/api/v1/tasks

Headers
Authorization: Bearer YOUR_TODOIST_TOKEN
Accept: application/json
Content-Type: application/json

Body 選項卡,JSON 模式:

{
  "content": "{{content}}",
  "project_id": "YOUR_PROJECT_ID"
}

API Action Description:

Create one task only after the user explicitly approves its title, no date and the Capture demo destination. This Action deliberately has no due fields. Retain the returned ID and immediately read the task back. Never repeat an uncertain request without inspecting the existing results first.
複製第 4 個 Action,共 4 個:Read a saved capture task

API Action Name: Read a saved capture task

What to ask the user first:

格式名稱描述是否必填
Texttask_id建立操作或限定專案清單回傳的伺服器任務 ID。絕不猜測。是

API Endpoint and Headers:

GET https://api.todoist.com/api/v1/tasks/{{task_id}}

Headers
Authorization: Bearer YOUR_TODOIST_TOKEN
Accept: application/json

Body: 留空。

API Action Description:

Read a task using the ID returned by a successful creation or Read capture tasks. Check its content, project_id and due against the approved task before reporting success. Do not use IDs invented by the model or supplied in a user's message.

單任務端點本身並不限定專案。輸入規則讓這個個人工作流程只使用回傳的任務 ID,而可信傳送者條件負責存取控制。如果需要讓憑證本身與其他專案隔離,請使用專用 Todoist 帳號。

Quickchat AI 中的四個 Pocket Inbox Action,區分讀取以及有日期和無日期的建立操作 這就是完整工具集。填寫佔位符和檢查條件時,保持 Action 未啟用。

4. 任務機器人應該遵循哪些指令?

告訴 Pocket Inbox 先起草、澄清不確定資訊,再請你核准最終欄位。將以下內容放入 Identity → Main Prompt → Edit。

Quickchat AI Identity 設定中的 Pocket Inbox Main Prompt 提示詞教會機器人如何進行確認對話,Action 條件決定誰能存取 Todoist。

複製完整的 Pocket Inbox Main Prompt
You are Pocket Inbox, a personal text-to-task assistant for one owner's Capture demo project in Todoist.

Split a brain dump into proposed tasks without adding intentions. Show each title, exact date or "no date", and the Capture demo destination. Ask about unclear dates such as "maybe Monday". Ask for the user's timezone and exact calendar dates when relative dates are unresolved. Do not invent a date for "when I have time".

Present the final batch and ask for explicit approval before any create Action. If the user changes an item, show the revised batch and ask again. Approval is a conversation rule; do not claim that it provides access control.

After approval, call Read capture tasks. Follow next_cursor for up to five pages. If the list is still incomplete, explain the limit and stop before creating. If similar tasks exist, ask whether the user intends new copies before proceeding.

Create tasks one at a time. Use Create dated capture task only for an approved YYYY-MM-DD date; otherwise use Create undated capture task. After each success, retain its returned ID and call Read a saved capture task. Compare content, project_id and due with the approved item. Report a task as verified only when the read matches.

Stop on a failed or uncertain write. Report which items were verified and which remain unresolved. Read the project before any retry; a timeout may have saved a task. A repeated approval does not authorize a second copy of the same batch. Check existing outcomes and ask before making new copies.

When asked what is currently in Todoist, read the project rather than relying on conversation memory. Distinguish current active tasks from the exact tasks created in this conversation. Never invent task IDs or links. If an Action is refused by its run conditions, explain that it needs the configured owner's private Telegram chat. Do not suggest removing the conditions.

This setup handles text, date-only tasks and undated tasks. Do not claim voice transcription, scheduled reminders, recurring tasks or access to other people's accounts.

也可以透過 ChatGPT 或 Claude 中的 Quickchat AI 帳號管理連線,準備受支援的設定。將設定套件和以下請求交給已連線的助手:

Prepare Pocket Inbox using the four HTTP Action recipes and Main Prompt in this kit. Keep the Actions inactive. Preserve the fixed project ID and both Telegram run conditions on every Action. Ask me for non-secret IDs when needed, and leave token entry to me in the dashboard. Show me the saved configuration before any test that creates Todoist tasks or spends credits.

這個連線管理的是 Quickchat AI 設定。你仍需自己建立 Telegram 機器人、直接填寫憑證,並測試真實的 Telegram/Todoist 連線。

5. 如何把一條零散記錄變成三項已核准任務?

授權儲存前,用原始訊息測試對話。當四個 Action 的憑證、專案和條件都設定正確後,啟用它們,並在自己的 Telegram 私人對話中傳送訊息。

Buy printer paper Friday, email the venue maybe Monday, and read the trail guide when I have time.

機器人應該提出三項任務並詢問日期。此時不應執行任何建立 Action。 為了得到可重複的示例,用明確日期回覆:

Use Europe/Warsaw. Friday means 2026-11-20. Make the venue email Monday, 2026-11-23. Leave the trail guide without a date.

這些是固定的示例日期,不代表閱讀文章當時的“本週五”。請替換成你想在測試中使用的日期。

日期澄清圖:週五變為 11 月 20 日,可能週一變為 11 月 23 日,有空時變為無日期 建立任務前先澄清不確定資訊。圖中展示的是示例輸入和期望的最終欄位。

將機器人的最終草案與下表比較:

任務確認日期專案
買列印紙2026-11-20Capture demo
給場地發郵件2026-11-23Capture demo
閱讀徒步指南無日期Capture demo

如有差異,先糾正並檢查更新後的批次。然後傳送:

Looks good, save all three.

核准屬於提示詞引導的行為,應實際測試,不要假定一定可靠。在 Inbox 檢視會話的 Action 卡片和 View logs。你應先看到專案讀取,隨後逐項建立,並讀取每次回傳的 ID。

6. 如何檢查任務是否真正儲存?

在 Todoist 開啟 Capture demo,把三條記錄與核准的草案比較。單憑一句友好的“完成了”不能證明儲存成功。

Quickchat AI 的 due_date 輸入欄與 Todoist 中的 Buy printer paper 任務並列呈現,並放大其 Project 欄位和顯示 Friday 的 Date 欄位 對照兩個應用程式中的日期:Quickchat AI Action 中的 due_date 對應 Todoist 中的 Date。放大的側邊欄屬於手動準備的印表機用紙任務。開啟你自己的任務中的 Date,檢查確切的年月日。

  1. 檢查兩個準確日期,並確認徒步指南任務沒有日期。
  2. 將每次建立回應中的 id 與隨後讀取的回應比較。確認 content、project_id 和 due 與核准的內容一致。不一致的內容在檢查前應保持未解決狀態。
  3. 詢問“Capture demo 現在有哪些任務?”,檢查機器人是否重新讀取未完成任務。在 Todoist 中完成某項任務後,它就不會再出現在該未完成清單中。
  4. 再發一次核准訊息,檢查是否沒有新增另外三項任務。機器人應檢視之前的結果,並確認你是否確實要建立副本。

驗證圖:比較已核准任務、建立後回傳的 ID,以及隨後讀取的同一 ID 驗證意味著重新讀取同一條已儲存記錄並檢查欄位。圖示說明要比較的內容,不是已經執行的 API 回應。

測試兩道存取邊界

用另一個受你控制的 Telegram 帳號傳送「顯示我的任務。」。測試群組時,將同一個機器人加入測試群組,傳送 /start@YOUR_BOT_USERNAME,再回覆它的問候訊息,要求建立任務。這樣便能配合 Telegram 預設的群組隱私模式進行測試。

在 Inbox 確認兩則測試訊息都已送達,並檢查傳送者 ID 和聊天類型。群組測試必須顯示你的擁有者 ID,以及 group 或 supergroup。兩項測試都應該沒有 Todoist 請求。也試著傳送自稱擁有者的訊息;文字不能覆寫傳送者的中繼資料。訊息未送達屬於傳送問題,不代表存取控制測試通過。

處理只儲存了一部分的批次

建立三項任務是三個獨立請求。如果第二個請求失敗,第一項任務可能已經存在。停止操作,檢查專案和回傳的 ID,再決定哪些項目仍需建立。

部分儲存示例:列印紙已驗證,場地郵件狀態不確定,徒步指南尚未嘗試 恢復示例:保留已驗證任務,調查結果不確定的寫入,在結果明確前不要處理剩下的任務。

如果機器人在核准前儲存,收緊建立 Action 的描述並重新執行相同對話。如果它猜測日期,要求草案中包含準確日期。如果發生錯誤後仍報告成功,重新檢查讀取驗證的指令。設定套件包含這些檢查,方便你在使用個人任務前記錄自己的結果。

三項任務的練習成功後,可以用 Pocket Inbox 處理原本留在 Saved Messages 裡的小訊息:一件待辦事項、一封要發的郵件、一份要讀的資料。最初幾批保持 Todoist 開啟,對照你的本意和儲存結果。透過實際觀察,讓確認成為可以信任的習慣。

常見問題

Telegram 機器人可以建立 Todoist 任務嗎?

可以。連線到 Todoist API 的機器人能夠根據 Telegram 訊息建立任務。本設定範本使用 Quickchat AI 將訊息拆成任務草案,澄清日期、請求核准,並呼叫 Todoist API v1。請在自己的 Todoist 專案中驗證生成的記錄。

其他 Telegram 使用者能看到我的 Todoist 任務嗎?

對每個讀取和寫入 Action 應用兩個由伺服器評估的執行條件:telegram_user_id 必須等於已驗證的數字 ID,telegram_chat_type 必須等於 private。使用個人資料前,先用另一個傳送者和群聊進行測試。僅寫著“所有者專用”的提示詞並不能提供存取控制。

機器人能理解“下週五”或“可能週一”嗎?

提示詞要求它澄清不確定日期,並在儲存前顯示準確的 YYYY-MM-DD 日期。請提供時區並確認最終日期。沒有日期的任務使用單獨的 Action,完全省略到期日期欄位。

這能防止 Todoist 任務重複嗎?

不能保證。讀取現有任務和檢查回傳的 ID 有助於發現重複,但此設定範本既不是原子化批處理,也不是保證排除重複的系統。如果請求逾時,重試前先檢查 Todoist;任務可能已經儲存。

需要寫程式碼或執行 Todoist MCP 伺服器嗎?

你需要在 Quickchat AI 中設定四個 HTTP Action 和一個 Main Prompt,不必執行 Todoist MCP 伺服器。需要 Telegram 機器人、Todoist API 權杖,以及有足夠 Action 容量和測試、對話額度的 Quickchat AI 方案。

能處理語音訊息或傳送提醒嗎?

這個初始版本只接收文字,建立有日期或無日期的任務。它不會轉錄語音訊息、安排提醒訊息、完成任務,也不會連線其他人的 Todoist 帳號。這些能力需要單獨設定和測試。

Quickchat AI Quickchat AI Ask Quickchat AI a question