← Asana

Create Project with Asana API

Pipedream makes it easy to connect APIs for Asana and 800+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Create Project with the Asana API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Create a workflow to Create Project with the Asana API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Create Project action
    1. Connect your Asana account
    2. Select a Workspace
    3. Configure Name
    4. Configure Notes
    5. Configure Text
    6. Optional- Select a Color
    7. Optional- Configure Title
    8. Optional- Select a Default View
    9. Optional- Configure Public
    10. Optional- Configure Archived
    11. Optional- Configure Due On
    12. Optional- Configure Start On
    13. Optional- Select one or more Followers
    14. Optional- Configure HTML Notes
    15. Optional- Select a Owner
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Create Project on Asana
Description:Create a new project in a workspace or team. [See the docs here](https://developers.asana.com/docs/create-a-project)
Version:0.9.0
Key:asana-create-project

Code

import asana from "../../asana.app.mjs";
import constants from "../common/constants.mjs";

export default {
  key: "asana-create-project",
  name: "Create Project",
  description: "Create a new project in a workspace or team. [See the docs here](https://developers.asana.com/docs/create-a-project)",
  version: "0.9.0",
  type: "action",
  props: {
    asana,
    workspace: {
      label: "Workspace",
      description: "Gid of a workspace.",
      type: "string",
      propDefinition: [
        asana,
        "workspaces",
      ],
    },
    name: {
      label: "Name",
      description: "Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.",
      type: "string",
    },
    notes: {
      label: "Notes",
      description: "Free-form textual information associated with the project (ie., its description).",
      type: "string",
    },
    text: {
      label: "Text",
      description: "The text content of the status update.",
      type: "string",
    },
    color: {
      label: "Color",
      description: "The color associated with the status update.",
      type: "string",
      options: constants.COLORS,
      optional: true,
    },
    title: {
      label: "Title",
      description: "The title of the project status update.",
      type: "string",
      optional: true,
    },
    default_view: {
      label: "Default View",
      description: "The default view (list, board, calendar, or timeline) of a project.",
      type: "string",
      options: [
        "list",
        "board",
        "calendar",
        "timeline",
      ],
      default: "calendar",
      optional: true,
    },
    public: {
      label: "Public",
      description: "True if the project is public to its team.",
      type: "boolean",
      optional: true,
      default: false,
    },
    archived: {
      label: "Archived",
      description: "Archived projects do not show in the UI by default and may be treated differently for queries.",
      type: "boolean",
      optional: true,
      default: false,
    },
    due_on: {
      label: "Due On",
      description: "The day on which this project is due. This takes a date with format YYYY-MM-DD.",
      type: "string",
      optional: true,
    },
    start_on: {
      label: "Start On",
      description: "The day on which work for this project begins. This takes a date with format YYYY-MM-DD. `Due On` must be present in the request when setting or unsetting the `Start On` parameter. Additionally, `Start On` and `Due On` cannot be the same date.",
      type: "string",
      optional: true,
    },
    followers: {
      label: "Followers",
      description: "Comma separated string of users. Followers are a subset of members who have opted in to receive \"tasks added\" notifications for a project.",
      type: "string[]",
      optional: true,
      propDefinition: [
        asana,
        "users",
      ],
    },
    html_notes: {
      label: "HTML Notes",
      description: "The notes of the project with formatting as HTML.",
      type: "string",
      optional: true,
    },
    owner: {
      label: "Owner",
      description: "The current owner of the project.",
      type: "string",
      optional: true,
      propDefinition: [
        asana,
        "users",
      ],
    },
  },
  async run({ $ }) {
    const response = await this.asana._makeRequest("projects", {
      method: "post",
      data: {
        data: {
          name: this.name,
          notes: this.notes,
          text: this.text,
          color: this.color,
          workspace: this.workspace,
          default_view: this.default_view,
          title: this.title,
          public: this.public,
          archived: this.archived,
          due_on: this.due_on,
          start_on: this.start_on,
          followers: this.followers,
          html_notes: this.html_notes,
          owner: this.owner,
        },
      },
    }, $);

    $.export("$summary", "Successfully created project");

    return response;
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
AsanaasanaappThis component uses the Asana app.
WorkspaceworkspacestringSelect a value from the drop down menu.
Namenamestring

Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.

Notesnotesstring

Free-form textual information associated with the project (ie., its description).

Texttextstring

The text content of the status update.

ColorcolorstringSelect a value from the drop down menu:dark-bluedark-browndark-greendark-orangedark-pinkdark-purpledark-reddark-tealdark-warm-graylight-bluelight-greenlight-orangelight-pinklight-purplelight-redlight-teallight-warm-graylight-yellow
Titletitlestring

The title of the project status update.

Default Viewdefault_viewstringSelect a value from the drop down menu:listboardcalendartimeline
Publicpublicboolean

True if the project is public to its team.

Archivedarchivedboolean

Archived projects do not show in the UI by default and may be treated differently for queries.

Due Ondue_onstring

The day on which this project is due. This takes a date with format YYYY-MM-DD.

Start Onstart_onstring

The day on which work for this project begins. This takes a date with format YYYY-MM-DD. Due On must be present in the request when setting or unsetting the Start On parameter. Additionally, Start On and Due On cannot be the same date.

Followersfollowersstring[]Select a value from the drop down menu.
HTML Noteshtml_notesstring

The notes of the project with formatting as HTML.

OwnerownerstringSelect a value from the drop down menu.

Authentication

Asana uses OAuth authentication. When you connect your Asana account, Pipedream will open a popup window where you can sign into Asana and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Asana API.

Pipedream requests the following authorization scopes when you connect your account:

About Asana

Manage your team's work, projects, & tasks online