Skip to content
Agentivity
Star on GitHub Start free

Ask a person to approve or answer

Some decisions must stay with a person. This page adds a step that stops the workflow, asks a question, and continues only when a person has answered.

The step needs two nodes: the question, and the channel that carries it to the person.

  1. In the Nodes catalog, open Interactions and drag Human Interaction onto the canvas.
  2. Open AI, then Interactions, and drag Chat Channel onto the canvas, below the first node. Chat Channel is the chat inside the Studio. It appears as a circle.
  3. Drag from the diamond of Chat Channel to the diamond under Human Interaction. A dotted line links them, with the label Channel.
  4. Link Human Interaction to the step that must run after the answer.

A workflow on the canvas: the step Human Interaction, with the circle Chat Channel linked to its diamond, and an arrow to the next step

  1. Right-click Human Interaction and select Edit.

  2. In Interaction operation, choose Send and Wait. With Send, the workflow sends the message and does not wait.

  3. In Free-text message body, write the question. For example:

    Can this payment reminder be sent to the customer? Answer yes or no.
  4. Select Apply.

  5. Select Publish.

The window of the Human Interaction node: Interaction operation set to Send and Wait, and the question typed in Free-text message body

  1. The workflow reaches the step and stops. At the top right of the Execution view, the state is Waiting for input, followed by the name of the step, for example Waiting for input: ask.
  2. The question is sent to the chat of the execution. In the Execution view, open the tab Chat, in the panel on the right.
  3. Type the answer in the field Type your response… and select Send response.
  4. The workflow continues with the next step.

An execution that waits can wait for a long time: the workflow is paused, and it continues when the answer arrives.

The step produces outputs that the next steps can use:

OutputWhat it holds
response_textThe answer of the person.
outcomeThe result of the interaction.
responded_byWho answered.

For example, link an If step after it to take one path when the answer is yes and another when it is no. See Add a condition to a workflow.

  • When you run the workflow, the state becomes Waiting for input.
  • In the section Executions, the execution has the label ACTION REQUIRED.

The section Executions: four executions, one of them of the workflow Reminder Approval with the label ACTION REQUIRED and the buttons Open workflow and Details

  • After the answer, the execution continues and reaches the state completed.
  • The workflow does not stop. Check that Interaction operation is Send and Wait.
  • The step fails. Check that Chat Channel is linked to the diamond of Human Interaction.
  • Other channels exist in the catalogue: Forms Channel, Email Channel and Slack Channel. This page covers the chat of the Studio only.
  • Form Interaction asks for several fields at once instead of one free answer.
  • Agentivity has no login yet, so it does not check who answers. Anyone who can open the Studio can answer.

Run a workflow and follow each step.