Rule actions

Run action

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

The request made when an action is triggered. Rule actions in rules containing a "Task added to this project" trigger have a 2 minute delay for newly created tasks in that project. This is to provide time for the creating user to fill out task details (name, description, etc.) before the rule action is triggered.

An app server must be hosted in order for rule actions to function. For a brief list of popular hosting options, see hosting. <br> <br> <a href="https://d3ki9tyy5l5ruj.cloudfront.net/obj/89ac88743dd7446b7ae94ba88937349cdc50f70f/ac-rule-run-action.png"> <img src="https://d3ki9tyy5l5ruj.cloudfront.net/obj/89ac88743dd7446b7ae94ba88937349cdc50f70f/ac-rule-run-action.png" alt="App components rule run action request flow"/> </a>

post/run_action_url_path_placeholder

Request

  • Base URL
    {siteUrl}
  • URL
    {siteUrl}/run_action_url_path_placeholder
  • Auth
    none declared

Request body

expires_atstring

The time (in ISO 8601 date format) when the request should expire.

userstring

The user GID this hook is coming from.

workspacestring

The workspace GID this hook is coming from.

projectstring

The project GID this hook is coming from.

target_objectstring

The ID of the target object that the rule action is acting on. Currently, this value is always a task GID.

actionstring

The action ID generated from rule creation.

action_typestring

The ID from the configuration used to create the rule action.

idempotency_keystring required

A unique key associated with the "run action" request. App servers should use this key to implement idempotency.

Example request

{
  "expires_at": "2019-04-15T01:01:46.055Z",
  "user": "54321",
  "workspace": "12345",
  "project": "12345"
}

Response

Successfully attached the resource created by the form.

errorstring

The error that should be displayed to the user.

action_result'resources_created' | 'ok' required

Specifies any additional information that the app wants to send to Asana on completion of the action. Can only be resources_created or ok.

Example response

{
  "error": "That resource no longer exists",
  "action_result": "ok",
  "resources_created": [
    {
      "resource_name": "Build the Thing",
      "resource_url": "https://example.atlassian.net/browse/CP-1",
      "error": "No resource matched that input"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.