> For the complete documentation index, see [llms.txt](https://docs.loopit.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.loopit.co/getting-started/ai-chat/creating-automations-with-ai.md). Agents can also search and read this documentation through its [MCP server](https://docs.loopit.co/~gitbook/mcp).

# Creating Automations with AI

Describe an automation in your own words and let the Loopit Assistant build the workflow and its email and SMS messages for you.

### About Creating Automations with AI

You can set up a [workflow](https://docs.loopit.co/settings/workflows.md) by describing it in AI Chat, for example "send a reminder email when an invoice hasn't been paid yet". The assistant asks a few short questions, shows you a summary, and creates the workflow once you confirm. It also writes the email and SMS messages for you.

### Creating an Automation

To create an automation:

1. Select **Ask AI** in the top bar.
2. Describe what you want to automate, for example **Create an automation to chase overdue invoices**.

   The more you include, the fewer questions the assistant needs to ask. If you mention a delay, such as "7 days after", a wait step is added.
3. If the assistant needs to know what should start the workflow, it asks **Which event should trigger this workflow?** Select an event.
4. At **Who should be notified?**, select **Customer**, **Team** or both, then select **Done ✓**.
5. Choose how to notify them:
   * For the customer: **Email** and/or **SMS**. SMS is only offered if SMS is set up for your workspace.
   * For your team: **Email**, **SMS**, **Task** and/or **Notification**.
6. Choose who receives the message, if asked.

   For the customer you can pick, for example, the **Booking Owner**, **Billing Owner** or **Primary Driver**, or select **Enter manually** to type an email address or phone number. For your team you can pick a user or a role, and who a task should be assigned to.

   Phone numbers need the country code, for example **+61400123456**.
7. Review the summary. It shows the trigger and each step, for example "Wait 1 day" and "Email the customer".

   <div align="left" data-with-frame="true"><figure><img src="https://2451226423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT8x4qsJr8A1IrE3A8r3f%2Fuploads%2Fgit-blob-2c339dabe8b41b4ac4e84de6fe6af1d6068152de%2Fai-chat-workflow-summary.png?alt=media" alt="The workflow summary with Confirm and Cancel" width="563"><figcaption></figcaption></figure></div>
8. Select **Confirm** to create the workflow, or **Cancel** to stop.

   To change something before you confirm, type what you want to change, such as "change the recipient", and answer the question again.
9. The assistant shows its progress while it builds the workflow and writes the messages. When it's done, select **View Workflow** to open it.

<div align="left" data-with-frame="true"><figure><img src="https://2451226423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT8x4qsJr8A1IrE3A8r3f%2Fuploads%2Fgit-blob-deb1915050fd46e6b92c8baad32ece6cf79bd57e%2Fai-chat-workflow.gif?alt=media" alt="Creating an automation in AI Chat" width="563"><figcaption></figcaption></figure></div>

{% hint style="warning" %}
The workflow is **active as soon as it is created**. Open it with **View Workflow** to check the messages, and switch off **Active** on the workflow if you aren't ready to use it yet.
{% endhint %}

### Example Requests

On the **Automations** page, AI Chat suggests the requests below. You can type them on any page.

* Create an automation to chase overdue invoices
* Create an automation to send a reminder 7 days after collection
* Create an automation to notify staff when a payment fails
* Create an automation to welcome new customers
* Create an automation to follow up on unsigned contracts

### Important Things to Note

* The email and SMS text is written by AI. Review it in the workflow before customers receive it.
* You can edit the workflow afterwards like any other workflow, in **Settings > Workflows**.
* If you type an email address or phone number the assistant can't read, it says so and asks again.
* While the assistant is building the workflow, the chat box is disabled. Wait for the success message before you send your next request.
