> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexthink.com/platform/user-guide/workflows/creating-workflows/configuring-thinklets/remote-action-thinklet.md).

# Remote action thinklet

The Remote Action Thinklet allows workflows to execute a Nexthink Remote Action on the device targeted by the workflow or another specified device. It supports parameterized remote actions, enabling you to adapt the execution dynamically based on workflow execution context.

Once triggered, the workflow waits for the action result before the workflow continues. The workflow can then:

* Use the **output values** returned by the Remote Action in subsequent Thinklets or conditions.
* Handle expired scenarios (for example, when the device is offline or does not respond within the configured timeout) through a fallback action path.

If the **Expired** exit of the Remote Action remains unconnected, the workflow will stop processing when the expiration occurs.

<div align="left"><figure><img src="/files/jkN715xdpqiEXYgEXPZ5" alt="image-20240419-144513.png" width="350"><figcaption></figcaption></figure></div>

* **Name**: Enter a unique name for the Remote action thinklet.
* **ID**: The system generates the ID automatically based on the name.
* **Description (optional)**: Describe the purpose of the thinklet and what it does. This information is useful for other users of the workflow who may not be familiar with it.
* **Timeout**: Set the timeout in minutes or hours. This dictates how long the workflow waits for a response from the remote action before timing out. If the device is offline, the workflow may reach the timeout before the device gets back online. When the timeout limit is reached, the thinklet enters an Expiration state.
* **Select remote action**: Identify the remote action that the thinklet will execute. The remote action must have the **Workflow** trigger configured in order to appear on the list.
* **Select device**: Select the device on which the remote action will be executed. To apply the device against the executed workflow, ensure the **Select device** input field is set as a **Targeted device**.
* **Parameters**: Configure the required parameters for the remote action.
  * When a remote action has defined parameters, set **Allow user to enter a custom value** under the **Scrip**t tab on the Remote action page.
* **Outputs**: View the outputs of the remote action. When assessing the status of a remote action in a condition, use the following values:
  * 0 for FAILURE: The script executed but returned an error or failed to complete successfully.
  * 1 for SUCCESS: The remote action executed successfully on the target device.
  * 5 for CANCELED: The execution was canceled, typically because the remote action was deleted before execution completed.
  * 6 for OLD COLLECTOR: The target device has an unsupported or older Collector version and cannot execute the remote action.
  * 7 for NO SCRIPT: No applicable script exists for the device platform.
  * Two statuses - WAITING ON DEVICE and EXPIRED - are not reported as numerical values.

{% hint style="warning" %}
If you select a device other than the targeted device and use a remote action configured to run as a **Service**, configure Collector on that device appropriately.\
Refer to the [Running remote actions as service](/platform/user-guide/remote-actions/setting-up-and-managing-remote-actions/creating-remote-actions/running-remote-actions-as-a-service-on-server-devices-windows-only.md) documentation for more information about the configuration.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nexthink.com/platform/user-guide/workflows/creating-workflows/configuring-thinklets/remote-action-thinklet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
