> For the complete documentation index, see [llms.txt](https://docs.guestway.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.guestway.io/reservations-and-operations/automations/how-to-create-an-automation.md).

# How to create an automation

This guide shows you how to build an automation from scratch, test it, and switch it to live for your properties.

{% hint style="info" %}
**Before you start**

* You need the **Supervisor**, **Admin** or **Super admin** role, or a role with **Automations** at **Edit**. Other roles can open the automations, but not change them. See [Users and roles](https://docs.guestway.io/account-and-administration/users-and-roles.md).
* If you want to message guests on WhatsApp, have your WhatsApp templates approved first. See [WhatsApp message templates](https://docs.guestway.io/integrations/whatsapp/using-whatsapp-in-guestway.md).
  {% endhint %}

## Create the automation

{% stepper %}
{% step %}

### Open the automations

Go to **Settings** → **Organization** → **Automations**, and click **Create**.

The new automation is named "Untitled Automation" and has the **Draft** badge. Nothing is sent while it is in Draft.
{% endstep %}

{% step %}

### Name the automation

Click the name field at the top, and give the automation a clear name, for example *"Pre & Post-Stay Guest Messaging"*.
{% endstep %}

{% step %}

### Choose the properties

The automation applies to **All properties** by default. If you want it on some properties only, turn off **All properties**, and pick the **Listings**, **Multi-Units** and **Complexes**. You can mix types.
{% endstep %}
{% endstepper %}

## Add a schedule

{% stepper %}
{% step %}

### Create the schedule

Click **Add Schedule**, and give the schedule a clear name, for example *"Short Stays Only"*.
{% endstep %}

{% step %}

### Filter the reservations

If the schedule must run only for some stays, set **Length of stay** or **Advance notice**. If it must run for all reservations, keep **Any length of stay** and **Any advance notice** on.

If you want different actions for different stay lengths, add one schedule for each. See [About automations](https://docs.guestway.io/reservations-and-operations/automations/about-automations.md).
{% endstep %}
{% endstepper %}

## Add an action

{% stepper %}
{% step %}

### Choose when it fires

Open the schedule, and click **Add Action**. Choose the anchor: **Booking Confirmation**, **Check-in**, **Check-out** or **Event**.

Then set the timing: **Before**, **After** or **On**, a value and a unit, for example *3 days*. If you use days or weeks, you can also pick a time of day, for example *3 days before check-in at 10:00 AM*.
{% endstep %}

{% step %}

### Limit the booking channels

If the action must run for some booking channels only, use **Include Only** or **Exclude** in the channel filter. Otherwise keep **All Channels**.
{% endstep %}

{% step %}

### Choose what it does

Choose the action type: **Guest Message**, **Booker Message**, **Conversation Notification**, **Ad-hoc Email** or **Webhook**, and fill in its fields. For all options, see [Automations](https://docs.guestway.io/reservations-and-operations/automations.md#action-types).

For a message, use template variables, for example `{{guest.first_name}}`, so that each message is personal.
{% endstep %}

{% step %}

### Add conditions

If the action must run only for some reservations, add conditions in the **Conditions** section, for example *Reservation → Total Guests* **Greater than** *4*. All conditions must be true.
{% endstep %}

{% step %}

### Wait for data that is not ready yet

If the message uses data that can be missing when the action fires, for example a smart lock code, add a waiting condition and set **Max Wait Until**.

If your message contains `{{reservation_codes}}`, Guestway suggests the "smart lock code generated" waiting condition. Accept it with one click.
{% endstep %}
{% endstepper %}

Repeat for each action. The timeline at the top of the schedule shows your actions in the order they fire.

## Test and go live

{% stepper %}
{% step %}

### Save the automation

Save your changes. Always save before you activate an automation.
{% endstep %}

{% step %}

### Test it

Under **Status**, choose **Testing**, and save. Guest and booker messages are saved as drafts for review instead of being sent. **Conversation Notification**, **Ad-hoc Email** and **Webhook** actions run for real. Check the result on a few real reservations.
{% endstep %}

{% step %}

### Go live

When the result is correct, choose **Live** under **Status**, and save. The badge changes to **Live**, and actions are delivered.
{% endstep %}
{% endstepper %}

## Related

* [Automations](https://docs.guestway.io/reservations-and-operations/automations.md): all settings, action types, conditions and limits.
* [How to export and import schedules](https://docs.guestway.io/reservations-and-operations/automations/how-to-export-and-import-schedules.md): reuse schedules in another automation or organization.
* [About automations](https://docs.guestway.io/reservations-and-operations/automations/about-automations.md): why automations work the way they do, and tips.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.guestway.io/reservations-and-operations/automations/how-to-create-an-automation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
