For the complete documentation index, see llms.txt. This page is also available as Markdown.

Format a Variable

The Format a Variable action allows chatbot builders to convert and format variable values into a clean and readable structure during chatbot workflows.

This utility action is commonly used for formatting date variables, especially when converting system-generated ISO date formats into user-friendly formats such as DD/MM/YYYY.

The walkthrough demonstrates configuring variable formatting settings, selecting input and output date formats, creating variables, and publishing the updated bot workflow.

When to Use Format a Variable

Use the Format a Variable action when your chatbot needs to display data in a cleaner or more readable format.

Common Use Cases

  • Formatting delivery dates

  • Formatting appointment schedules

  • Converting ISO date formats

  • Displaying readable customer dates

  • Standardizing workflow outputs

Example Interaction

Bot: Your appointment is scheduled on 25/03/2026.

The chatbot converts a raw ISO date value into a user-friendly format before displaying it.

How to Add Format a Variable

Follow these steps to add the Format a Variable action to your bot workflow.

  1. Open Bot Builder

  2. Drag and drop the Format a Variable node

  3. Open the Utilities tab

  4. Select Format a Variable

  5. Configure the formatting settings

  6. Select or create a response variable

  7. Click Create

  8. Click Publish to deploy the workflow

The walkthrough shows the Format a Variable node connected after a Get Dynamic Date action.

Accessing the Utilities Section

To access the Format a Variable action:

  1. Drag the output connector from the previous node.

  2. Open the action selection panel.

  3. Click the Utilities tab.

The Utilities section contains workflow automation and formatting actions.

Selecting Format a Variable

Inside the Utilities tab:

  1. Locate Format a Variable

  2. Click the action to open the configuration panel.

The walkthrough highlights the Format a Variable utility action within the Utilities section.

Format a Variable Configuration

When configuring the Format a Variable action, several fields must be completed.

Action Name

The Action Name identifies the formatting action inside the workflow.

This name is visible only within the bot builder.

Example

Format Delivery Date Format Appointment Date Convert Date Format

The walkthrough demonstrates entering a descriptive action name before saving the configuration.

Date to be Formatted

The Date to be Formatted field specifies the variable that contains the original date value.

To configure:

  1. Click Add Variable

  1. Select the required variable from the list

The walkthrough specifically selects:

delivery_date

from the variables list.

The selected variable is inserted into the field as:

{{variables.delivery_date}}

This variable contains the original date value that will be formatted.

Input Format

The Input Format field defines the format of the incoming date value.

To configure:

  1. Click the Input Format dropdown.

  2. Select the appropriate format.

Available formats shown in the walkthrough include:

  • MM/DD/YYYY

  • DD/MM/YYYY

  • ISO DateTime with Millis (Z)

The walkthrough specifically selects:

ISO DateTime with Millis (Z)

for the incoming date format.

Output Format

The Output Format field defines how the formatted date should appear after conversion.

To configure:

  1. Open the Output Format dropdown.

  2. Select the preferred output format.

The walkthrough specifically selects:

DD/MM/YYYY

for the final formatted appointment date.

Store Response To

The Store Response to field defines where the formatted value should be saved.

To configure:

  1. Click the Store Response to dropdown.

  1. Select an existing customer field or create a new variable.

The walkthrough demonstrates storing the formatted date in:

corrected_date

Creating a New Variable

If a variable does not already exist:

  1. Click Create Variable

  2. Select the variable type

  3. Click Create Variable to finalize the configuration

The walkthrough demonstrates selecting:

Number

as the variable type before creating the new variable.

Creating the Action

After configuring all formatting settings:

  1. Review the selected formats and variables.

  2. Click the Create button.

The Format a Variable node will now be added to the workflow.

Workflow Behavior

Once triggered, the Format a Variable action:

  • Converts raw variable values

  • Formats date variables automatically

  • Standardizes chatbot output formats

  • Stores the formatted result in a variable

  • Improves readability for customers

The walkthrough specifically notes:

We use the Format a Variable action to convert or change the format of a variable dates into a clean and readable format. https://app.supademo.com/demo/cmpav3eah060kz80j5046ou8m?utm_source=link


Publishing the Bot Changes

After configuring the action:

  1. Review the workflow setup.

  2. Deploy the updated bot workflow to production.

The final page of the walkthrough demonstrates publishing the workflow successfully.


Example Workflow

Example Chatbot Workflow

Get Dynamic Date ↓ Format a Variable ↓ Store Response → corrected_date ↓ Send Appointment Confirmation


Example Interaction

Raw Date: 2026-03-25T10:30:00.000Z Formatted Date: 25/03/2026

The chatbot converts the raw ISO date into a clean and readable format before sending it to the customer.


Best Practices

Follow these recommendations when using Format a Variable.

Use readable output formats

Choose date formats that are easy for customers to understand.

Match the correct input format

Ensure the input format matches the original variable structure.

Use descriptive variable names

Store formatted outputs in clearly named variables.

Standardize date formats

Maintain consistent formatting across chatbot workflows.

Test formatting before publishing

Verify that the converted values display correctly.


Summary

The Format a Variable action allows chatbot builders to convert and standardize variable formats inside chatbot workflows.

With Format a Variable, you can:

  • Convert raw date formats

  • Display readable appointment or delivery dates

  • Standardize chatbot output values

  • Store formatted values in variables

  • Improve chatbot response readability

This utility action helps businesses create clean, user-friendly chatbot responses and maintain consistent data formatting throughout Ownchat workflows.

Last updated