---
title: "Run action"
method: POST
path: "/run_action_url_path_placeholder"
tags: ["Rule actions"]
---

# Run action

`POST /run_action_url_path_placeholder`

## Request

- Base URL: `{siteUrl}`
- URL: `{siteUrl}/run_action_url_path_placeholder`
- Auth: none declared

_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](/docs/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>

## Request body

- RunActionRequest: The body of an action request.
  - `expires_at` string: The time (in ISO 8601 date format) when the request should expire.
  - `user` string: The user GID this hook is coming from.
  - `workspace` string: The workspace GID this hook is coming from.
  - `project` string: The project GID this hook is coming from.
  - `target_object` string: The ID of the target object that the rule action is acting on. Currently, this value is always a task GID.
  - `action` string: The action ID generated from rule creation.
  - `action_type` string: The ID from the configuration used to create the rule action.
  - `idempotency_key` string, required: A unique key associated with the "run action" request. App servers should use this key to implement idempotency.

## Response `200`

Successfully attached the resource created by the form.

- RanActionResponse: The response to an action request.
  - `error` string: 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`.
  - `resources_created` AttachedResourceResponse[]: A field with the data corresponding to the action_result value. Each `action_result` has its own data field shape that Asana expects. `resources_created` expects the name and URL of the resources that the action created.
    - `resource_name` string, required: The name of the attached resource
    - `resource_url` string, required: The URL of the attached resource
    - `error` string: The error that should be displayed to the user

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `410`: Gone
- `500`: Server error

---

[API](https://skmtc.dev/asana/apis/app-components.md) - [All operations](https://skmtc.dev/asana/apis/app-components/llms.txt) - [OpenAPI document](https://skmtc.dev/asana/apis/app-components/revisions/bbebcce5c9f6?raw)
