Skip to content

[Bug]: TODOIST_NEW_TASK_CREATED trigger upsert fails with TriggerInstance_PollingConfigInvalid for empty trigger_config #3702

Description

SDK Language

TypeScript / Node.js SDK (@composio/core)

SDK Version

@composio/core@0.13.0

Runtime Environment

Node.js v22.23.1 on macOS

Environment

Local Development

Describe the Bug

Creating a trigger instance for TODOIST_NEW_TASK_CREATED fails even with an empty trigger config.

The trigger type schema says both config fields are optional:

  • interval?: number
  • project_id?: string

So triggerConfig: {} should create the Todoist polling trigger for all projects, or at least fail with a validation error pointing to a specific invalid field.

Instead, Composio returns:

TriggerInstance_PollingConfigInvalid: 'str' object has no attribute 'get'

This also happens when calling the REST endpoint directly, so it does not appear to be only an SDK wrapper issue.

Steps to Reproduce

  1. Connect a Todoist account through Composio-managed OAuth.
  2. Confirm the connected account is ACTIVE.
  3. Call composio.triggers.create(...) with trigger slug TODOIST_NEW_TASK_CREATED.
  4. Pass an empty triggerConfig: {}.
  5. Observe a 400 TriggerInstance_PollingConfigInvalid error.
  6. Repeat with direct REST POST /api/v3.1/trigger_instances/TODOIST_NEW_TASK_CREATED/upsert; observe the same error.

Minimal Reproducible Example

import { Composio } from "@composio/core";

const composio = new Composio({
  apiKey: process.env.COMPOSIO_API_KEY,
});

const { items } = await composio.connectedAccounts.list({
  toolkitSlugs: ["todoist"],
  statuses: ["ACTIVE"],
  limit: 1,
});

const account = items[0];
if (!account) throw new Error("No active Todoist account found");

const result = await composio.triggers.create(
  account.userId,
  "TODOIST_NEW_TASK_CREATED",
  {
    connectedAccountId: account.id,
    triggerConfig: {},
  },
);

console.log(result);

Error Output / Stack Trace

400 {
  "error": {
    "message": "Invalid polling configuration for trigger \"TODOIST_NEW_TASK_CREATED\": 'str' object has no attribute 'get'",
    "code": 1213,
    "slug": "TriggerInstance_PollingConfigInvalid",
    "status": 400,
    "request_id": "2d8b15d6-2360-48fc-8054-7ce07a8bf103",
    "suggested_fix": "Verify the trigger configuration is valid and the connected account has the required permissions. Check the error details above."
  }
}

Reproducibility

  • Always reproducible
  • Intermittent / Sometimes
  • Happened once, can’t reproduce

Additional Context or Screenshots

I also tested these variants, and all returned the same error:

  • trigger_config: {}
  • trigger_config: { "interval": 2 }
  • with toolkit_versions: "latest"
  • with toolkit_versions: { "todoist": "20260512_00" }
  • without toolkit_versions
  • without user_id

A camelCase body returned a different expected validation error (connected_account_id is required), which confirms the REST endpoint is reading the body correctly. The failure seems specific to the internal polling config handling for TODOIST_NEW_TASK_CREATED.

Metadata

Metadata

Labels

supportNeeds support team follow-up

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions