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
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(asana): ui improvement (#16710)
Talal Jaber284a1f75e2ff
diff --git a/bun.lock b/bun.lockindex 5a97b7f90cb..6fe67b4d5c9 100644--- a/bun.lock+++ b/bun.lock@@ -800,7 +800,7 @@},"packages/pieces/community/asana": {"name": "@activepieces/piece-asana",- "version": "0.7.2",+ "version": "0.8.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",diff --git a/docs/install/reference/breaking-changes-unreleased.mdx b/docs/install/reference/breaking-changes-unreleased.mdxindex a7ca4e6d63a..c5bfc8d8b8a 100644--- a/docs/install/reference/breaking-changes-unreleased.mdx+++ b/docs/install/reference/breaking-changes-unreleased.mdx@@ -8,6 +8,18 @@ Entries here move to [Breaking Changes](/install/reference/breaking-changes) aut## What has changed?+#### Asana 0.8.0 Create Task sends a plain date as an all-day due date and fails on unknown tags++Asana 0.8.0 changes what an existing **Create Task** step does once it is upgraded to that version. Steps keep running on the version they were built with until you upgrade them.++A Due Date written as a plain date (`2026-12-31`) is now sent as an all-day due date. Before, it was sent as midnight on the server's clock, so the task got a due time and, for anyone west of that time zone, showed the previous day. A Due Date that includes a time (`2026-12-31T14:00:00Z`) is still sent as a due time, and a value that is not a date now stops the step with a clear message instead of "Invalid time value".++Tags typed by name that match no tag in the workspace now stop the step with a "No tag named …" error. Before, they were skipped and the task was created without them.++#### What you need to do++Before you upgrade a Create Task step to 0.8.0, check that every tag name it types exists in the workspace. If a later step reads the created task's `due_at`, read `due_on` instead when the Due Date is a plain date.+#### Worker group ids can no longer contain a colonWorker group ids with `:` in them are no longer routable. The assignment endpoints reject them, and a project or flow already assigned to such a group is treated as unassigned: its runs fall back to the project, platform or shared queue instead of the group's dedicated queue, and the group disappears from the worker groups page.diff --git a/packages/pieces/community/asana/package.json b/packages/pieces/community/asana/package.jsonindex 06d0849ff7a..d96a89b0176 100644--- a/packages/pieces/community/asana/package.json+++ b/packages/pieces/community/asana/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-asana",- "version": "0.7.2",+ "version": "0.8.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {diff --git a/packages/pieces/community/asana/src/i18n/de.json b/packages/pieces/community/asana/src/i18n/de.jsonindex 2632708960d..c91ed5db723 100644--- a/packages/pieces/community/asana/src/i18n/de.json+++ b/packages/pieces/community/asana/src/i18n/de.json@@ -10,7 +10,7 @@"Task Description": "Aufgabenbeschreibung","Due Date": "Fälligkeitsdatum","Tags": "Tags",- "Assignee": "Assignee",+ "Assignee": "Zuständige Person","Method": "Methode","Headers": "Kopfzeilen","Query Parameters": "Abfrageparameter",@@ -849,5 +849,13 @@"Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.": "Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.","The file to upload (up to 100 MB). Leave empty when attaching an External URL.": "The file to upload (up to 100 MB). Leave empty when attaching an External URL.","An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.": "An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.",- "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name."+ "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name.",+ "Where": "Wo",+ "Details": "Details",+ "Workspace the task is created in.": "Arbeitsbereich, in dem die Aufgabe erstellt wird.",+ "Project the task is added to. Archived projects are not listed.": "Projekt, dem die Aufgabe hinzugefügt wird. Archivierte Projekte werden nicht angezeigt.",+ "Plain text shown in the task's description.": "Klartext, der in der Beschreibung der Aufgabe angezeigt wird.",+ "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.": "Tag, an dem die Aufgabe fällig ist. Für eine Uhrzeit z. B. 2026-12-31T14:00:00Z angeben.",+ "Pick tags, or type the names of existing tags.": "Tags auswählen oder die Namen vorhandener Tags eingeben.",+ "Leave empty to keep the task unassigned.": "Leer lassen, damit die Aufgabe niemandem zugewiesen wird."}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/i18n/es.json b/packages/pieces/community/asana/src/i18n/es.jsonindex 14643d7534a..681a4a01f11 100644--- a/packages/pieces/community/asana/src/i18n/es.json+++ b/packages/pieces/community/asana/src/i18n/es.json@@ -10,7 +10,7 @@"Task Description": "Descripción de la tarea","Due Date": "Fecha de fin","Tags": "Etiquetas",- "Assignee": "Assignee",+ "Assignee": "Responsable","Method": "Método","Headers": "Encabezados","Query Parameters": "Parámetros de consulta",@@ -849,5 +849,13 @@"Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.": "Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.","The file to upload (up to 100 MB). Leave empty when attaching an External URL.": "The file to upload (up to 100 MB). Leave empty when attaching an External URL.","An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.": "An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.",- "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name."+ "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name.",+ "Where": "Dónde",+ "Details": "Detalles",+ "Workspace the task is created in.": "Espacio de trabajo en el que se crea la tarea.",+ "Project the task is added to. Archived projects are not listed.": "Proyecto al que se añade la tarea. Los proyectos archivados no aparecen.",+ "Plain text shown in the task's description.": "Texto sin formato que se muestra en la descripción de la tarea.",+ "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.": "Día de vencimiento de la tarea. Para indicar también la hora, usa 2026-12-31T14:00:00Z.",+ "Pick tags, or type the names of existing tags.": "Elige etiquetas o escribe los nombres de etiquetas existentes.",+ "Leave empty to keep the task unassigned.": "Déjalo vacío para que la tarea quede sin asignar."}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/i18n/fr.json b/packages/pieces/community/asana/src/i18n/fr.jsonindex 0b1c00a657b..9c33b284476 100644--- a/packages/pieces/community/asana/src/i18n/fr.json+++ b/packages/pieces/community/asana/src/i18n/fr.json@@ -10,7 +10,7 @@"Task Description": "Description de tâche","Due Date": "Date de fin","Tags": "Tags",- "Assignee": "Assignee",+ "Assignee": "Responsable","Method": "Méthode","Headers": "En-têtes","Query Parameters": "Paramètres de requête",@@ -849,5 +849,13 @@"Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.": "Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.","The file to upload (up to 100 MB). Leave empty when attaching an External URL.": "The file to upload (up to 100 MB). Leave empty when attaching an External URL.","An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.": "An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.",- "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name."+ "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name.",+ "Where": "Où",+ "Details": "Détails",+ "Workspace the task is created in.": "Espace de travail dans lequel la tâche est créée.",+ "Project the task is added to. Archived projects are not listed.": "Projet auquel la tâche est ajoutée. Les projets archivés ne sont pas listés.",+ "Plain text shown in the task's description.": "Texte brut affiché dans la description de la tâche.",+ "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.": "Jour d'échéance de la tâche. Pour une heure d'échéance, utilisez 2026-12-31T14:00:00Z.",+ "Pick tags, or type the names of existing tags.": "Choisissez des tags ou saisissez les noms de tags existants.",+ "Leave empty to keep the task unassigned.": "Laissez vide pour que la tâche ne soit attribuée à personne."}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/i18n/ja.json b/packages/pieces/community/asana/src/i18n/ja.jsonindex 8106c08747d..582755f2e4c 100644--- a/packages/pieces/community/asana/src/i18n/ja.json+++ b/packages/pieces/community/asana/src/i18n/ja.json@@ -10,7 +10,7 @@"Task Description": "タスクの説明","Due Date": "締切日","Tags": "タグ",- "Assignee": "Assignee",+ "Assignee": "担当者","Method": "方法","Headers": "ヘッダー","Query Parameters": "クエリパラメータ",@@ -176,7 +176,7 @@"Query": "検索クエリ","Count": "カウント","Project GID": "Project GID",- "Description": "Description",+ "Description": "説明","HTML Description": "HTML Description","Due Date and Time": "Due Date and Time","Start Date": "開始日",@@ -680,7 +680,7 @@"User GID": "User GID","Entered From": "Entered From","Entered To": "Entered To",- "Name": "ワークブック名",+ "Name": "名前","Custom Field Values": "Custom Field Values","Gid of the workspace to search. Obtain it from List Workspaces.": "Gid of the workspace to search. Obtain it from List Workspaces.","Words to match in the task name and description. Leave empty to filter only.": "Words to match in the task name and description. Leave empty to filter only.",@@ -849,5 +849,13 @@"Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.": "Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.","The file to upload (up to 100 MB). Leave empty when attaching an External URL.": "The file to upload (up to 100 MB). Leave empty when attaching an External URL.","An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.": "An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.",- "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name."+ "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name.",+ "Where": "作成先",+ "Details": "詳細",+ "Workspace the task is created in.": "タスクを作成するワークスペース。",+ "Project the task is added to. Archived projects are not listed.": "タスクを追加するプロジェクト。アーカイブ済みのプロジェクトは表示されません。",+ "Plain text shown in the task's description.": "タスクの説明に表示されるプレーンテキスト。",+ "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.": "タスクの期日。期限時刻も設定するには 2026-12-31T14:00:00Z の形式を使います。",+ "Pick tags, or type the names of existing tags.": "タグを選択するか、既存のタグ名を入力します。",+ "Leave empty to keep the task unassigned.": "空のままにすると、タスクは未割り当てになります。"}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/i18n/nl.json b/packages/pieces/community/asana/src/i18n/nl.jsonindex b1b4004ed0c..47a1f18fcb0 100644--- a/packages/pieces/community/asana/src/i18n/nl.json+++ b/packages/pieces/community/asana/src/i18n/nl.json@@ -10,7 +10,7 @@"Task Description": "Beschrijving taak","Due Date": "Inleverdatum","Tags": "Labels",- "Assignee": "Assignee",+ "Assignee": "Toegewezen persoon","Method": "Methode","Headers": "Kopteksten","Query Parameters": "Query parameters",@@ -849,5 +849,13 @@"Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.": "Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.","The file to upload (up to 100 MB). Leave empty when attaching an External URL.": "The file to upload (up to 100 MB). Leave empty when attaching an External URL.","An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.": "An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.",- "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name."+ "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name.",+ "Where": "Waar",+ "Details": "Details",+ "Workspace the task is created in.": "Werkruimte waarin de taak wordt aangemaakt.",+ "Project the task is added to. Archived projects are not listed.": "Project waaraan de taak wordt toegevoegd. Gearchiveerde projecten worden niet weergegeven.",+ "Plain text shown in the task's description.": "Platte tekst die in de beschrijving van de taak wordt getoond.",+ "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.": "Dag waarop de taak af moet zijn. Gebruik voor een tijdstip 2026-12-31T14:00:00Z.",+ "Pick tags, or type the names of existing tags.": "Kies labels of typ de namen van bestaande labels.",+ "Leave empty to keep the task unassigned.": "Laat leeg om de taak aan niemand toe te wijzen."}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/i18n/pt.json b/packages/pieces/community/asana/src/i18n/pt.jsonindex 357474846f4..88c24d293b0 100644--- a/packages/pieces/community/asana/src/i18n/pt.json+++ b/packages/pieces/community/asana/src/i18n/pt.json@@ -4,13 +4,13 @@"Custom API Call": "Chamada de API personalizada","Create a new task": "Criar uma nova tarefa","Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",- "Workspace": "Workspace",+ "Workspace": "Espaço de trabalho","Project": "Projecto","Task Name": "Nome da tarefa","Task Description": "Descrição da tarefa","Due Date": "Data de vencimento","Tags": "Etiquetas",- "Assignee": "Assignee",+ "Assignee": "Responsável","Method": "Método","Headers": "Cabeçalhos","Query Parameters": "Parâmetros da consulta",@@ -849,5 +849,13 @@"Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.": "Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.","The file to upload (up to 100 MB). Leave empty when attaching an External URL.": "The file to upload (up to 100 MB). Leave empty when attaching an External URL.","An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.": "An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.",- "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name."+ "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name.",+ "Where": "Onde",+ "Details": "Detalhes",+ "Workspace the task is created in.": "Espaço de trabalho em que a tarefa é criada.",+ "Project the task is added to. Archived projects are not listed.": "Projeto ao qual a tarefa é adicionada. Projetos arquivados não são listados.",+ "Plain text shown in the task's description.": "Texto simples exibido na descrição da tarefa.",+ "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.": "Dia de vencimento da tarefa. Para incluir um horário, use 2026-12-31T14:00:00Z.",+ "Pick tags, or type the names of existing tags.": "Escolha etiquetas ou digite os nomes de etiquetas existentes.",+ "Leave empty to keep the task unassigned.": "Deixe em branco para manter a tarefa sem responsável."}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/i18n/ru.json b/packages/pieces/community/asana/src/i18n/ru.jsonindex cfa7bac461b..dc744073123 100644--- a/packages/pieces/community/asana/src/i18n/ru.json+++ b/packages/pieces/community/asana/src/i18n/ru.json@@ -11,7 +11,7 @@"Task Description": "Описание задачи","Due Date": "Срок сдачи","Tags": "Теги",- "Assignee": "Assignee",+ "Assignee": "Исполнитель","Method": "Метод","Headers": "Заголовки","Query Parameters": "Параметры запроса",@@ -31,5 +31,16 @@"PATCH": "ПАТЧ","PUT": "ПОКУПИТЬ","DELETE": "УДАЛИТЬ",- "HEAD": "HEAD"+ "HEAD": "HEAD",+ "Name": "Название",+ "Description": "Описание",+ "Task": "Задача",+ "Where": "Где",+ "Details": "Подробности",+ "Workspace the task is created in.": "Рабочее пространство, в котором создаётся задача.",+ "Project the task is added to. Archived projects are not listed.": "Проект, в который добавляется задача. Архивные проекты не отображаются.",+ "Plain text shown in the task's description.": "Обычный текст, который отображается в описании задачи.",+ "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.": "День, к которому нужно выполнить задачу. Чтобы указать и время, используйте 2026-12-31T14:00:00Z.",+ "Pick tags, or type the names of existing tags.": "Выберите теги или введите названия существующих тегов.",+ "Leave empty to keep the task unassigned.": "Оставьте пустым, чтобы задача осталась без исполнителя."}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/i18n/translation.json b/packages/pieces/community/asana/src/i18n/translation.jsonindex 3b780d13b52..b43b5d67940 100644--- a/packages/pieces/community/asana/src/i18n/translation.json+++ b/packages/pieces/community/asana/src/i18n/translation.json@@ -254,8 +254,8 @@"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint","Workspace": "Workspace","Project": "Project",- "Task Name": "Task Name",- "Task Description": "Task Description",+ "Name": "Name",+ "Description": "Description","Due Date": "Due Date","Tags": "Tags","Assignee": "Assignee",@@ -267,7 +267,7 @@"Query": "Query","Count": "Count","Project GID": "Project GID",- "Description": "Description",+ "Task Name": "Task Name","HTML Description": "HTML Description","Due Date and Time": "Due Date and Time","Start Date": "Start Date",@@ -327,7 +327,6 @@"Attachment GID": "Attachment GID","File": "File","External URL": "External URL",- "Name": "Name","Project or Portfolio GID": "Project or Portfolio GID","Requester": "Requester","Message": "Message",@@ -408,13 +407,12 @@"Return Error as Output": "Return Error as Output","Timeout": "Timeout","Follow redirects": "Follow redirects",- "Asana workspace to create the task in": "Asana workspace to create the task in",- "Asana Project to create the task in": "Asana Project to create the task in",- "The name of the task to create": "The name of the task to create",- "Free-form textual information associated with the task (i.e. its description).": "Free-form textual information associated with the task (i.e. its description).",- "The date on which this task is due in any format.": "The date on which this task is due in any format.",- "Tags to add to the task": "Tags to add to the task",- "Assignee for the task": "Assignee for the task",+ "Workspace the task is created in.": "Workspace the task is created in.",+ "Project the task is added to. Archived projects are not listed.": "Project the task is added to. Archived projects are not listed.",+ "Plain text shown in the task's description.": "Plain text shown in the task's description.",+ "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.": "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.",+ "Pick tags, or type the names of existing tags.": "Pick tags, or type the names of existing tags.",+ "Leave empty to keep the task unassigned.": "Leave empty to keep the task unassigned.","Maximum number of workspaces to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of workspaces to return in this page, from 1 to 100. Defaults to 50.","Pagination token for the next page. Pass the `next_offset` value returned by the previous call of this same action; leave empty for the first page. Tokens expire after a while.": "Pagination token for the next page. Pass the `next_offset` value returned by the previous call of this same action; leave empty for the first page. Tokens expire after a while.","Gid of the organization, for example 1201234567890123. Obtain it from List Workspaces (is_organization must be true).": "Gid of the organization, for example 1201234567890123. Obtain it from List Workspaces (is_organization must be true).",@@ -851,6 +849,8 @@"PUT": "PUT","DELETE": "DELETE","HEAD": "HEAD",+ "Where": "Where",+ "Details": "Details","Request": "Request","Data to send": "Data to send"}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/i18n/zh.json b/packages/pieces/community/asana/src/i18n/zh.jsonindex 2a11568ecb5..42c7b0422d9 100644--- a/packages/pieces/community/asana/src/i18n/zh.json+++ b/packages/pieces/community/asana/src/i18n/zh.json@@ -1,16 +1,16 @@{"Work management platform designed to help teams organize, track, and manage their work.": "Work management platform designed to help teams organize, track, and manage their work.",- "Create Task": "Create Task",+ "Create Task": "创建任务","Custom API Call": "自定义 API 呼叫","Create a new task": "Create a new task","Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",- "Workspace": "Workspace",+ "Workspace": "工作区","Project": "项目","Task Name": "Task Name","Task Description": "Task Description",- "Due Date": "Due Date",+ "Due Date": "截止日期","Tags": "标签",- "Assignee": "Assignee",+ "Assignee": "负责人","Method": "方法","Headers": "信头","Query Parameters": "查询参数",@@ -372,7 +372,7 @@"Gid of the tag to apply. Obtain it from List Tags or Search Workspace Objects (object type tag).": "Gid of the tag to apply. Obtain it from List Tags or Search Workspace Objects (object type tag).","Gid of the tag to remove. Obtain it from List Task Tags.": "Gid of the tag to remove. Obtain it from List Task Tags.","Gid of the tag. Obtain it from List Tags or Search Workspace Objects (object type tag).": "Gid of the tag. Obtain it from List Tags or Search Workspace Objects (object type tag).",- "Task": "Task",+ "Task": "任务","User": "用户","Tag": "标签","Team": "Team",@@ -849,5 +849,13 @@"Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.": "Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.","The file to upload (up to 100 MB). Leave empty when attaching an External URL.": "The file to upload (up to 100 MB). Leave empty when attaching an External URL.","An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.": "An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.",- "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name."+ "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name.",+ "Where": "位置",+ "Details": "详细信息",+ "Workspace the task is created in.": "创建任务所在的工作区。",+ "Project the task is added to. Archived projects are not listed.": "任务要添加到的项目。已归档的项目不会列出。",+ "Plain text shown in the task's description.": "显示在任务描述中的纯文本。",+ "Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.": "任务的截止日期。如需同时设置截止时间,请使用 2026-12-31T14:00:00Z。",+ "Pick tags, or type the names of existing tags.": "选择标签,或输入现有标签的名称。",+ "Leave empty to keep the task unassigned.": "留空则任务不分配给任何人。"}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/index.ts b/packages/pieces/community/asana/src/index.tsindex e7eccd3d9b4..646ca7a619b 100644--- a/packages/pieces/community/asana/src/index.ts+++ b/packages/pieces/community/asana/src/index.ts@@ -1,8 +1,5 @@import { createCustomApiCallAction } from '@activepieces/pieces-common';-import {- OAuth2PropertyValue,- createPiece,-} from '@activepieces/pieces-framework';+import { createPiece } from '@activepieces/pieces-framework';import { PieceCategory } from '@activepieces/pieces-framework';import { asanaCreateTaskAction } from './lib/actions/create-task';import { asanaGetCurrentUserAction } from './lib/actions/ai/get-current-user';@@ -269,8 +266,15 @@ export const asana = createPiece({baseUrl: () => `https://app.asana.com/api/1.0`,auth: asanaAuth,authMapping: async (auth) => ({- Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,+ Authorization: `Bearer ${auth.access_token}`,}),+ props: {+ url: {+ description:+ 'Full URL, or a path relative to https://app.asana.com/api/1.0',+ placeholder: '/users/me',+ },+ },}),],triggers: [],diff --git a/packages/pieces/community/asana/src/lib/actions/create-task.test.ts b/packages/pieces/community/asana/src/lib/actions/create-task.test.tsnew file mode 100644index 00000000000..ac031a46d43--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/create-task.test.ts@@ -0,0 +1,116 @@+import { afterEach, describe, expect, it, vi } from 'vitest';+import { HttpMethod, HttpRequest, httpClient } from '@activepieces/pieces-common';+import { AppConnectionType, createMockActionContext, InputPropertyMap } from '@activepieces/pieces-framework';+import '../../index';+import { asanaCreateTaskAction } from './create-task';++const TASKS_URL = 'https://app.asana.com/api/1.0/tasks';+const TAGS_URL = 'https://app.asana.com/api/1.0/tags';++function mockAsana({ tags }: { tags: { gid: string; name: string }[] }) {+ return vi.spyOn(httpClient, 'sendRequest').mockImplementation(async (request: HttpRequest) => {+ if (request.method === HttpMethod.GET && request.url === TAGS_URL) {+ return { status: 200, headers: {}, body: { data: tags, next_page: null } };+ }+ if (request.method === HttpMethod.POST && request.url === TASKS_URL) {+ return { status: 201, headers: {}, body: { data: { gid: '9001' } } };+ }+ throw new Error(`Unexpected request ${request.method} ${request.url}`);+ });+}++function runCreateTask(overrides: Record<string, unknown>) {+ const propsValue = {+ workspace: '100',+ project: '200',+ name: 'Review the Q4 budget',+ notes: undefined,+ due_on: undefined,+ tags: undefined,+ assignee: undefined,+ ...overrides,+ };+ const base = createMockActionContext<InputPropertyMap>({ propsValue });+ return asanaCreateTaskAction.run({+ ...base,+ auth: {+ type: AppConnectionType.OAUTH2,+ access_token: 'token',+ client_id: 'client',+ client_secret: 'secret',+ redirect_url: 'https://example.com/redirect',+ token_type: 'Bearer',+ token_url: 'https://app.asana.com/-/oauth_token',+ scope: 'default',+ claimed_at: 0,+ refresh_token: 'refresh',+ data: {},+ },+ propsValue,+ });+}++function postedTask(sendRequest: ReturnType<typeof mockAsana>): unknown {+ const post = sendRequest.mock.calls.find(([request]) => request.url === TASKS_URL);+ return post?.[0].body;+}++describe('asanaCreateTaskAction', () => {+ afterEach(() => {+ vi.restoreAllMocks();+ });++ it('sends a plain date as an all-day due_on', async () => {+ const sendRequest = mockAsana({ tags: [] });++ await runCreateTask({ due_on: ' 2026-12-31 ' });++ const body = postedTask(sendRequest);+ expect(body).toEqual({ data: expect.objectContaining({ due_on: '2026-12-31' }) });+ expect(body).not.toEqual({ data: expect.objectContaining({ due_at: expect.anything() }) });+ });++ it('sends a date with a time as due_at', async () => {+ const sendRequest = mockAsana({ tags: [] });++ await runCreateTask({ due_on: '2026-12-31T14:00:00Z' });++ const body = postedTask(sendRequest);+ expect(body).toEqual({ data: expect.objectContaining({ due_at: '2026-12-31T14:00:00.000Z' }) });+ expect(body).not.toEqual({ data: expect.objectContaining({ due_on: expect.anything() }) });+ });++ it('sends no due date when the field is empty', async () => {+ const sendRequest = mockAsana({ tags: [] });++ await runCreateTask({ due_on: '' });++ const body = postedTask(sendRequest);+ expect(body).not.toEqual({ data: expect.objectContaining({ due_on: expect.anything() }) });+ expect(body).not.toEqual({ data: expect.objectContaining({ due_at: expect.anything() }) });+ });++ it.each(['next friday', '2026-13-45'])('fails on "%s" before creating the task', async (value) => {+ const sendRequest = mockAsana({ tags: [] });++ await expect(runCreateTask({ due_on: value })).rejects.toThrow(/Due Date/);++ expect(postedTask(sendRequest)).toBeUndefined();+ });++ it('resolves tag names to their gids, ignoring case', async () => {+ const sendRequest = mockAsana({ tags: [{ gid: '555', name: 'Urgent' }] });++ await runCreateTask({ tags: ['urgent'] });++ expect(postedTask(sendRequest)).toEqual({ data: expect.objectContaining({ tags: ['555'] }) });+ });++ it('stops the step when a tag name does not exist', async () => {+ const sendRequest = mockAsana({ tags: [{ gid: '555', name: 'Urgent' }] });++ await expect(runCreateTask({ tags: ['Someday'] })).rejects.toThrow(/No tag named "Someday"/);++ expect(postedTask(sendRequest)).toBeUndefined();+ });+});diff --git a/packages/pieces/community/asana/src/lib/actions/create-task.ts b/packages/pieces/community/asana/src/lib/actions/create-task.tsindex 52767223ff5..8277454f03e 100644--- a/packages/pieces/community/asana/src/lib/actions/create-task.ts+++ b/packages/pieces/community/asana/src/lib/actions/create-task.ts@@ -1,4 +1,5 @@-import { asanaCommon, callAsanaApi, getTags } from '../common';+import { asanaCommon, callAsanaApi } from '../common';+import { asanaClient, asanaUtils } from '../common/client';import { getAccessTokenOrThrow, HttpMethod } from '@activepieces/pieces-common';import dayjs from 'dayjs';import { asanaAuth } from '../auth';@@ -14,24 +15,47 @@ export const asanaCreateTaskAction = createAction({aiMetadata: { description: 'Create a new task in an Asana project, setting its name, description (notes), optional due date, assignee, and tags. Use when an agent needs to add a work item to Asana. Requires a workspace and project; not idempotent — each call creates a separate task even with identical input.', idempotent: false },displayName: 'Create Task',outputSchema: asanaCreateTaskOutputSchema,+ propertyGroups: [+ {+ key: 'location',+ display: 'section',+ label: 'Where',+ icon: 'location',+ props: ['workspace', 'project'],+ },+ {+ key: 'task',+ display: 'section',+ label: 'Task',+ icon: 'text',+ props: ['name', 'notes'],+ },+ {+ key: 'details',+ display: 'section',+ label: 'Details',+ icon: 'sliders',+ props: ['assignee', 'due_on', 'tags'],+ },+ ],props: {workspace: asanaCommon.workspace,project: asanaCommon.project,name: Property.ShortText({- description: 'The name of the task to create',- displayName: 'Task Name',+ displayName: 'Name',+ placeholder: 'e.g. Review the Q4 budget',required: true,}),notes: Property.LongText({- description:- 'Free-form textual information associated with the task (i.e. its description).',- displayName: 'Task Description',- required: true,+ description: "Plain text shown in the task's description.",+ displayName: 'Description',+ required: false,}),- //Should be due_at in future minor version bumpdue_on: Property.ShortText({- description: 'The date on which this task is due in any format.',+ description:+ 'Day the task is due. For a due time too, use 2026-12-31T14:00:00Z.',displayName: 'Due Date',+ placeholder: 'e.g. 2026-12-31',required: false,}),tags: asanaCommon.tags,@@ -42,32 +66,20 @@ export const asanaCreateTaskAction = createAction({const { project, name, notes, tags, workspace, due_on, assignee } =configValue.propsValue;- const convertedDueAt = due_on ? dayjs(due_on).toISOString() : undefined;+ const dueFields = buildDueFields(due_on);- // User can provide tags name as dynamic value, we need to convert them to tags gids- const userTags = tags ?? [];- const convertedTags = await getTags(auth.access_token, workspace);- const tagsGids = userTags- .map((tag: string) => {- const foundTagById = convertedTags.find(- (convertedTag) => convertedTag.gid === tag- );- if (foundTagById) {- return foundTagById.gid;- }- const foundTag = convertedTags.find(- (convertedTag) =>- convertedTag.name?.toLowerCase() === tag.toLowerCase()- );- if (foundTag) {- return foundTag.gid;- }- return null;- })- .filter((tag) => tag !== null);+ const requestedTags = asanaUtils.toStringArray(tags);+ const tagsGids =+ requestedTags.length > 0+ ? await asanaClient.resolveTagGids({+ auth: { access_token: auth.access_token },+ workspace,+ tags: requestedTags,+ })+ : [];return (- await callAsanaApi(+ await callAsanaApi<{ data: Record<string, unknown> }>(HttpMethod.POST,`tasks`,getAccessTokenOrThrow(auth),@@ -77,7 +89,7 @@ export const asanaCreateTaskAction = createAction({projects: [project],notes,assignee,- due_at: convertedDueAt,+ ...dueFields,tags: tagsGids,},}@@ -85,3 +97,26 @@ export const asanaCreateTaskAction = createAction({).body['data'];},});++function buildDueFields(value: string | undefined): DueFields {+ const trimmed = (value ?? '').trim();+ if (trimmed === '') {+ return {};+ }+ if (/^\d{4}-\d{2}-\d{2}$/.test(trimmed)) {+ return {+ due_on: asanaUtils.assertDate({ value: trimmed, field: 'Due Date' }),+ };+ }+ if (dayjs(trimmed).isValid()) {+ return { due_at: dayjs(trimmed).toISOString() };+ }+ throw new Error(+ `Due Date "${trimmed}" is not a date. Use a date like 2026-12-31.`+ );+}++type DueFields = {+ due_on?: string;+ due_at?: string;+};diff --git a/packages/pieces/community/asana/src/lib/common/index.ts b/packages/pieces/community/asana/src/lib/common/index.tsindex 6ab3533948e..0e832084f3a 100644--- a/packages/pieces/community/asana/src/lib/common/index.ts+++ b/packages/pieces/community/asana/src/lib/common/index.ts@@ -1,6 +1,5 @@-import { Property, OAuth2PropertyValue } from '@activepieces/pieces-framework';+import { DropdownState, Property } from '@activepieces/pieces-framework';import {- getAccessTokenOrThrow,HttpMethod,HttpMessageBody,HttpResponse,@@ -8,208 +7,129 @@ import {AuthenticationType,} from '@activepieces/pieces-common';import { asanaAuth } from '../auth';+import { AsanaAuth, AsanaNamedRecord, AsanaPage, AsanaQuery, asanaClient } from './client';++const PAGE_SIZE = 100;+const MAX_PAGES = 20;+const NOT_CONNECTED_PLACEHOLDER = 'Please connect your account first';+const NO_WORKSPACE_PLACEHOLDER = 'Please select a workspace first';export const asanaCommon = {workspace: Property.Dropdown({auth: asanaAuth,- description: 'Asana workspace to create the task in',+ description: 'Workspace the task is created in.',displayName: 'Workspace',required: true,refreshers: [],options: async ({ auth }) => {if (!auth) {- return {- disabled: true,- placeholder: 'connect your account first',- options: [],- };+ return disabledState(NOT_CONNECTED_PLACEHOLDER);}- const accessToken = getAccessTokenOrThrow(auth as OAuth2PropertyValue);- const response = (- await callAsanaApi<{- data: {- gid: string;- name: string;- }[];- }>(HttpMethod.GET, 'workspaces', accessToken, undefined)- ).body;- return {- disabled: false,- options: response.data.map((workspace) => {- return {- label: workspace.name,- value: workspace.gid,- };- }),- };+ const connection: AsanaAuth = { access_token: auth.access_token };+ return loadOptions({+ load: () =>+ listAllPages<AsanaNamedRecord>({+ auth: connection,+ path: '/workspaces',+ operation: 'List Workspaces',+ }),+ toOption: toNamedOption,+ emptyPlaceholder: 'No workspaces found.',+ errorPlaceholder: 'Failed to load workspaces. Check your connection.',+ });},}),project: Property.Dropdown({auth: asanaAuth,- description: 'Asana Project to create the task in',+ description: 'Project the task is added to. Archived projects are not listed.',displayName: 'Project',required: true,refreshers: ['workspace'],options: async ({ auth, workspace }) => {if (!auth) {- return {- disabled: true,- placeholder: 'connect your account first',- options: [],- };+ return disabledState(NOT_CONNECTED_PLACEHOLDER);}if (!workspace) {- return {- disabled: true,- placeholder: 'Select workspace first',- options: [],- };+ return disabledState(NO_WORKSPACE_PLACEHOLDER);}- const accessToken = getAccessTokenOrThrow(auth as OAuth2PropertyValue);- const response = (- await callAsanaApi<{- data: {- gid: string;- name: string;- }[];- }>(- HttpMethod.GET,- 'projects?workspace=' + workspace,- accessToken,- undefined- )- ).body;- return {- disabled: false,- options: response.data.map((project) => {- return {- label: project.name,- value: project.gid,- };- }),- };+ const connection: AsanaAuth = { access_token: auth.access_token };+ return loadOptions({+ load: () =>+ listAllPages<AsanaNamedRecord>({+ auth: connection,+ path: '/projects',+ query: { workspace: String(workspace), archived: false, opt_fields: 'name' },+ operation: 'List Projects',+ }),+ toOption: toNamedOption,+ emptyPlaceholder: 'No projects found in this workspace.',+ errorPlaceholder: 'Failed to load projects. Check your connection.',+ });},}),- assignee: Property.Dropdown<string,false,typeof asanaAuth>({+ assignee: Property.Dropdown<string, false, typeof asanaAuth>({auth: asanaAuth,- description: 'Assignee for the task',+ description: 'Leave empty to keep the task unassigned.',displayName: 'Assignee',required: false,refreshers: ['workspace'],options: async ({ auth, workspace }) => {if (!auth) {- return {- disabled: true,- placeholder: 'connect your account first',- options: [],- };+ return disabledState(NOT_CONNECTED_PLACEHOLDER);}if (!workspace) {- return {- disabled: true,- placeholder: 'Select workspace first',- options: [],- };+ return disabledState(NO_WORKSPACE_PLACEHOLDER);}- const accessToken = getAccessTokenOrThrow(auth as OAuth2PropertyValue);- const users = await getUsers(accessToken, workspace as string);- return {- disabled: false,- options: users.map((user) => {- return {- label: user.name,- value: user.gid,- };- }),- };+ const connection: AsanaAuth = { access_token: auth.access_token };+ return loadOptions({+ load: () =>+ listAllPages<AsanaUserRecord>({+ auth: connection,+ path: '/users',+ query: { workspace: String(workspace), opt_fields: 'name,email' },+ operation: 'List Users',+ }),+ toOption: toUserOption,+ emptyPlaceholder: 'No users found in this workspace.',+ errorPlaceholder: 'Failed to load users. Check your connection.',+ });},}),- tags: Property.MultiSelectDropdown<string,false,typeof asanaAuth>({+ tags: Property.MultiSelectDropdown<string, false, typeof asanaAuth>({auth: asanaAuth,- description: 'Tags to add to the task',+ description: 'Pick tags, or type the names of existing tags.',displayName: 'Tags',required: false,refreshers: ['workspace'],options: async ({ auth, workspace }) => {if (!auth) {- return {- disabled: true,- placeholder: 'connect your account first',- options: [],- };+ return disabledState(NOT_CONNECTED_PLACEHOLDER);}if (!workspace) {- return {- disabled: true,- placeholder: 'Select workspace first',- options: [],- };+ return disabledState(NO_WORKSPACE_PLACEHOLDER);}- const accessToken = getAccessTokenOrThrow(auth as OAuth2PropertyValue);- const response = await getTags(accessToken, workspace as string);- return {- disabled: false,- options: response.map((project) => {- return {- label: project.name,- value: project.gid,- };- }),- };+ const connection: AsanaAuth = { access_token: auth.access_token };+ return loadOptions({+ load: () =>+ listAllPages<AsanaNamedRecord>({+ auth: connection,+ path: '/tags',+ query: { workspace: String(workspace), opt_fields: 'name' },+ operation: 'List Tags',+ }),+ toOption: toNamedOption,+ emptyPlaceholder: 'No tags found in this workspace.',+ errorPlaceholder: 'Failed to load tags. Check your connection.',+ });},}),};-export async function getUsers(- accessToken: string,- workspace: string-): Promise<- {- gid: string;- name: string;- }[]-> {- const response = (- await callAsanaApi<{- data: {- gid: string;- name: string;- }[];- }>(HttpMethod.GET, 'users?workspace=' + workspace, accessToken, undefined)- ).body;- return response.data;-}--export async function getTags(- accessToken: string,- workspace: string-): Promise<- {- gid: string;- name: string;- }[]-> {- const response = (- await callAsanaApi<{- data: {- gid: string;- name: string;- }[];- }>(- HttpMethod.GET,- 'workspaces/' + workspace + '/tags',- accessToken,- undefined- )- ).body;- return response.data;-}--export async function callAsanaApi<T extends HttpMessageBody = any>(+export async function callAsanaApi<T extends HttpMessageBody>(method: HttpMethod,apiUrl: string,accessToken: string,- body: any | undefined+ body: unknown): Promise<HttpResponse<T>> {return await httpClient.sendRequest<T>({method: method,@@ -221,3 +141,87 @@ export async function callAsanaApi<T extends HttpMessageBody = any>(body: body,});}++async function listAllPages<T>({+ auth,+ path,+ query,+ operation,+}: {+ auth: AsanaAuth;+ path: string;+ query?: AsanaQuery;+ operation: string;+}): Promise<T[]> {+ const records: T[] = [];+ let offset: string | null = null;+ for (let page = 0; page < MAX_PAGES; page++) {+ const result: AsanaPage<T> = await asanaClient.asanaListPage<T>({+ auth,+ path,+ query,+ limit: PAGE_SIZE,+ offset,+ operation,+ });+ records.push(...result.data);+ offset = result.next_offset;+ if (offset === null) {+ break;+ }+ }+ return records;+}++async function loadOptions<T>({+ load,+ toOption,+ emptyPlaceholder,+ errorPlaceholder,+}: {+ load: () => Promise<T[]>;+ toOption: (record: T) => { label: string; value: string };+ emptyPlaceholder: string;+ errorPlaceholder: string;+}): Promise<DropdownState<string>> {+ try {+ const records = await load();+ if (records.length === 0) {+ return { disabled: false, options: [], placeholder: emptyPlaceholder };+ }+ return {+ disabled: false,+ options: records.map(toOption),+ };+ } catch {+ return disabledState(errorPlaceholder);+ }+}++function disabledState(placeholder: string): DropdownState<string> {+ return {+ disabled: true,+ options: [],+ placeholder,+ };+}++function toNamedOption(record: AsanaNamedRecord): { label: string; value: string } {+ return {+ label: record.name ?? record.gid,+ value: record.gid,+ };+}++function toUserOption(user: AsanaUserRecord): { label: string; value: string } {+ const name = user.name ?? user.gid;+ const hasEmail = typeof user.email === 'string' && user.email.trim() !== '';+ return {+ label: hasEmail ? `${name} (${user.email})` : name,+ value: user.gid,+ };+}++type AsanaUserRecord = AsanaNamedRecord & {+ email?: string | null;+};