ByteChef LogoByteChef

Asana

Asana is a web and mobile application designed to help teams organize, track, and manage their work tasks and projects efficiently.

Categories: Project Management

Type: asana/v1


Connections

Version: 1

OAuth2 Authorization Code

Properties

NameLabelTypeDescriptionRequired
clientIdClient IdSTRINGtrue
clientSecretClient SecretSTRINGtrue

Connection Setup

Create Asana App

  1. Navigate to Asana Developer dashboard.
  2. Click on Create new app.
  3. Enter app name.
  4. Check everything.
  5. Agree to the Terms.
  6. Click on Create app.
  7. Here you can see your Client ID and Client secret.
  8. Click on OAuth.
  9. Click on Add redirect URL.
  10. Add redirect URL depending on your instance:
    • https://app.bytechef.io/callback (Cloud)
    • http://localhost:5173/callback (Local dev)
  11. Click on Add.
  12. Add following scopes:
    • custom_fields:write
    • projects:read
    • projects:write
    • tags:read
    • tasks:read
    • tasks:write
    • teams:read
    • users:read
    • webhooks:read
    • webhooks:write
    • webhooks:delete
    • workspaces:read
  13. Done 🚀.

Actions

Create Custom Field

Name: createCustomField

Creates a custom field for a task.

Properties

NameLabelTypeDescriptionRequired
dataDataOBJECT
Properties {STRING(workspace), STRING(name), STRING(description), STRING(resource_subtype), STRING(text_value), [{STRING(name), BOOLEAN(enabled), STRING(color)}](enum_options), NUMBER(number_value), INTEGER(precision), {DATE(date), DATE_TIME(date_time)}(date_value), [STRING](people_value), [STRING](reference_value), STRING(format), STRING(currency_code)}
false

Example JSON Structure

{
  "label" : "Create Custom Field",
  "name" : "createCustomField",
  "parameters" : {
    "data" : {
      "workspace" : "",
      "name" : "",
      "description" : "",
      "resource_subtype" : "",
      "text_value" : "",
      "enum_options" : [ {
        "name" : "",
        "enabled" : false,
        "color" : ""
      } ],
      "number_value" : 0.0,
      "precision" : 1,
      "date_value" : {
        "date" : "2021-01-01",
        "date_time" : "2021-01-01T00:00:00"
      },
      "people_value" : [ "" ],
      "reference_value" : [ "" ],
      "format" : "",
      "currency_code" : ""
    }
  },
  "type" : "asana/v1/createCustomField"
}

Output

Type: OBJECT

Properties

NameTypeDescription
dataOBJECT
Properties {STRING(gid), STRING(resource_type), STRING(name), STRING(type), [{STRING(gid), STRING(resource_type), STRING(name), BOOLEAN(enabled), STRING(color)}](enum_options), STRING(input_restrictions), {DATE(date), DATE_TIME(date_time)}(date_value), {STRING(gid), STRING(resource_type), STRING(name), BOOLEAN(enabled), STRING(color)}(enum_value), [{STRING(gid), STRING(resource_type), STRING(name), BOOLEAN(enabled), STRING(color)}](multi_enum_values), NUMBER(number_value), STRING(text_value), INTEGER(precision), STRING(format), STRING(currency_code), [{STRING(gid), STRING(resource_type), STRING(name)}](people_value), [{STRING(gid), STRING(resource_type), STRING(name)}](reference_value), STRING(resource_subtype)}

Output Example

{
  "data" : {
    "gid" : "",
    "resource_type" : "",
    "name" : "",
    "type" : "",
    "enum_options" : [ {
      "gid" : "",
      "resource_type" : "",
      "name" : "",
      "enabled" : false,
      "color" : ""
    } ],
    "input_restrictions" : "",
    "date_value" : {
      "date" : "2021-01-01",
      "date_time" : "2021-01-01T00:00:00"
    },
    "enum_value" : {
      "gid" : "",
      "resource_type" : "",
      "name" : "",
      "enabled" : false,
      "color" : ""
    },
    "multi_enum_values" : [ {
      "gid" : "",
      "resource_type" : "",
      "name" : "",
      "enabled" : false,
      "color" : ""
    } ],
    "number_value" : 0.0,
    "text_value" : "",
    "precision" : 1,
    "format" : "",
    "currency_code" : "",
    "people_value" : [ {
      "gid" : "",
      "resource_type" : "",
      "name" : ""
    } ],
    "reference_value" : [ {
      "gid" : "",
      "resource_type" : "",
      "name" : ""
    } ],
    "resource_subtype" : ""
  }
}

Find Workspace GID

To find workspace GID, click here.

Create Project

Name: createProject

Creates a new project in a workspace or team.

Properties

NameLabelTypeDescriptionRequired
dataDataOBJECT
Properties {STRING(workspace), STRING(name), STRING(notes), STRING(team)}
false

Example JSON Structure

{
  "label" : "Create Project",
  "name" : "createProject",
  "parameters" : {
    "data" : {
      "workspace" : "",
      "name" : "",
      "notes" : "",
      "team" : ""
    }
  },
  "type" : "asana/v1/createProject"
}

Output

Type: OBJECT

Properties

NameTypeDescription
dataOBJECT
Properties {STRING(gid), STRING(resource_type), BOOLEAN(archived), STRING(color), STRING(icon), DATE_TIME(created_at), {STRING(gid), STRING(resource_type), STRING(title), STRING(resource_subtype)}(current_status_update), STRING(default_view), STRING(due_on), STRING(html_notes), STRING(name), STRING(notes), {STRING(gid), STRING(name)}(team), {STRING(gid), STRING(name)}(workspace)}

Output Example

{
  "data" : {
    "gid" : "",
    "resource_type" : "",
    "archived" : false,
    "color" : "",
    "icon" : "",
    "created_at" : "2021-01-01T00:00:00",
    "current_status_update" : {
      "gid" : "",
      "resource_type" : "",
      "title" : "",
      "resource_subtype" : ""
    },
    "default_view" : "",
    "due_on" : "",
    "html_notes" : "",
    "name" : "",
    "notes" : "",
    "team" : {
      "gid" : "",
      "name" : ""
    },
    "workspace" : {
      "gid" : "",
      "name" : ""
    }
  }
}

Find Workspace GID

To find workspace GID, click here.

Find Team ID

To find team GID, click here.

Create Subtask

Name: createSubtask

Creates a new subtask and adds it to the parent task.

Properties

NameLabelTypeDescriptionRequired
taskGidParent Task GIDSTRING
Depends On data.workspace
The task GID of the task that will be the parent of the subtask.true
dataDataOBJECT
Properties {STRING(workspace), [STRING](projects), STRING(name), STRING(notes), DATE(due_on), STRING(assignee)}
false

Example JSON Structure

{
  "label" : "Create Subtask",
  "name" : "createSubtask",
  "parameters" : {
    "taskGid" : "",
    "data" : {
      "workspace" : "",
      "projects" : [ "" ],
      "name" : "",
      "notes" : "",
      "due_on" : "2021-01-01",
      "assignee" : ""
    }
  },
  "type" : "asana/v1/createSubtask"
}

Output

Type: OBJECT

Properties

NameTypeDescription
dataOBJECT
Properties {STRING(gid), DATE(due_on), STRING(notes), STRING(name), {STRING(gid), STRING(name)}(workspace), {STRING(gid), STRING(name)}(project), {STRING(gid), STRING(name)}(parent), {STRING(gid), STRING(name)}(assignee)}

Output Example

{
  "data" : {
    "gid" : "",
    "due_on" : "2021-01-01",
    "notes" : "",
    "name" : "",
    "workspace" : {
      "gid" : "",
      "name" : ""
    },
    "project" : {
      "gid" : "",
      "name" : ""
    },
    "parent" : {
      "gid" : "",
      "name" : ""
    },
    "assignee" : {
      "gid" : "",
      "name" : ""
    }
  }
}

Find Parent Task GID

To find parent task GID, click here.

Find Workspace GID

To find workspace GID, click here.

Find Project GID

To find project GID, click here.

Find Assignee User GID

To find the user ID of the assignee, click here.

Create Task

Name: createTask

Creates a new task in a workspace.

Properties

NameLabelTypeDescriptionRequired
dataDataOBJECT
Properties {STRING(workspace), [STRING](projects), STRING(name), STRING(notes), DATE(due_on), [STRING](tags), STRING(assignee)}
false

Example JSON Structure

{
  "label" : "Create Task",
  "name" : "createTask",
  "parameters" : {
    "data" : {
      "workspace" : "",
      "projects" : [ "" ],
      "name" : "",
      "notes" : "",
      "due_on" : "2021-01-01",
      "tags" : [ "" ],
      "assignee" : ""
    }
  },
  "type" : "asana/v1/createTask"
}

Output

Type: OBJECT

Properties

NameTypeDescription
dataOBJECT
Properties {STRING(gid), DATE(due_on), STRING(notes), STRING(name), {STRING(gid), STRING(name)}(workspace), [{STRING(gid), STRING(name)}](tags), {STRING(gid), STRING(name)}(assignee)}

Output Example

{
  "data" : {
    "gid" : "",
    "due_on" : "2021-01-01",
    "notes" : "",
    "name" : "",
    "workspace" : {
      "gid" : "",
      "name" : ""
    },
    "tags" : [ {
      "gid" : "",
      "name" : ""
    } ],
    "assignee" : {
      "gid" : "",
      "name" : ""
    }
  }
}

Find Workspace GID

To find workspace GID, click here.

Find Project ID

To find project ID, click here.

Find Assignee User ID

To find the user ID of the assignee, click here.

Find Tag ID

To find tag ID, click here.

Triggers

New Task

Name: newTask

Triggers when new task is created.

Type: DYNAMIC_WEBHOOK

Properties

NameLabelTypeDescriptionRequired
workspaceWorkspaceSTRINGThe workspace where the project is located.true
resourceProjectSTRING
Depends On workspace
The project to monitor for newly created tasks.true

Output

Type: OBJECT

Properties

NameTypeDescription
gidSTRINGGlobally unique identifier of the task.
nameSTRINGName of the task.
resource_typeSTRINGType of the resource (task).
created_atSTRINGTimestamp when the task was created.
modified_atSTRINGTimestamp when the task was last modified.
completedSTRINGIndicates whether the task is completed.
notesSTRINGDescription or notes of the task.
assigneeOBJECT
Properties {STRING(gid), STRING(name)}
User assigned to the task.
projectOBJECT
Properties {STRING(gid), STRING(name)}
Project the task belongs to.

JSON Example

{
  "label" : "New Task",
  "name" : "newTask",
  "parameters" : {
    "workspace" : "",
    "resource" : ""
  },
  "type" : "asana/v1/newTask"
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find Workspace GID

You have several methods to find your Asana workspace ID:

  • Method 1: Through the Asana URL
  1. Log in to Asana.
  2. Open the workspace you want to use.
  3. Look at the URL in your browser. It will look similar to:
    https://app.asana.com/0/123456789012345/home
  4. The number after /0/ (123456789012345 in this example) is your workspace ID.
  • Method 2: Through the Asana API
  1. Open your browser or API client.
  2. Enter the following request:
    https://app.asana.com/api/1.0/workspaces
  3. Look for the workspace you want in the JSON response.
  4. The value under gid is your workspace ID.

How to find Team GID

You have several methods to find your Asana team ID:

  • Method 1: Through the Asana URL
  1. Open Asana.

  2. Navigate to the team you want to use.

  3. Look at the URL in your browser. It will look similar to:

    https://app.asana.com/0/team/987654321098765/overview
  4. The number in the URL (987654321098765 in this example) is your team ID.

  • Method 2: Through the Asana API
  1. Open your browser or API client.
  2. Run the following request (replace WORKSPACE_GID with your workspace ID):
    https://app.asana.com/api/1.0/workspaces/WORKSPACE_GID/teams
  3. Find the team you want in the JSON response.
  4. The value under gid is the team ID.

How to find Project GID

You have several methods to find your Asana project ID:

  • Method 1: Through the Project URL
  1. Open the project in Asana.
  2. Look at the URL in your browser. It will look similar to:
    https://app.asana.com/0/123456789012345/678901234567890
  3. The second number (678901234567890 in this example) is the project ID.
  • Method 2: Through the Asana API
  1. Open your browser or API client.
  2. Run the following request (replace WORKSPACE_GID with your workspace ID):
    https://app.asana.com/api/1.0/workspaces/WORKSPACE_GID/projects
  3. Find the project in the JSON response.
  4. The value under gid is the project ID.

How to find Task GID

You have several methods to find your Asana task ID:

  • Method 1: Through the Task URL
  1. Open the task in Asana.
  2. Look at the URL in your browser. It will look similar to:
    https://app.asana.com/0/123456789012345/987654321012345
  3. The second number (987654321012345 in this example) is the task ID.
  • Method 2: Through the Asana API
  1. Open your browser or API client.
  2. Run the following request (replace PROJECT_GID with your project ID):
    https://app.asana.com/api/1.0/projects/PROJECT_GID/tasks
  3. Find the task in the JSON response.
  4. The value under gid is the task ID.

How to find User GID

  1. Open your browser or API client.
  2. Run the following request (replace WORKSPACE_GID with your workspace ID):
    https://app.asana.com/api/1.0/workspaces/WORKSPACE_GID/users
  3. Find the user in the JSON response.
  4. The value under gid is the user ID.

How to find Tags GID

  1. Open your browser or API client.
  2. Run the following request (replace WORKSPACE_GID with your workspace ID):
    https://app.asana.com/api/1.0/workspaces/WORKSPACE_GID/tags
  3. Find the tag you want in the JSON response.
  4. The value under gid is the tag ID.

How is this guide?

Last updated on

On this page