Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(google-tasks): ui improvement (#16377)

Talal Jabera70001c8a6a1
diff --git a/bun.lock b/bun.lock
index 95841cefe31..b608d628994 100644
--- a/bun.lock
+++ b/bun.lock
@@ -4021,7 +4021,7 @@
},
"packages/pieces/community/google-tasks": {
"name": "@activepieces/piece-google-tasks",
- "version": "0.6.1",
+ "version": "0.7.0",
"dependencies": {
"@activepieces/core-piece-types": "workspace:*",
"@activepieces/core-utils": "workspace:*",
diff --git a/packages/pieces/community/google-tasks/package.json b/packages/pieces/community/google-tasks/package.json
index d4b6c8d27e2..cc006e7f68a 100644
--- a/packages/pieces/community/google-tasks/package.json
+++ b/packages/pieces/community/google-tasks/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-google-tasks",
- "version": "0.6.1",
+ "version": "0.7.0",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"scripts": {
diff --git a/packages/pieces/community/google-tasks/src/i18n/de.json b/packages/pieces/community/google-tasks/src/i18n/de.json
index 5dfd1738d5a..f870ccd663c 100644
--- a/packages/pieces/community/google-tasks/src/i18n/de.json
+++ b/packages/pieces/community/google-tasks/src/i18n/de.json
@@ -88,5 +88,11 @@
"Form Data": "Formulardaten",
"Raw": "Rohe",
"New Task": "Neue Aufgabe",
- "Triggers when a task is created": "Wird ausgelöst, wenn eine Aufgabe erstellt wird"
+ "Triggers when a task is created": "Wird ausgelöst, wenn eine Aufgabe erstellt wird",
+ "Task List": "Aufgabenliste",
+ "Google Tasks keeps the date only; the time is ignored.": "Google Tasks speichert nur das Datum; die Uhrzeit wird ignoriert.",
+ "Add the task already checked off.": "Die Aufgabe bereits als erledigt hinzufügen.",
+ "Triggers when a task is added or edited in a list.": "Wird ausgelöst, wenn eine Aufgabe in einer Liste hinzugefügt oder bearbeitet wird.",
+ "Markdown": "Markdown",
+ "Edits to a task fire this trigger again, so the same task can arrive more than once.": "Änderungen an einer Aufgabe lösen diesen Trigger erneut aus, daher kann dieselbe Aufgabe mehrmals ankommen."
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-tasks/src/i18n/es.json b/packages/pieces/community/google-tasks/src/i18n/es.json
index 5c47160d71e..c8e71d31e34 100644
--- a/packages/pieces/community/google-tasks/src/i18n/es.json
+++ b/packages/pieces/community/google-tasks/src/i18n/es.json
@@ -88,5 +88,11 @@
"Form Data": "Datos de Formulario",
"Raw": "Rápido",
"New Task": "Nueva tarea",
- "Triggers when a task is created": "Dispara cuando se crea una tarea"
+ "Triggers when a task is created": "Dispara cuando se crea una tarea",
+ "Task List": "Lista de tareas",
+ "Google Tasks keeps the date only; the time is ignored.": "Google Tasks solo guarda la fecha; la hora se ignora.",
+ "Add the task already checked off.": "Añadir la tarea ya marcada como completada.",
+ "Triggers when a task is added or edited in a list.": "Se activa cuando se añade o edita una tarea en una lista.",
+ "Markdown": "Markdown",
+ "Edits to a task fire this trigger again, so the same task can arrive more than once.": "Las ediciones de una tarea vuelven a activar este disparador, así que la misma tarea puede llegar más de una vez."
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-tasks/src/i18n/fr.json b/packages/pieces/community/google-tasks/src/i18n/fr.json
index b859eccde34..4fb6bd1927e 100644
--- a/packages/pieces/community/google-tasks/src/i18n/fr.json
+++ b/packages/pieces/community/google-tasks/src/i18n/fr.json
@@ -88,5 +88,11 @@
"Form Data": "Données du formulaire",
"Raw": "Brut",
"New Task": "Nouvelle tâche",
- "Triggers when a task is created": "Déclenche quand une tâche est créée"
+ "Triggers when a task is created": "Déclenche quand une tâche est créée",
+ "Task List": "Liste de tâches",
+ "Google Tasks keeps the date only; the time is ignored.": "Google Tasks ne conserve que la date ; l’heure est ignorée.",
+ "Add the task already checked off.": "Ajouter la tâche déjà cochée comme terminée.",
+ "Triggers when a task is added or edited in a list.": "Se déclenche lorsqu’une tâche est ajoutée ou modifiée dans une liste.",
+ "Markdown": "Markdown",
+ "Edits to a task fire this trigger again, so the same task can arrive more than once.": "Les modifications d’une tâche relancent ce déclencheur : la même tâche peut donc arriver plusieurs fois."
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-tasks/src/i18n/ja.json b/packages/pieces/community/google-tasks/src/i18n/ja.json
index 359328be62c..dc83a7a3490 100644
--- a/packages/pieces/community/google-tasks/src/i18n/ja.json
+++ b/packages/pieces/community/google-tasks/src/i18n/ja.json
@@ -88,5 +88,11 @@
"Form Data": "フォームデータ",
"Raw": "Raw",
"New Task": "新しいタスク",
- "Triggers when a task is created": "タスクが作成されたときにトリガーします"
+ "Triggers when a task is created": "タスクが作成されたときにトリガーします",
+ "Task List": "タスクリスト",
+ "Google Tasks keeps the date only; the time is ignored.": "Google Tasks は日付のみを保存し、時刻は無視されます。",
+ "Add the task already checked off.": "タスクを完了済みとして追加します。",
+ "Triggers when a task is added or edited in a list.": "リスト内のタスクが追加または編集されたときにトリガーします。",
+ "Markdown": "Markdown",
+ "Edits to a task fire this trigger again, so the same task can arrive more than once.": "タスクを編集するとこのトリガーが再度実行されるため、同じタスクが複数回届くことがあります。"
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-tasks/src/i18n/nl.json b/packages/pieces/community/google-tasks/src/i18n/nl.json
index 9830549be45..c1e7ff3e6f7 100644
--- a/packages/pieces/community/google-tasks/src/i18n/nl.json
+++ b/packages/pieces/community/google-tasks/src/i18n/nl.json
@@ -88,5 +88,11 @@
"Form Data": "Formulieren gegevens",
"Raw": "Onbewerkte",
"New Task": "Nieuwe taak",
- "Triggers when a task is created": "Triggert wanneer een taak wordt aangemaakt"
+ "Triggers when a task is created": "Triggert wanneer een taak wordt aangemaakt",
+ "Task List": "Takenlijst",
+ "Google Tasks keeps the date only; the time is ignored.": "Google Tasks bewaart alleen de datum; de tijd wordt genegeerd.",
+ "Add the task already checked off.": "Voeg de taak toe als al afgevinkt.",
+ "Triggers when a task is added or edited in a list.": "Wordt geactiveerd wanneer een taak in een lijst wordt toegevoegd of bewerkt.",
+ "Markdown": "Markdown",
+ "Edits to a task fire this trigger again, so the same task can arrive more than once.": "Wijzigingen aan een taak activeren deze trigger opnieuw, dus dezelfde taak kan meer dan eens binnenkomen."
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-tasks/src/i18n/pt.json b/packages/pieces/community/google-tasks/src/i18n/pt.json
index 3cc7c7200e6..34dd75f2495 100644
--- a/packages/pieces/community/google-tasks/src/i18n/pt.json
+++ b/packages/pieces/community/google-tasks/src/i18n/pt.json
@@ -88,5 +88,11 @@
"Form Data": "Dados de Formulário",
"Raw": "RAW",
"New Task": "Nova tarefa",
- "Triggers when a task is created": "Dispara quando uma tarefa é criada"
+ "Triggers when a task is created": "Dispara quando uma tarefa é criada",
+ "Task List": "Lista de tarefas",
+ "Google Tasks keeps the date only; the time is ignored.": "O Google Tasks guarda apenas a data; o horário é ignorado.",
+ "Add the task already checked off.": "Adicionar a tarefa já marcada como concluída.",
+ "Triggers when a task is added or edited in a list.": "Dispara quando uma tarefa é adicionada ou editada em uma lista.",
+ "Markdown": "Markdown",
+ "Edits to a task fire this trigger again, so the same task can arrive more than once.": "Edições em uma tarefa disparam este gatilho de novo, então a mesma tarefa pode chegar mais de uma vez."
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-tasks/src/i18n/ru.json b/packages/pieces/community/google-tasks/src/i18n/ru.json
index 4071c62164c..b4d11ce53b9 100644
--- a/packages/pieces/community/google-tasks/src/i18n/ru.json
+++ b/packages/pieces/community/google-tasks/src/i18n/ru.json
@@ -26,5 +26,11 @@
"DELETE": "УДАЛИТЬ",
"HEAD": "HEAD",
"New Task": "Новая задача",
- "Triggers when a task is created": "Триггеры при создании задачи"
+ "Triggers when a task is created": "Триггеры при создании задачи",
+ "Task List": "Список задач",
+ "Google Tasks keeps the date only; the time is ignored.": "Google Tasks сохраняет только дату; время игнорируется.",
+ "Add the task already checked off.": "Добавить задачу сразу отмеченной как выполненная.",
+ "Triggers when a task is added or edited in a list.": "Срабатывает, когда задача добавлена или изменена в списке.",
+ "Markdown": "Markdown",
+ "Edits to a task fire this trigger again, so the same task can arrive more than once.": "Изменения задачи снова запускают этот триггер, поэтому одна и та же задача может прийти несколько раз."
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-tasks/src/i18n/translation.json b/packages/pieces/community/google-tasks/src/i18n/translation.json
index 9c9caed1a14..61cde3d2e8e 100644
--- a/packages/pieces/community/google-tasks/src/i18n/translation.json
+++ b/packages/pieces/community/google-tasks/src/i18n/translation.json
@@ -22,7 +22,6 @@
"Hide all completed tasks in a task list.": "Hide all completed tasks in a task list.",
"List the authenticated user's task lists (id and title).": "List the authenticated user's task lists (id and title).",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
- "Tasks List": "Tasks List",
"Title": "Title",
"Notes": "Notes",
"Due Date": "Due Date",
@@ -49,8 +48,6 @@
"Return Error as Output": "Return Error as Output",
"Timeout": "Timeout",
"Follow redirects": "Follow redirects",
- "Due date of the task (YYYY-MM-DD)": "Due date of the task (YYYY-MM-DD)",
- "Mark task as completed": "Mark task as completed",
"Include completed tasks in results. Defaults to true.": "Include completed tasks in results. Defaults to true.",
"Include hidden tasks (tasks that have been completed and a day has passed). Defaults to false.": "Include hidden tasks (tasks that have been completed and a day has passed). Defaults to false.",
"Return tasks due on or after this date. RFC 3339 timestamp, e.g. 2026-06-01T00:00:00Z.": "Return tasks due on or after this date. RFC 3339 timestamp, e.g. 2026-06-01T00:00:00Z.",
@@ -88,5 +85,10 @@
"DELETE": "DELETE",
"HEAD": "HEAD",
"New Task": "New Task",
- "Triggers when a task is created": "Triggers when a task is created"
+ "Task List": "Task List",
+ "Google Tasks keeps the date only; the time is ignored.": "Google Tasks keeps the date only; the time is ignored.",
+ "Add the task already checked off.": "Add the task already checked off.",
+ "Triggers when a task is added or edited in a list.": "Triggers when a task is added or edited in a list.",
+ "Markdown": "Markdown",
+ "Edits to a task fire this trigger again, so the same task can arrive more than once.": "Edits to a task fire this trigger again, so the same task can arrive more than once."
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-tasks/src/i18n/zh.json b/packages/pieces/community/google-tasks/src/i18n/zh.json
index f1e24d8d47d..4b47b64f6c4 100644
--- a/packages/pieces/community/google-tasks/src/i18n/zh.json
+++ b/packages/pieces/community/google-tasks/src/i18n/zh.json
@@ -88,5 +88,11 @@
"Form Data": "表单数据",
"Raw": "原始文件",
"New Task": "New Task",
- "Triggers when a task is created": "Triggers when a task is created"
+ "Triggers when a task is created": "Triggers when a task is created",
+ "Task List": "任务列表",
+ "Google Tasks keeps the date only; the time is ignored.": "Google Tasks 仅保留日期,时间会被忽略。",
+ "Add the task already checked off.": "添加时直接将任务标记为已完成。",
+ "Triggers when a task is added or edited in a list.": "当列表中的任务被添加或编辑时触发。",
+ "Markdown": "Markdown",
+ "Edits to a task fire this trigger again, so the same task can arrive more than once.": "编辑任务会再次触发此触发器,因此同一任务可能会多次出现。"
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-tasks/src/index.ts b/packages/pieces/community/google-tasks/src/index.ts
index 620d4a785b6..0c2cc14c67a 100644
--- a/packages/pieces/community/google-tasks/src/index.ts
+++ b/packages/pieces/community/google-tasks/src/index.ts
@@ -19,7 +19,7 @@ import { newTaskTrigger } from './lib/triggers/new-task';
import { googleTasksAuth } from './lib/auth';
export const googleTasks = createPiece({
- minimumSupportedRelease: '0.86.4',
+ minimumSupportedRelease: '0.88.2',
logoUrl: 'https://cdn.activepieces.com/pieces/google-tasks.png',
categories: [PieceCategory.PRODUCTIVITY],
actions: [
@@ -39,6 +39,12 @@ export const googleTasks = createPiece({
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,
}),
+ props: {
+ url: {
+ description: `Full URL, or a path relative to ${googleTasksCommon.baseUrl}`,
+ placeholder: '/tasks/v1/users/@me/lists',
+ },
+ },
}),
],
displayName: 'Google Tasks',
diff --git a/packages/pieces/community/google-tasks/src/lib/actions/new-task.ts b/packages/pieces/community/google-tasks/src/lib/actions/new-task.ts
index 1a2f3513fa0..42b912f8ec9 100644
--- a/packages/pieces/community/google-tasks/src/lib/actions/new-task.ts
+++ b/packages/pieces/community/google-tasks/src/lib/actions/new-task.ts
@@ -22,6 +22,10 @@ export const googleTasksAddNewTaskAction = createAction({
due: googleTasksCommon.due,
completed: googleTasksCommon.completed,
},
+ propertyGroups: [
+ { key: 'destination', display: 'section', label: 'Add to', icon: 'inbox', props: ['tasks_list'] },
+ { key: 'task', display: 'section', label: 'Task', icon: 'text', props: ['title', 'notes', 'due', 'completed'] },
+ ],
async run({ auth, propsValue }) {
const task: Task = {
kind: 'tasks#task',
@@ -29,7 +33,7 @@ export const googleTasksAddNewTaskAction = createAction({
? TaskStatus.COMPLETED
: TaskStatus.NEEDS_ACTION,
title: propsValue.title,
- completed: propsValue.completed ? new Date().toISOString() : '',
+ completed: propsValue.completed ? new Date().toISOString() : undefined,
notes: propsValue.notes,
due: propsValue.due
? `${new Date(propsValue.due).toISOString().split('T')[0]}T00:00:00Z`
diff --git a/packages/pieces/community/google-tasks/src/lib/common/index.ts b/packages/pieces/community/google-tasks/src/lib/common/index.ts
index f7f689a2d40..665cb188f81 100644
--- a/packages/pieces/community/google-tasks/src/lib/common/index.ts
+++ b/packages/pieces/community/google-tasks/src/lib/common/index.ts
@@ -78,7 +78,7 @@ export const googleTasksCommon = {
* @property Target task list ID where the new task will be created
*/
tasksList: Property.Dropdown<string,true,typeof googleTasksAuth>({
- displayName: 'Tasks List',
+ displayName: 'Task List',
auth: googleTasksAuth,
refreshers: [],
required: true,
@@ -92,21 +92,38 @@ export const googleTasksCommon = {
}
const authProp: OAuth2PropertyValue = auth as OAuth2PropertyValue;
- const tasksLists = await getLists(authProp);
+ try {
+ const tasksLists = await getLists(authProp);
- return {
- disabled: false,
- options: tasksLists.map((list) => {
+ if (tasksLists.length === 0) {
return {
- label: list.title,
- value: list.id,
+ disabled: false,
+ options: [],
+ placeholder: 'No task lists found. Create one in Google Tasks first.',
};
- }),
- };
+ }
+
+ return {
+ disabled: false,
+ options: tasksLists.map((list) => {
+ return {
+ label: list.title,
+ value: list.id,
+ };
+ }),
+ };
+ } catch {
+ return {
+ disabled: true,
+ options: [],
+ placeholder: 'Failed to load task lists. Check your connection.',
+ };
+ }
},
}),
title: Property.ShortText({
displayName: 'Title',
+ placeholder: 'Call the dentist',
required: true,
}),
notes: Property.LongText({
@@ -115,13 +132,15 @@ export const googleTasksCommon = {
}),
due: Property.DateTime({
displayName: 'Due Date',
- description: 'Due date of the task (YYYY-MM-DD)',
+ description: 'Google Tasks keeps the date only; the time is ignored.',
+ placeholder: '2026-10-15',
required: false,
}),
completed: Property.Checkbox({
displayName: 'Completed',
- description: 'Mark task as completed',
+ description: 'Add the task already checked off.',
required: false,
+ defaultValue: false,
}),
};
@@ -129,16 +148,26 @@ export async function getLists(
authProp: OAuth2PropertyValue
): Promise<TasksList[]> {
// docs: https://developers.google.com/tasks/reference/rest/v1/tasklists/list
- const request: HttpRequest = {
- method: HttpMethod.GET,
- url: `${googleTasksCommon.baseUrl}/tasks/v1/users/@me/lists`,
- authentication: {
- type: AuthenticationType.BEARER_TOKEN,
- token: authProp.access_token,
- },
- };
- const response = await httpClient.sendRequest<TasksListResponse>(request);
- return response.body.items;
+ const lists: TasksList[] = [];
+ let pageToken: string | undefined = undefined;
+ do {
+ const request: HttpRequest = {
+ method: HttpMethod.GET,
+ url: `${googleTasksCommon.baseUrl}/tasks/v1/users/@me/lists`,
+ authentication: {
+ type: AuthenticationType.BEARER_TOKEN,
+ token: authProp.access_token,
+ },
+ queryParams: {
+ maxResults: '100',
+ ...(pageToken ? { pageToken } : {}),
+ },
+ };
+ const response = await httpClient.sendRequest<TasksListResponse>(request);
+ lists.push(...(response.body.items ?? []));
+ pageToken = response.body.nextPageToken;
+ } while (pageToken);
+ return lists;
}
export async function getTasks(
@@ -160,6 +189,38 @@ export async function getTasks(
return response.body.items ?? [];
}
+export async function getAllTasks({
+ auth,
+ taskListId,
+ params,
+}: {
+ auth: OAuth2PropertyValue;
+ taskListId: string;
+ params?: Record<string, string>;
+}): Promise<Task[]> {
+ const tasks: Task[] = [];
+ let pageToken: string | undefined = undefined;
+ do {
+ const request: HttpRequest = {
+ method: HttpMethod.GET,
+ url: `${googleTasksCommon.baseUrl}/tasks/v1/lists/${taskListId}/tasks`,
+ authentication: {
+ type: AuthenticationType.BEARER_TOKEN,
+ token: auth.access_token,
+ },
+ queryParams: {
+ ...params,
+ maxResults: '100',
+ ...(pageToken ? { pageToken } : {}),
+ },
+ };
+ const response = await httpClient.sendRequest<TasksResponse>(request);
+ tasks.push(...(response.body.items ?? []));
+ pageToken = response.body.nextPageToken;
+ } while (pageToken);
+ return tasks;
+}
+
export async function createTask(
authProp: OAuth2PropertyValue,
taskListId: string,
diff --git a/packages/pieces/community/google-tasks/src/lib/triggers/new-task.ts b/packages/pieces/community/google-tasks/src/lib/triggers/new-task.ts
index 39ff433158f..dec03781d1e 100644
--- a/packages/pieces/community/google-tasks/src/lib/triggers/new-task.ts
+++ b/packages/pieces/community/google-tasks/src/lib/triggers/new-task.ts
@@ -1,5 +1,7 @@
import {
AppConnectionValueForAuthProperty,
+ MarkdownVariant,
+ Property,
StaticPropsValue,
TriggerStrategy,
createTrigger,
@@ -10,11 +12,15 @@ import {
Polling,
pollingHelper,
} from '@activepieces/pieces-common';
-import { getTasks, googleTasksCommon } from '../common';
+import { getAllTasks, googleTasksCommon } from '../common';
import { googleTasksNewTaskTriggerOutputSchema } from '../output-schemas';
const props = {
tasks_list: googleTasksCommon.tasksList,
+ info: Property.MarkDown({
+ value: 'Edits to a task fire this trigger again, so the same task can arrive more than once.',
+ variant: MarkdownVariant.INFO,
+ }),
};
const polling: Polling<
@@ -23,7 +29,15 @@ const polling: Polling<
> = {
strategy: DedupeStrategy.TIMEBASED,
items: async ({ auth, propsValue, lastFetchEpochMS }) => {
- const records = await getTasks(auth, propsValue.tasks_list!);
+ const params: Record<string, string> =
+ lastFetchEpochMS > 0
+ ? { updatedMin: new Date(lastFetchEpochMS).toISOString() }
+ : {};
+ const records = await getAllTasks({
+ auth,
+ taskListId: propsValue.tasks_list,
+ params,
+ });
const filtered_records = records.filter((record) => {
const updated = Date.parse(record.updated ?? '0');
@@ -42,14 +56,37 @@ export const newTaskTrigger = createTrigger({
name: 'new_task',
classification: 'READ',
displayName: 'New Task',
- description: 'Triggers when a task is created',
+ description: 'Triggers when a task is added or edited in a list.',
aiMetadata: {
description: 'Fires when a task in the selected Google Tasks list is newly created or updated since the last poll, emitting the task that changed. Use to react to additions or edits in a specific task list.',
},
type: TriggerStrategy.POLLING,
props,
+ propertyGroups: [
+ {
+ key: 'source',
+ display: 'section',
+ label: 'Watch',
+ icon: 'inbox',
+ props: ['tasks_list', 'info'],
+ },
+ ],
outputSchema: googleTasksNewTaskTriggerOutputSchema,
- sampleData: {},
+ sampleData: {
+ kind: 'tasks#task',
+ id: 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA',
+ etag: '"LTEyMzQ1Njc4OTA"',
+ title: 'Call the dentist',
+ updated: '2026-10-11T09:30:00.000Z',
+ selfLink:
+ 'https://www.googleapis.com/tasks/v1/lists/MDEyMzQ1Njc4OTAxMjM0NTY3ODk/tasks/MTIzNDU2Nzg5MDEyMzQ1Njc4OTA',
+ position: '00000000000000000000',
+ notes: 'Ask about the cleaning appointment',
+ status: 'needsAction',
+ due: '2026-10-15T00:00:00.000Z',
+ links: [],
+ webViewLink: 'https://tasks.google.com/task/MTIzNDU2Nzg5MDEyMzQ1Njc4OTA',
+ },
async test(context) {
const store = context.store;
const auth = context.auth;
@@ -66,7 +103,7 @@ export const newTaskTrigger = createTrigger({
const store = context.store;
const auth = context.auth;
const propsValue = context.propsValue;
- await pollingHelper.onEnable(polling, { store, auth, propsValue });
+ await pollingHelper.onDisable(polling, { store, auth, propsValue });
},
async run(context) {
const store = context.store;