# Display Message

## Introduction

The 'Display Message' action in Autom Mate is used to show a text message on the screen. This message can include variables, providing flexibility in displaying dynamic information.

The purpose of the 'Display Message' action is to facilitate the visual representation of text data during workflow execution. It allows users to view the content of variables or manually entered text for debugging, testing, or informational purposes.

## What is Display Message?

The 'Display Message' action is designed to present text content to users during the execution of workflows. This action is particularly useful for inspecting responses, manipulating JSON data, and understanding workflow outputs.

#### Key Features

* <mark style="color:orange;">**Title Description**</mark><mark style="color:orange;">:</mark>
  * <mark style="color:orange;">Description can be added to the Title field for clarity.</mark>
  * <mark style="color:orange;">It can be selected as a variable by clicking the variable selection button.</mark>
* <mark style="color:orange;">**Text to be Displayed**</mark><mark style="color:orange;">:</mark>
  * <mark style="color:orange;">Enter the text message to be displayed in the Message field.</mark>
  * <mark style="color:orange;">This text can also be selected as a variable by clicking the variable selection button.</mark>

## How To Use Action

### Basic Usage

**Description:** The 'Display Message' action allows users to view text messages on the screen during workflow execution.

**Usage:**

1. **Title**:
   * <mark style="color:green;">Add a description or title for the message (optional).</mark>
   * <mark style="color:green;">This can be a static text or a variable.</mark>
2. **Message**:
   * <mark style="color:green;">Enter the text message to be displayed.</mark>
   * <mark style="color:green;">This can be a static message or a variable.</mark>

#### Manual Usage

![Manual data: After dragging and dropping the action, we can just put anything we want to the fields. If our display message looks like this.](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FElpDEeiANcQ8vB8syYOX%2F0.png?alt=media)

![After saving and running the flow manually, this will be our output](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FlxI733iqFfZyFyzgxOyW%2F1.png?alt=media)

### Advanced Usage

**Manual Data:** The 'Display Message' action supports manual input of data directly within the configuration form.

**Using Variables**

Users can define variables with default values to display dynamic content.

1. Create a Variable:
   * <mark style="color:green;">Define a variable with a default string value.</mark>
2. In the 'Message' field of the 'Display Message' action, use the variable placeholder:
   * <mark style="color:green;">Example:</mark> <mark style="color:green;"></mark><mark style="color:green;">**`##variable_name##`**</mark>

![We can basically define a string with a default value for seeing how it works.](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FVVvwg1KPlFL7lrV3vgKG%2F2.png?alt=media)

![After saving it, we can write ##message## to the message field in our action. And we can save and run again.](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2F5QzDqUfKUBIcJSln4UE9%2F3.png?alt=media)

![](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FF6eZnI3hPeTHV1eObF6C%2F4.png?alt=media)

**Real-life Use Example**

**Manipulating Response from a GET Action**

Consider a scenario where we want to manipulate a response from a GET action to extract specific user information.

1. <mark style="color:green;">Perform a GET action to retrieve user data.</mark>
2. <mark style="color:green;">Add an object type variable to store the response.</mark>

![First, we are using a GET action to get a specific user from ServiceDesk Plus. I will add an object type variable to the response of the GET action and put this variable to the Display Message action’s message section.](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FhkNVDk7A9S1uEx2P4EzH%2F5.png?alt=media)

![](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2F0NSGEK5O6ESi37ts12DA%2F6.png?alt=media)

![After this, lets save and run the flow to see the response.](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FvYraBvsQepZmqTnotAlD%2F7.png?alt=media)

The response is not a usable thing for automation. So, we have to manipulate the json that we are seeing. We can use a third party json beautifier tool to see it clearly.

If we want to see the company, the name of the user and their login name as response, we will manipulate our response variable.

* <mark style="color:orange;">**For company name: ##get\_response\[users]\[0]\[account]\[name]##**</mark>
* <mark style="color:orange;">**For user name: ##get\_response\[users]\[0]\[name]##**</mark> &#x20;
* <mark style="color:orange;">**For login name: ##get\_response\[users]\[0]\[login\_name]##**</mark>

We can put all this variables to the message field in our action.

![](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FOAIw84gXCxbnZLn3NGzW%2F8.png?alt=media)

![ this will be the response when we save and run the flow](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2Fvx63gIiRHrI38t4ZZwdt%2F9.png?alt=media)

For making the response more understandable we can add manual inputs to the beginning of variables.

This will be our action:

![](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FjxrSNAfZEGOsxjVgSCyi%2F10.png?alt=media)

![This will be the response](https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FrqhyO5BUTTkrccE0MCeD%2F11.png?alt=media)

***

## Additional Tips

### [**Use Cases**](https://docs.autommate.com/userguide/use-cases)

### [FAQ](https://docs.autommate.com/userguide/faq)
