> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/general/sac-360/sac-360o-automations/sac-360-automation-condition-the-author-of-the-last-message-is.md).

# SAC 360° Automation - Condition "The author of the last message is"

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fgg14H3rxrk2Egma9a8VY%2Fimage.png?alt=media&amp;token=1e02ccfd-18dc-4e01-bc72-09c0816a416c" alt="" width="313"><figcaption></figcaption></figure>

To create your automation, follow the step-by-step below:

When opening your Sac 360°, click on the Automations icon;

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FxddzfAD8a6lVQ3uNPBKk%2Fimage.png?alt=media&amp;token=c35583a3-11c0-4e80-968c-751ad07210ad" alt=""><figcaption></figcaption></figure>

Then click on '**New automation**';

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FTz1lIQNxlkQ4E3E9R7Pk%2Fimage.png?alt=media&amp;token=b348c4bd-4cfb-48d7-9e6d-67d6706ac896" alt=""><figcaption></figcaption></figure>

Configure your automation; Define a **title,** and the **condition** which in the example will be "The author of the last message is..."

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FgJd4hfByMFusqz9IkAm1%2Fimage.png?alt=media&amp;token=862c1c56-af57-4dbf-a82f-b4c252f3ecdd" alt=""><figcaption></figcaption></figure>

Next, it is necessary to define whether the author of the last message, which will be the **condition** for the automation, will be the **lead** or an **agent (including automations).**

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FNhExCmdoITfWdPmZ9DVQ%2Fimage.png?alt=media&amp;token=badf3343-a743-4b19-92aa-68a140090c15" alt=""><figcaption></figcaption></figure>

Specify the **action** to be performed when the established condition is met.\
*You can choose more than one action at a time.*&#x20;

* We will use as *example* the condition to **Start a chatbot**. This means that you can develop a satisfaction feedback chatbot and configure the automation so that when the *last message is sent by the lead*.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FBE7Gsh6NwU5NNjSEIKkT%2Fimage.png?alt=media&amp;token=82286f8a-f919-4405-90b5-9e69fa050320" alt=""><figcaption></figcaption></figure>

Select the desired chatbot;

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FffvGsUsJN8ZnZJA8DnpF%2Fimage.png?alt=media&amp;token=dfd36dbb-962f-420b-9edd-1cd1c491b46e" alt=""><figcaption></figcaption></figure>

Configure your automation; \
\
**Define the recurrence**: If this automation should run multiple times while the service meets the conditions, configure the desired frequency below.

"**Limit to channels**'": The automation will only be started when the service is from one of the selected channels. Leave blank for any channel.

**"Limit to accounts"** : The automation will only be started when the service is in one of the selected accounts. Leave blank for any account.

"**Limit to status**": The automation will only be started when the service has one of the selected statuses. Leave blank for any status.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FNntqspNDMMGVXgZIJmmv%2Fimage.png?alt=media&amp;token=9a6d22fa-c1c1-4d58-8250-33d31479f876" alt=""><figcaption></figcaption></figure>

Then click on '**Save automation**';


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/topics/general/sac-360/sac-360o-automations/sac-360-automation-condition-the-author-of-the-last-message-is.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
