Add assigned GitHub issues to Todoist automatically

By General Input

Whenever a GitHub issue is assigned to you, a clean, labeled task lands in your Todoist Engineering project with the issue link, due date, and priority already set.

Integrations

  • GitHub
  • Todoist

Type

Deterministic Code

Categories

  • Engineering
  • Personal Productivity

Build a code-based workflow that turns GitHub issues assigned to me into Todoist tasks in my Engineering project. This is a fully deterministic CRUD pipeline. No LLM judgement needed.

Trigger: incoming webhook from GitHub. Configure it for the 'issues' event. Only run the workflow when action == 'assigned' AND the assignee.login matches the GitHub username on my connected GitHub account. Otherwise, exit early.

Step 1: Call GitHub's Get an Issue operation using the repo owner, repo name, and issue number from the webhook payload. Pull title, body, labels, milestone, repo full_name, number, and html_url from the response.

Step 2: Build the Todoist task fields:

- content: '[<repo_name>#<number>] <title>' where <repo_name> is the short repo name (the part after the slash in full_name).

- description: the issue body, followed by a blank line and the line 'Issue: <html_url>'. If the body is empty, just include the issue link.

- priority: 2 (Todoist P2) if any GitHub label name (case-insensitive) is one of 'bug', 'urgent', 'p0', or 'p1'. Otherwise priority 3 (P3).

- labels: map every GitHub label name directly to a Todoist label string. Pass them as-is (Todoist will create any that don't yet exist on the account).

- due_date: if the issue has a milestone with a due_on value, use the date portion (YYYY-MM-DD) of that timestamp. If no milestone or no due_on, omit the due_date field entirely.

- project_id: the user's Engineering project in Todoist. Expose this as a configurable parameter at the top of the workflow so a user can rename or switch projects without editing logic.

Step 3: Call Todoist's Create Task operation with those fields. Return success on 2xx. Surface any 4xx/5xx errors with the upstream message so the user can see what went wrong (missing project, invalid label, etc.).

Edge cases to handle cleanly: an issue with no body, no labels, no milestone, or a milestone without a due_on. None of these should block task creation. Pull requests show up under the 'issues' event too. Skip them by checking for the pull_request key on the issue object and exiting early if present.

Related prompts

Explore more prompts
Open a Heroku release war room the moment production looks wrongSee what Hacker News really thinks of the tools in your stackSee and fix Terraform variable drift across every workspaceA docs coverage board that catches what shipped undocumentedA technology radar board your architecture group works out ofTake-home review desk that runs candidate code in a sandboxDeploy control room for DigitalOcean App Platform appsClean up the Fly.io preview apps your team left behindFind the dbt models that are burning your warehouse budgetTranslation coverage board for your app's language files