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
- Connect a Todoist account through Composio-managed OAuth.
- Confirm the connected account is ACTIVE.
- Call
composio.triggers.create(...) with trigger slug TODOIST_NEW_TASK_CREATED.
- Pass an empty
triggerConfig: {}.
- Observe a 400
TriggerInstance_PollingConfigInvalid error.
- 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
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.
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_CREATEDfails even with an empty trigger config.The trigger type schema says both config fields are optional:
interval?: numberproject_id?: stringSo
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
composio.triggers.create(...)with trigger slugTODOIST_NEW_TASK_CREATED.triggerConfig: {}.TriggerInstance_PollingConfigInvaliderror.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
Additional Context or Screenshots
I also tested these variants, and all returned the same error:
trigger_config: {}trigger_config: { "interval": 2 }toolkit_versions: "latest"toolkit_versions: { "todoist": "20260512_00" }toolkit_versionsuser_idA 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 forTODOIST_NEW_TASK_CREATED.