@pipedream/asana 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/add-task-to-section/add-task-to-section.mjs +1 -1
- package/actions/create-project/create-project.mjs +1 -1
- package/actions/create-subtask/create-subtask.mjs +1 -1
- package/actions/create-task/create-task.mjs +1 -1
- package/actions/create-task-comment/create-task-comment.mjs +1 -1
- package/actions/create-task-from-template/create-task-from-template.mjs +1 -1
- package/actions/delete-task/delete-task.mjs +1 -1
- package/actions/find-task-by-id/find-task-by-id.mjs +1 -1
- package/actions/get-portfolio/get-portfolio.mjs +1 -1
- package/actions/get-tasks-from-task-list/get-tasks-from-task-list.mjs +1 -1
- package/actions/list-organizations-options/list-organizations-options.mjs +1 -1
- package/actions/list-portfolio-items/list-portfolio-items.mjs +1 -1
- package/actions/list-portfolios/list-portfolios.mjs +1 -1
- package/actions/list-tags/list-tags.mjs +1 -1
- package/actions/list-task-stories/list-task-stories.mjs +1 -1
- package/actions/list-task-templates/list-task-templates.mjs +1 -1
- package/actions/list-teams/list-teams.mjs +1 -1
- package/actions/list-users/list-users.mjs +1 -1
- package/actions/list-workspaces/list-workspaces.mjs +1 -1
- package/actions/search-projects/search-projects.mjs +64 -4
- package/actions/search-sections/search-sections.mjs +1 -1
- package/actions/search-tasks/search-tasks.mjs +1 -1
- package/actions/search-tasks-premium/search-tasks-premium.mjs +1 -1
- package/actions/search-user-projects/search-user-projects.mjs +1 -1
- package/actions/update-task/update-task.mjs +1 -1
- package/asana.app.mjs +44 -2
- package/package.json +1 -1
- package/sources/new-completed-task/new-completed-task.mjs +1 -1
- package/sources/new-project/new-project.mjs +1 -1
- package/sources/new-story/new-story.mjs +1 -1
- package/sources/new-subtask/new-subtask.mjs +1 -1
- package/sources/new-tag/new-tag.mjs +1 -1
- package/sources/new-task/new-task.mjs +1 -1
- package/sources/new-team/new-team.mjs +1 -1
- package/sources/new-user/new-user.mjs +1 -1
- package/sources/new-workspace/new-workspace.mjs +1 -1
- package/sources/tag-added-to-task/tag-added-to-task.mjs +1 -1
- package/sources/tags-added-to-any-task/tags-added-to-any-task.mjs +1 -1
- package/sources/task-assigned-in-project/task-assigned-in-project.mjs +1 -1
- package/sources/task-field-updated-in-project/task-field-updated-in-project.mjs +1 -1
- package/sources/task-updated-in-project/task-updated-in-project.mjs +1 -1
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Add Task To Section",
|
|
6
6
|
description: "Moves a task into a specific section within an Asana project, removing it from any other section it currently occupies in that project. Use **Search Sections** to find the section GID and **Search Tasks** to find the task GID. Returns an empty object `{}` on success. Example: call with `project: '1204567890123456'`, `task: '1202345678901234'`, `section_gid: '1203456789012345'` → task is moved into that section and returns `{}`. [See the documentation](https://developers.asana.com/docs/add-task-to-section)",
|
|
7
7
|
key: "asana-add-task-to-section",
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.1",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "asana-create-project",
|
|
6
6
|
name: "Create Project",
|
|
7
7
|
description: "Creates a new project in an Asana workspace or team. Use this to set up a new initiative, sprint, or work stream. For organization workspaces you must supply a `team` GID (use **List Teams** to find it). Returns the new project record including its `gid`. Example: call with `projectName: 'Q4 Marketing Campaign'`, `workspace: '1200123456789012'`, `team: '1203456789012345'`, `defaultView: 'board'` → returns `{gid: '1204567890123456', name: 'Q4 Marketing Campaign'}`. [See the documentation](https://developers.asana.com/docs/create-a-project)",
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.1",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "asana-create-subtask",
|
|
6
6
|
name: "Create Subtask",
|
|
7
7
|
description: "Creates a new subtask nested under an existing parent task. Use this when the work is a sub-item of another task; for top-level tasks use **Create Task**. The parent task GID is required. Returns the new subtask record including its `gid`. Example: call with `task_gid: '1202345678901234'`, `subtaskName: 'Write first draft'`, `due_on: '2026-10-05'` → returns `{gid: '1207890123456789', name: 'Write first draft', resource_type: 'task'}`. [See the documentation](https://developers.asana.com/docs/create-a-subtask)",
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.1",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "asana-create-task",
|
|
6
6
|
name: "Create Task",
|
|
7
7
|
description: "Creates a new task in Asana. Use this to add a standalone task to a workspace or project. For subtasks, use **Create Subtask** instead; for template-based tasks, use **Create Task from Template**. Returns the new task record including its `gid`. Example: call with `taskName: 'Review Q3 report'`, `workspace: '1200123456789012'`, `due_on: '2026-10-01'` → returns `{gid: '1202345678901234', name: 'Review Q3 report', resource_type: 'task'}`. [See the documentation](https://developers.asana.com/docs/create-a-task)",
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.1",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "asana-create-task-comment",
|
|
6
6
|
name: "Create Task Comment",
|
|
7
7
|
description: "Adds a comment (story) to an existing Asana task. Use this to post a text update or pinned note visible to task followers. Provide either `text` (plain text) or `html_text` (HTML-formatted), but not both. Returns the new story record including its `gid` and `type`. Example: call with `task_gid: '1202345678901234'`, `text: 'Approved — ready to ship!'` → returns `{gid: '1209012345678901', type: 'comment', text: 'Approved — ready to ship!'}`. [See the documentation](https://developers.asana.com/docs/create-a-story-on-a-task)",
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.1",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
name: "Create Task from Template",
|
|
5
5
|
key: "asana-create-task-from-template",
|
|
6
6
|
description: "Creates a new Asana task by instantiating an existing task template. Use this when a team has a reusable task structure (e.g. a bug-report or onboarding template); for ad-hoc tasks use **Create Task**. Use **List Task Templates** to find the template GID. This kicks off an asynchronous job — the response is a job resource, not the finished task; `new_task.gid` is available immediately but the task's fields may still be populating, so use **Find Task by ID** if you need to confirm it's ready. The new task's project and memberships are determined by the template itself, not by any project passed here. Example: call with `taskTemplateId: '1205678901234567'`, `name: 'Bug: Login page crash'` → returns `{gid: '1205555555555555', resource_type: 'job', new_task: {gid: '1206789012345678'}}`. [See the documentation](https://developers.asana.com/reference/instantiatetask)",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.1",
|
|
8
8
|
ai: "optimized",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "asana-delete-task",
|
|
6
6
|
name: "Delete Task",
|
|
7
7
|
description: "Deletes an Asana task. This moves the task to the deleting user's trash and removes it from active views immediately; it can be recovered for 30 days before Asana permanently removes it. Use **Find Task by ID** to confirm the task GID before deleting. Returns an empty data object `{}` on success. Example: call with `task_gid: '1202345678901234'` → returns `{}`. [See the documentation](https://developers.asana.com/docs/delete-a-task)",
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.1",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "asana-find-task-by-id",
|
|
6
6
|
name: "Find Task by ID",
|
|
7
7
|
description: "Retrieves the complete record for a single Asana task by its GID. Use this to fetch full task details (description, assignee, due date, custom fields) after obtaining a task GID from **Search Tasks**. Use `optFields` to request additional fields not returned by default. Example: call with `task_gid: '1202345678901234'`, `optFields: ['due_on','assignee','custom_fields']` → returns the full task record for that GID. [See the documentation](https://developers.asana.com/docs/get-a-task)",
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.1",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-get-portfolio",
|
|
5
5
|
name: "Get Portfolio",
|
|
6
6
|
description: "Returns the complete portfolio record for a single portfolio. Use this after **List Portfolios** to retrieve full portfolio details including custom fields, members, and owner; the `optFields` prop requests specific properties (e.g. `custom_field_settings`, `members`, `start_on`, `due_on`). Example: call with `portfolioId: '1208901234567890'`, `optFields: ['members','owner','due_on']` → returns `{gid: '1208901234567890', name: 'Product Launch', owner: {...}, members: [...]}`. [See the documentation](https://developers.asana.com/reference/getportfolio)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.4",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-get-tasks-from-task-list",
|
|
5
5
|
name: "Get Tasks From Task List",
|
|
6
6
|
description: "Returns tasks from the authenticated user's personal **My Tasks** inbox — NOT a project task list. Use this when the user asks for 'my tasks', 'my task list', or 'My Tasks'. Only a workspace GID is needed; no project GID required. Example: call with `workspace: '1200123456789012'` → returns all tasks in the authenticated user's My Tasks list, e.g. `[{gid: '1202345678901234', name: 'Review Q3 report'}]`. [See the documentation](https://developers.asana.com/reference/gettasksforusertasklist)",
|
|
7
|
-
version: "1.1.
|
|
7
|
+
version: "1.1.3",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-list-organizations-options",
|
|
5
5
|
name: "List Organizations Options",
|
|
6
6
|
description: "Returns all Asana workspaces for the authenticated account that are organizations (i.e. `is_organization: true`). Use this to obtain organization GIDs for org-scoped actions. Prefer **List Workspaces** when you need all workspaces including non-organization ones. Returns an array of `{label, value}` pairs where `value` is the organization GID. Example: returns `[{label: 'Acme Corp', value: '1200123456789012'}]`. [See the documentation](https://developers.asana.com/reference/getworkspaces)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.5",
|
|
8
8
|
type: "action",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "asana-list-portfolio-items",
|
|
6
6
|
name: "List Portfolio Items",
|
|
7
7
|
description: "Returns a list of the projects in an Asana portfolio. Use this after **List Portfolios** to enumerate projects within a portfolio and answer count, timing, and spend questions; the default Opt Fields include `created_at`, `start_on`, `due_on`, and `custom_fields`. Archived filtering happens client-side. Example: call with `portfolioId: '1208901234567890'`, `excludeArchived: true` → returns active projects like `[{gid: '1204567890123456', name: 'Website Redesign', start_on: '2026-01-01', due_on: '2026-06-30'}]`. [See the documentation](https://developers.asana.com/reference/getitemsforportfolio)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-list-portfolios",
|
|
5
5
|
name: "List Portfolios",
|
|
6
6
|
description: "Returns a list of portfolios in an Asana workspace owned by the given user. Use this to discover portfolio GIDs before calling **Get Portfolio** or **List Portfolio Items**. Owner defaults to the authenticated user; regular API users can only list portfolios they own. Example: call with `workspace: '1200123456789012'` → returns `[{gid: '1208901234567890', name: 'Product Launch'}, ...]`. [See the documentation](https://developers.asana.com/reference/getportfolios)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.4",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-list-tags",
|
|
5
5
|
name: "List Tags",
|
|
6
6
|
description: "Returns tags in an Asana workspace, up to 100 by default (increase `maxResults` for more) — not guaranteed to include every tag in a large workspace. Use this to discover tag GIDs before applying tags to tasks with **Create Task** or **Create Subtask** (the `tags` prop). Example: call with `workspace: '1200123456789012'` → returns tags like `[{gid: '1202345678901234', name: 'urgent'}]`. [See the documentation](https://developers.asana.com/reference/gettags)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-list-task-stories",
|
|
5
5
|
name: "List Task Stories",
|
|
6
6
|
description: "Returns all stories (comments, activity log entries, system messages) for an Asana task. Use this to retrieve the comment history and audit trail for a task. Set `commentsOnly: true` to filter to only comment stories. Returns an array of story records each with `gid`, `type`, `text`, and `created_at`. Example: call with `project: '1204567890123456'`, `taskId: '1202345678901234'` → returns stories including `{gid: '1209012345678901', type: 'comment', text: 'Approved!', created_at: '2026-09-01T10:00:00Z'}`. [See the documentation](https://developers.asana.com/reference/getstoriesfortask)",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.1",
|
|
8
8
|
ai: "optimized",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-list-task-templates",
|
|
5
5
|
name: "List Task Templates",
|
|
6
6
|
description: "Returns task templates in an Asana project, up to 100 by default (increase `maxResults` for more) — not guaranteed to include every template in a project with many. Use this to discover task template GIDs before calling **Create Task from Template** (the `taskTemplate` prop). Example: call with `project: '1204567890123456'` → returns templates like `[{gid: '1205678901234567', name: 'Bug Report Template'}]`. [See the documentation](https://developers.asana.com/reference/gettasktemplates)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-list-teams",
|
|
5
5
|
name: "List Teams",
|
|
6
6
|
description: "Retrieves all teams in a specified Asana workspace. Use this action to discover available team GIDs for creating projects or organizing work by department. Requires a workspace GID from **List Workspaces**. Results are paginated (default 25 per page); pass the returned `next_offset` as `offset` to fetch additional pages. Consider following up with **Create Project** to create a project under a team. Example: call with `workspace: '1200123456789012'` → returns `{data: [{gid: '1203456789012345', name: 'Design'}, ...], next_offset: null}`. [See the documentation](https://developers.asana.com/reference/getteamsforworkspace)",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.4",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-list-users",
|
|
5
5
|
name: "List Users",
|
|
6
6
|
description: "Retrieves all users in a specified Asana workspace. Use this to get user GIDs for assignee or owner fields in **Create Task** or **Update Task**. Requires a workspace GID from **List Workspaces**. Results are paginated; pass the returned `next_offset` as `offset` to fetch additional pages. Example: call with `workspace: '1200123456789012'`, `optFields: ['name','email']` → returns `{data: [{gid: '1198765432109876', name: 'Jane Doe', email: 'jane@acme.com'}, ...]}`. [See the documentation](https://developers.asana.com/reference/getusersforworkspace)",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.4",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-list-workspaces",
|
|
5
5
|
name: "List Workspaces",
|
|
6
6
|
description: "Lists all Asana workspaces available to the authenticated account. Use this to get workspace GIDs required by **List Teams**, **List Users**, **Search Tasks**, **Create Task**, and other workspace-scoped actions. Pass a returned `next_offset` as `offset` to fetch additional pages. Example: call with no params → returns `{data: [{gid: '1200123456789012', name: 'Acme Corp'}, ...]}` (pass `optFields: ['is_organization']` to also get whether each workspace is an organization). [See the documentation](https://developers.asana.com/reference/getworkspaces)",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.4",
|
|
8
8
|
type: "action",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
@@ -3,7 +3,7 @@ import asana from "../../asana.app.mjs";
|
|
|
3
3
|
export default {
|
|
4
4
|
type: "action",
|
|
5
5
|
key: "asana-search-projects",
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "1.0.0",
|
|
7
7
|
ai: "optimized",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
asana,
|
|
17
17
|
name: {
|
|
18
18
|
label: "Name",
|
|
19
|
-
description: "The name to
|
|
19
|
+
description: "The name to search for, e.g. `Website Redesign`. Case-insensitive; matches the start of words in the project name (`web` finds `Website Redesign`), not text from the middle of a word (`site` won't). If nothing is found, retry with a different word from the name. Returns up to 100 matches per workspace. Omit to list all projects.",
|
|
20
20
|
type: "string",
|
|
21
21
|
optional: true,
|
|
22
22
|
},
|
|
@@ -59,9 +59,14 @@ export default {
|
|
|
59
59
|
]
|
|
60
60
|
: [];
|
|
61
61
|
if (this.name && optFields.length && !optFields.includes("name")) {
|
|
62
|
-
// the name
|
|
62
|
+
// keep the name in the response so results stay recognizable
|
|
63
63
|
optFields.push("name");
|
|
64
64
|
}
|
|
65
|
+
if (this.name && this.archived !== undefined && optFields.length
|
|
66
|
+
&& !optFields.includes("archived")) {
|
|
67
|
+
// typeahead has no archived filter, so it's applied below from this field
|
|
68
|
+
optFields.push("archived");
|
|
69
|
+
}
|
|
65
70
|
|
|
66
71
|
// Asana's GET /projects now rejects requests with no workspace/team scope
|
|
67
72
|
// (the "cross_workspace_deprecation" change), so a workspace-less search
|
|
@@ -98,6 +103,62 @@ export default {
|
|
|
98
103
|
break;
|
|
99
104
|
}
|
|
100
105
|
|
|
106
|
+
if (this.name) {
|
|
107
|
+
// One typeahead request per workspace instead of paging every project.
|
|
108
|
+
// Typeahead is case-insensitive and matches word prefixes.
|
|
109
|
+
const typeaheadFields = new Set(optFields);
|
|
110
|
+
if (optFields.length === 0 && this.archived !== undefined) {
|
|
111
|
+
typeaheadFields.add("name");
|
|
112
|
+
typeaheadFields.add("archived");
|
|
113
|
+
}
|
|
114
|
+
const { data } = await this.asana.getTypeahead({
|
|
115
|
+
workspaceId: workspace,
|
|
116
|
+
params: {
|
|
117
|
+
resource_type: "project",
|
|
118
|
+
query: this.name,
|
|
119
|
+
count: 100,
|
|
120
|
+
opt_fields: typeaheadFields.size
|
|
121
|
+
? [
|
|
122
|
+
...typeaheadFields,
|
|
123
|
+
].join(",")
|
|
124
|
+
: undefined,
|
|
125
|
+
},
|
|
126
|
+
$,
|
|
127
|
+
});
|
|
128
|
+
for (let project of data ?? []) {
|
|
129
|
+
if (this.archived !== undefined) {
|
|
130
|
+
if (project.archived === undefined) {
|
|
131
|
+
// Typeahead is documented to return only `name`. It currently includes
|
|
132
|
+
// the requested fields, but if a hit comes back without `archived`,
|
|
133
|
+
// fetch that one project instead of silently dropping it.
|
|
134
|
+
const { data: full } = await this.asana.getProject({
|
|
135
|
+
projectId: project.gid,
|
|
136
|
+
params: {
|
|
137
|
+
opt_fields: [
|
|
138
|
+
...typeaheadFields,
|
|
139
|
+
].join(","),
|
|
140
|
+
},
|
|
141
|
+
$,
|
|
142
|
+
});
|
|
143
|
+
project = {
|
|
144
|
+
...project,
|
|
145
|
+
...full,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
if (project.archived !== this.archived) continue;
|
|
149
|
+
}
|
|
150
|
+
results.push({
|
|
151
|
+
...project,
|
|
152
|
+
workspace: project.workspace ?? {
|
|
153
|
+
gid: workspace,
|
|
154
|
+
resource_type: "workspace",
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
if (++count >= this.maxResults) break;
|
|
158
|
+
}
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
|
|
101
162
|
let hasMore;
|
|
102
163
|
const params = {
|
|
103
164
|
workspace,
|
|
@@ -122,7 +183,6 @@ export default {
|
|
|
122
183
|
if (!data?.length) break;
|
|
123
184
|
|
|
124
185
|
for (const project of data) {
|
|
125
|
-
if (this.name && !project.name?.includes(this.name)) continue;
|
|
126
186
|
// The workspace fan-out above already knows which workspace this project
|
|
127
187
|
// came from — attach it so callers chaining into another action (e.g.
|
|
128
188
|
// Create Task) don't have to guess or re-query for it.
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-search-sections",
|
|
5
5
|
name: "Search Sections",
|
|
6
6
|
description: "Searches for sections by name within an Asana project. Use this to find section GIDs before calling **Add Task to Section** or when filtering tasks by section. The `sectionName` filter is a client-side substring match. Returns section records with `gid` and `name`. Example: call with `project: '1204567890123456'`, `sectionName: 'In Progress'` → returns `[{gid: '1203456789012345', name: 'In Progress'}]`. [See the documentation](https://developers.asana.com/docs/get-sections-in-a-project)",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.1",
|
|
8
8
|
ai: "optimized",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "asana-search-tasks",
|
|
7
7
|
name: "Search Tasks",
|
|
8
8
|
description: "Searches for Asana tasks by name within a project, section, or by assignee. Must specify exactly one of: `project`, `section`, or `assignee` (project + section together is also valid). The `name` filter is a client-side substring match applied after fetching. For cross-project full-text search, use **Search Tasks Premium** instead. Returns task records with `gid` and `name` (plus any requested `optFields`). Example: call with `workspace: '1200123456789012'`, `project: '1204567890123456'`, `name: 'Q3'` → returns tasks in that project whose names contain 'Q3'. [See the documentation](https://developers.asana.com/docs/get-multiple-tasks)",
|
|
9
|
-
version: "0.5.
|
|
9
|
+
version: "0.5.2",
|
|
10
10
|
ai: "optimized",
|
|
11
11
|
annotations: {
|
|
12
12
|
destructiveHint: false,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "asana-search-tasks-premium",
|
|
6
6
|
name: "Search Tasks Premium",
|
|
7
7
|
description: "Searches for tasks across an Asana workspace by name, assignee, section, project, completed since, and/or modified since. Requires a Premium Asana account. Use this over **Search Tasks** when you need cross-project full-text search or date-range filters not available on the basic endpoint. Results are capped at 100 by the Asana search API — pagination is not supported on this endpoint; narrow your filters (name, assignee, modified_since) if you expect more than 100 matches. Example: call with `workspace: '1200123456789012'`, `name: 'Q3'`, `assignee: '1198765432109876'` → returns up to 100 tasks whose text contains 'Q3' assigned to that user. [See the documentation](https://developers.asana.com/reference/searchtasksforworkspace)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.7",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "asana-search-user-projects",
|
|
5
5
|
name: "Get list of user projects",
|
|
6
6
|
description: "Returns all projects in an Asana workspace where the specified user is a member. Omit `user` (or pass `\"me\"`) for the authenticated user's own projects — don't guess a GID from **List Users** when the request is about \"my\" projects. Results are workspace-wide and not scoped to any portfolio; archived projects may be included. If you need portfolio-scoped results, use **List Portfolios** and **List Portfolio Items** instead. Example: call with `workspace: '1200123456789012'` (no `user`) → returns `[{gid: '1204567890123456', name: 'Website Redesign'}, ...]` for projects the authenticated user is a member of. [See the documentation](https://developers.asana.com/docs/get-multiple-projects)",
|
|
7
|
-
version: "0.7.
|
|
7
|
+
version: "0.7.1",
|
|
8
8
|
ai: "optimized",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "asana-update-task",
|
|
6
6
|
name: "Update Task",
|
|
7
7
|
description: "Updates one or more fields on an existing Asana task (name, assignee, due date, completion status, notes, custom fields, etc.). All fields are optional — supply only the ones you want to change; unchanged fields retain their current values. Use **Find Task by ID** or **Search Tasks** to obtain the task GID first. Returns the updated task record. Example: call with `task_gid: '1202345678901234'`, `completed: true` → marks the task complete and returns the updated record. [See the documentation](https://developers.asana.com/docs/update-a-task)",
|
|
8
|
-
version: "0.4.
|
|
8
|
+
version: "0.4.10",
|
|
9
9
|
ai: "optimized",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
package/asana.app.mjs
CHANGED
|
@@ -4,6 +4,9 @@ import { axios } from "@pipedream/platform";
|
|
|
4
4
|
// auto-populating dropdowns via async `options()`. Their propDefinitions are
|
|
5
5
|
// suffixed `Async` and kept separate from the static, MCP-safe ones actions use.
|
|
6
6
|
const DEFAULT_LIMIT = 25;
|
|
7
|
+
// Longest `Retry-After` (seconds) we'll wait out before retrying a 429. Three
|
|
8
|
+
// waits of this length stay well inside the 60s tool timeout.
|
|
9
|
+
const MAX_RETRY_AFTER_SECONDS = 10;
|
|
7
10
|
|
|
8
11
|
export default {
|
|
9
12
|
type: "app",
|
|
@@ -312,7 +315,7 @@ export default {
|
|
|
312
315
|
*
|
|
313
316
|
* @returns {string} The request result data.
|
|
314
317
|
*/
|
|
315
|
-
_makeRequest({
|
|
318
|
+
async _makeRequest({
|
|
316
319
|
path, $ = this, ...opts
|
|
317
320
|
}) {
|
|
318
321
|
const config = {
|
|
@@ -320,7 +323,30 @@ export default {
|
|
|
320
323
|
headers: this._headers(),
|
|
321
324
|
...opts,
|
|
322
325
|
};
|
|
323
|
-
|
|
326
|
+
// Asana rate-limits per user and answers 429 with a `Retry-After` (seconds).
|
|
327
|
+
// Wait exactly that long and retry a few times instead of failing the whole
|
|
328
|
+
// action. Never retry before it elapses: that fails again and can use up more
|
|
329
|
+
// quota. If it's longer than we can wait within the tool timeout, surface the
|
|
330
|
+
// 429 right away rather than retrying early.
|
|
331
|
+
const maxRetries = 3;
|
|
332
|
+
for (let attempt = 0; ; attempt++) {
|
|
333
|
+
try {
|
|
334
|
+
return await axios($, config);
|
|
335
|
+
} catch (err) {
|
|
336
|
+
if (err?.response?.status !== 429 || attempt >= maxRetries) {
|
|
337
|
+
throw err;
|
|
338
|
+
}
|
|
339
|
+
const retryAfter = Number(err.response.headers?.["retry-after"]);
|
|
340
|
+
const hasRetryAfter = Number.isFinite(retryAfter) && retryAfter >= 0;
|
|
341
|
+
if (hasRetryAfter && retryAfter > MAX_RETRY_AFTER_SECONDS) {
|
|
342
|
+
throw err;
|
|
343
|
+
}
|
|
344
|
+
const delayMs = hasRetryAfter
|
|
345
|
+
? retryAfter * 1000
|
|
346
|
+
: (2 ** attempt) * 1000 + Math.floor(Math.random() * 500);
|
|
347
|
+
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
348
|
+
}
|
|
349
|
+
}
|
|
324
350
|
},
|
|
325
351
|
/**
|
|
326
352
|
* Create a webhook
|
|
@@ -422,6 +448,22 @@ export default {
|
|
|
422
448
|
...opts,
|
|
423
449
|
});
|
|
424
450
|
},
|
|
451
|
+
/**
|
|
452
|
+
* Search a workspace with Asana's typeahead (one request, not paginated).
|
|
453
|
+
* Matches the start of words, case-insensitively, and returns the top results.
|
|
454
|
+
*
|
|
455
|
+
* @param {string} workspaceId - The workspace GID.
|
|
456
|
+
*
|
|
457
|
+
* @returns {object} Typeahead results in `data`.
|
|
458
|
+
*/
|
|
459
|
+
getTypeahead({
|
|
460
|
+
workspaceId, ...opts
|
|
461
|
+
}) {
|
|
462
|
+
return this._makeRequest({
|
|
463
|
+
path: `workspaces/${workspaceId}/typeahead`,
|
|
464
|
+
...opts,
|
|
465
|
+
});
|
|
466
|
+
},
|
|
425
467
|
/**
|
|
426
468
|
* Get an Asana Portfolio.
|
|
427
469
|
*
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "asana-new-project",
|
|
7
7
|
name: "New Project Added To Workspace (Instant)",
|
|
8
8
|
description: "Emit new event for each new project added to a workspace.",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.16",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
props: {
|
|
12
12
|
...common.props,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
type: "source",
|
|
8
8
|
name: "New Task (Instant)",
|
|
9
9
|
description: "Emit new event for each task added to a project. [See docs here](https://developers.asana.com/docs/establish-a-webhook)",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.16",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
props: {
|
|
13
13
|
...common.props,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
type: "source",
|
|
8
8
|
name: "New Tags added to any task (Instant)",
|
|
9
9
|
description: "Emit new event each time a tag is added to any task, optionally filtering by a given set of tags.",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.15",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
props: {
|
|
13
13
|
...common.props,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
type: "source",
|
|
8
8
|
name: "New Task Assigned in Project (Instant)",
|
|
9
9
|
description: "Emit new event each time a task is assigned, reassigned or unassigned.",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.9",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
props: {
|
|
13
13
|
...common.props,
|