# Closing chat message

### Overview

The **Closing Chat Message** automation allows you to send a message to customers automatically when a chat is closed. This can be used to inform them that the conversation has ended, encourage them to leave a review, or set expectations for future interactions.

**Example Messages:**

* *"Agent has left the chat."*
* *"Thank you for contacting us! Please leave a review at this link: \[Insert Link]."*

{% hint style="info" %}
This automation will only trigger **once every six hours** per conversation. If a chat is closed and reopened within this time, the message will not be sent again.
{% endhint %}

***

### How to set a chat closure message

1. **Go to Basic Automations** – Navigate to the **Basic Automations** tab in the side navigation.
2. **Click "Create New Automation"** – This will open the automation setup page.
3. **Select "Closing Chat Message"** – This option triggers a message when a chat is closed.
4. **Choose Messaging Channels** – Select the channels where this automation should apply.
5. **Enter the Closing Message** – Choose what to send to the customer:
   * **Text Message** – Add a message, and optionally include variables like `{customer_name}` or `{integration_name}` for personalization.
   * **Images or Videos** – Attach relevant media if needed.
6. **Name Your Automation** – Give it a recognizable name for easy management.
7. **Click "Create Automation"** – The closing message will now be sent whenever a chat is closed (but no more than once every six hours per conversation).


---

# 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://help.zaapi.com/automations/basic-automations/closing-chat-message.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.
