This integration will allow you to create Asana accounts for new hires.

Manifest

{
    "form": [
        {
            "id": "TEAM_ID",
            "url": "https://app.asana.com/api/1.0/organizations/{{ORG}}/teams",
            "name": "Select team to add user to",
            "type": "choice",
            "method": "GET",
            "data_from": "data",
            "choice_name": "name",
            "choice_value": "gid"
        }
    ],
    "exists": {
        "url": "https://app.asana.com/api/1.0/users/{{email}}",
        "method": "GET",
        "expected": "\"{{email}}\"",
        "fail_when_4xx_response_code": false
    },
    "execute": [
        {
            "url": "https://app.asana.com/api/1.0/workspaces/{{ORG}}/addUser",
            "data": {
                "data": {
                    "user": "{{email}}"
                }
            },
            "method": "POST"
        },
        {
            "url": "https://app.asana.com/api/1.0/teams/{{TEAM_ID}}/addUser",
            "data": {
                "data": {
                    "user": "{{email}}"
                }
            },
            "method": "POST"
        }
    ],
    "headers": {
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": "Bearer {{TOKEN}}"
    },
    "initial_data_form": [
        {
            "id": "TOKEN",
            "name": "Please put your token here",
            "description": "You can find your token here: https://...."
        },
        {
            "id": "ORG",
            "name": "Organization id",
            "description": "You can find your organization id here: https://..."
        }
    ]
}

Instructions

To get your token:

  • Access your developer console in Asana
  • Click on "Create new token" at the bottom of the page.
  • Fill in anything you want. Probably best to enter something like "Access token for ChiefOnboarding".
  • Check the "I agree...." box.
  • Click on "Create token".

To get your team id:

  • Go to your Asana admin page
  • Check the URL once the page is loaded. A long digit has now been added. That's your team id.

Comments

No comments yet.