description:'The project you want to operate on. Choose from the list, or specify an ID.',
},
{
displayName:'Section Name or ID',
name:'section',
type:'options',
typeOptions:{
loadOptionsMethod:'getSections',
loadOptionsDependsOn:['project.value'],
},
displayOptions:{
show:{
resource:['task'],
operation:['move'],
},
},
default:'',
description:
'Section to which you want move the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName:'Label Names or IDs',
name:'labels',
type:'multiOptions',
typeOptions:{
loadOptionsMethod:'getLabels',
},
displayOptions:{
show:{
resource:['task'],
operation:['create'],
},
},
default:[],
description:
'Optional labels that will be assigned to a created task. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName:'Content',
name:'content',
type:'string',
typeOptions:{
rows: 5,
},
displayOptions:{
show:{
resource:['task'],
operation:['create'],
},
},
default:'',
required: true,
description:'Task content',
},
{
displayName:'Sync Commands',
name:'commands',
type:'string',
displayOptions:{
show:{
resource:['task'],
operation:['sync'],
},
},
default:'[]',
hint:'See docs for possible commands: https://developer.todoist.com/sync/v8/#sync',
description:'Sync body',
},
{
displayName:'Additional Fields',
name:'options',
type:'collection',
placeholder:'Add Option',
default:{},
displayOptions:{
show:{
resource:['task'],
operation:['create'],
},
},
options:[
{
displayName:'Description',
name:'description',
type:'string',
default:'',
description:'A description for the task',
},
{
displayName:'Due Date Time',
name:'dueDateTime',
type:'dateTime',
default:'',
description:'Specific date and time in RFC3339 format in UTC',
},
{
displayName:'Due String Locale',
name:'dueLang',
type:'string',
default:'',
description:
'2-letter code specifying language in case due_string is not written in English',
},
{
displayName:'Due String',
name:'dueString',
type:'string',
default:'',
description:
'Human defined task due date (ex.: “next Monday”, “Tomorrow”). Value is set using local (not UTC) time.',
'The parent task you want to operate on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName:'Priority',
name:'priority',
type:'number',
typeOptions:{
maxValue: 4,
minValue: 1,
},
default:1,
description:'Task priority from 1 (normal) to 4 (urgent)',
},
{
displayName:'Section Name or ID',
name:'section',
type:'options',
typeOptions:{
loadOptionsMethod:'getSections',
loadOptionsDependsOn:['project.value'],
},
default:{},
description:
'The section you want to operate on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
],
},
{
displayName:'Return All',
name:'returnAll',
type:'boolean',
displayOptions:{
show:{
operation:['getAll'],
resource:['task'],
},
},
default:false,
description:'Whether to return all results or only up to a given limit',
},
{
displayName:'Limit',
name:'limit',
type:'number',
displayOptions:{
show:{
operation:['getAll'],
resource:['task'],
returnAll:[false],
},
},
typeOptions:{
minValue: 1,
maxValue: 500,
},
default:50,
description:'Max number of results to return',
},
{
displayName:'Filters',
name:'filters',
type:'collection',
placeholder:'Add Option',
default:{},
displayOptions:{
show:{
resource:['task'],
operation:['getAll'],
},
},
options:[
{
displayName:'Filter',
name:'filter',
type:'string',
default:'',
description:
'Filter by any <a href="https://get.todoist.help/hc/en-us/articles/205248842">supported filter.</a>',
},
{
displayName:'IDs',
name:'ids',
type:'string',
default:'',
description:'A list of the task IDs to retrieve, this should be a comma-separated list',
},
{
displayName:'Label Name or ID',
name:'labelId',
type:'options',
typeOptions:{
loadOptionsMethod:'getLabels',
},
default:{},
description:
'Filter tasks by label. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName:'Lang',
name:'lang',
type:'string',
default:'',
description:
'IETF language tag defining what language filter is written in, if differs from default English',
'Filter tasks by parent task ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName:'Project Name or ID',
name:'projectId',
type:'options',
typeOptions:{
loadOptionsMethod:'getProjects',
},
default:'',
description:
'Filter tasks by project ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName:'Section Name or ID',
name:'sectionId',
type:'options',
typeOptions:{
loadOptionsMethod:'getSections',
loadOptionsDependsOn:['filters.projectId'],
},
default:'',
description:
'Filter tasks by section ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
],
},
{
displayName:'Update Fields',
name:'updateFields',
type:'collection',
placeholder:'Add Field',
default:{},
displayOptions:{
show:{
resource:['task'],
operation:['update'],
},
},
options:[
{
displayName:'Content',
name:'content',
type:'string',
default:'',
description:'Task content',
},
{
displayName:'Description',
name:'description',
type:'string',
default:'',
description:'A description for the task',
},
{
displayName:'Due Date Time',
name:'dueDateTime',
type:'dateTime',
default:'',
description:'Specific date and time in RFC3339 format in UTC',
},
{
displayName:'Due String Locale',
name:'dueLang',
type:'string',
default:'',
description:
'2-letter code specifying language in case due_string is not written in English',
},
{
displayName:'Due String',
name:'dueString',
type:'string',
default:'',
description:
'Human defined task due date (ex.: “next Monday”, “Tomorrow”). Value is set using local (not UTC) time.',
},
{
displayName:'Due String Locale',
name:'dueLang',
type:'string',
default:'',
description:
'2-letter code specifying language in case due_string is not written in English',
},
{
displayName:'Label Names or IDs',
name:'labels',
type:'multiOptions',
description:
'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
typeOptions:{
loadOptionsMethod:'getLabels',
},
default:[],
},
{
displayName:'Priority',
name:'priority',
type:'number',
typeOptions:{
maxValue: 4,
minValue: 1,
},
default:1,
description:'Task priority from 1 (normal) to 4 (urgent)',