# Integrating chatbots with Nexthink workflows

Without integration, chatbots cannot orchestrate complex multi-step IT resolutions. This leads to incomplete remediations, fragmented employee experience, and escalations to the service desk.

By integrating chatbots with the Nexthink Workflows API, your chatbot can:

* Trigger full workflow executions directly from the chatbot conversation.
* Offload orchestration to Nexthink workflows instead of programming it into the chatbot.
* Use workflow thinklets—Connector, Service API or API Listener—to manage bidirectional communication with chatbot during automations
* Deliver consistent, reusable remediation logic maintained inside Nexthink.

## How does chatbot integration work with Nexthink Workflows?

Nexthink workflow–based chatbot integrations follow this structure:

* The chatbot triggers the Workflow API to start execution.
* Nexthink workflow executes orchestration: diagnostic and branching logic, API calls and remediations.
* Nexthink workflow can communicate to the chatbot during automation and wait for the response to continue
* The chatbot receives the workflow outputs and communicates them to the employee.

<figure><img src="/files/KRDo7NuV99DtiZ0i4PCR" alt=""><figcaption></figcaption></figure>

### Chatbot flow using Nexthink Workflows API

Below is the typical flow for using the Workflows API in a chatbot-powered remediation scenario:

| Required step or task – Chatbot                 | Workflow API integration approach                                                                              |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| 1. Authenticate communication                   | Workflow API credentials: token collection via Nexthink platform.                                              |
| 2. Trigger workflow execution                   | Chatbot calls Workflow API (`/executions` endpoint).                                                           |
| 3. Pass input parameters                        | Chatbot provides user/device context as input variables.                                                       |
| 4.Call chatbot API to ask questions to the user | Workflow calls chatbot to ask additional questions to the user if needed                                       |
| 5. Pause/resume logic                           | Workflow uses **API Listener** to wait for chatbot/user input mid-conversation.                                |
| 6. Orchestration and remediation                | Workflow handles branching, Connector and Service API thinklets, and triggers Remote Actions or notifications. |
| 7. Return results to chatbot                    | Workflow outputs remediation results/status. Chatbot sends confirmation back to the employee.                  |

***

## Configuring Nexthink workflows to support chatbot integrations

Before implementing Workflow API calls within the chatbot’s logic, configure the following in Nexthink:

{% stepper %}
{% step %}
**Set up Workflow API credentials**

Configure API credentials to secure calls from the chatbot to your Nexthink workflow. Ensure that you have the **Workflow API** permissions activated in your [API credentials](https://docs.nexthink.com/api).

Refer to the [Workflows API](https://docs.nexthink.com/api/workflows) documentation to confirm access to the Workflow execution endpoints.

<figure><img src="/files/M8Y1iThWgiHARX9ZKrdt" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Create a workflow with chatbot integrations in mind**

In Nexthink, from the [workflow designer](/platform/user-guide/workflows/creating-workflows.md#design-workflow-logic):

* Use **Service API** thinklets to define communication to chatbot.
* Use **API Listener** thinklets for asynchronous chatbot input.
* Define **input/output variables** that map cleanly to chatbot requests/responses.

{% hint style="info" %}
Refer to the [Use case: Moveworks service automation with Nexthink workflows](/platform/solutions/chatbots/integrating-chatbots-with-nexthink-workflows/use-case-moveworks-service-automation-with-nexthink-workflows.md) documentation for a detailed example of how to set up a workflow-chatbot integration.
{% endhint %}
{% endstep %}
{% endstepper %}

***

## Using pre-built content to accelerate setup of chatbot-workflow integrations

Nexthink Library provides preconfigured workflows you can adapt for chatbot use cases. These allow you to:

* Quickly enable common diagnostics and remediations.
* Standardize orchestration across chatbot integrations.
* Reduce development effort on the workflow design logic.

From the Nexthink Library, search for content by name. Writing "*Assisted*" lists the preconfigured workflows that address common and applicable use cases for chatbot requests.

For example, you can install the *Assisted Outlook troubleshooting* workflow and add the chatbot integration to its logic

{% hint style="info" %}
Refer to the [Nexthink Library](/platform/user-guide/nexthink-library.md) documentation for more information.
{% endhint %}

<figure><img src="/files/x42DnRXBb7pXcuLL2yIN" alt=""><figcaption></figcaption></figure>

***

RELATED TOPIC

* [Use case: Moveworks service automation with Nexthink workflows](/platform/solutions/chatbots/integrating-chatbots-with-nexthink-workflows/use-case-moveworks-service-automation-with-nexthink-workflows.md)
* [Creating workflows](/platform/user-guide/workflows/creating-workflows.md#optionally-make-the-workflow-available-in-nexthink-spark)


---

# Agent Instructions: 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:

```
GET https://docs.nexthink.com/platform/solutions/chatbots/integrating-chatbots-with-nexthink-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
