# Workflow Automation (/docs/marketing/workflows)



Workflows let you automate actions that happen in response to booking events — no manual intervention needed.

How Workflows Work [#how-workflows-work]

A workflow consists of:

1. **Trigger** — the event that starts the workflow (e.g., "Booking Created")
2. **Actions** — what happens when the trigger fires (e.g., "Send confirmation email")

Workflows are stored as a visual graph of connected nodes. Each workflow belongs to a specific location and can be enabled or disabled at any time.

Workflow Settings [#workflow-settings]

| Setting         | Description                                                            |
| --------------- | ---------------------------------------------------------------------- |
| **Name**        | A descriptive name for the workflow                                    |
| **Description** | Optional notes about the workflow's purpose                            |
| **Enabled**     | Toggle the workflow on or off without deleting it                      |
| **Graph**       | The node-based workflow definition (managed through the visual editor) |

Available Triggers [#available-triggers]

Booking Events [#booking-events]

| Trigger                    | Event Data                                                                   |
| -------------------------- | ---------------------------------------------------------------------------- |
| **Booking Created**        | Booking ID, customer, activity, total amount, start/end time, status         |
| **Booking Status Changed** | Booking ID, old status, new status, changed by, reason                       |
| **Booking Cancelled**      | Booking ID, customer, cancelled by, reason, cancellation timestamp           |
| **Booking Rescheduled**    | Booking ID, customer, old start/end time, new start/end time, rescheduled by |
| **Booking Reminder**       | Fires at a configured time before the booking (e.g., 24 hours before)        |

Other Events [#other-events]

| Trigger                  | Event Data                                                                                    |
| ------------------------ | --------------------------------------------------------------------------------------------- |
| **Chat Message Created** | Booking ID, thread ID, sender type (customer or operator), message preview, confirmation code |

Available Actions [#available-actions]

Send Template (`send_template`) [#send-template-send_template]

Send an email or SMS using a pre-built [communication template](/docs/marketing/email-sms-templates). The action automatically loads booking, customer, activity, and location data to fill in template variables.

**Configuration:**

| Option               | Description                                                    |
| -------------------- | -------------------------------------------------------------- |
| **Template**         | Select from your active templates                              |
| **Recipient Type**   | `customer`, `facilitator`, `admin`, or `custom`                |
| **Custom Recipient** | An email address or phone number (supports template variables) |

Send Survey Email (`send_survey_email`) [#send-survey-email-send_survey_email]

Send a post-experience survey email with a unique, tokenized survey link. See [Post-Booking Surveys](/docs/marketing/surveys) for details.

Update Booking (`update_booking`) [#update-booking-update_booking]

Change a booking's status automatically. For example, auto-confirm bookings or mark them as complete.

**Configuration:**

| Option    | Description                                               |
| --------- | --------------------------------------------------------- |
| **Field** | The booking field to update (currently supports `status`) |
| **Value** | The new value                                             |

Add Booking Note (`add_booking_note`) [#add-booking-note-add_booking_note]

Automatically add a note to the booking record. Notes are prefixed with `[Workflow]` to distinguish them from manual notes. Supports template variables in the note text.

**Configuration:**

| Option   | Description                                    |
| -------- | ---------------------------------------------- |
| **Note** | The note text (supports `{{variable}}` syntax) |

Webhook (`webhook`) [#webhook-webhook]

Send an HTTP request to an external URL when the trigger fires. Useful for integrating with third-party systems.

**Configuration:**

| Option      | Description                                                                                 |
| ----------- | ------------------------------------------------------------------------------------------- |
| **URL**     | The endpoint URL (supports `{{variable}}` replacement)                                      |
| **Method**  | `GET`, `POST`, `PUT`, `DELETE`, or `PATCH` (defaults to `POST`)                             |
| **Headers** | Custom HTTP headers (values support variable replacement)                                   |
| **Body**    | JSON body template (supports `{{variable}}` and `{{eventData}}` for the full event payload) |

Webhooks have a 30-second timeout and include SSRF protection that blocks requests to localhost and private networks.

Create Task (`create_task`) [#create-task-create_task]

Create an internal task for follow-up.

**Configuration:**

| Option           | Description                               |
| ---------------- | ----------------------------------------- |
| **Title**        | Task title (supports variables)           |
| **Description**  | Task description (supports variables)     |
| **Due In Hours** | Hours until the task is due (default: 24) |
| **Priority**     | `low`, `normal`, or `high`                |

Creating a Workflow [#creating-a-workflow]

1. Navigate to **Dashboard > Marketing > Workflows**
2. Click **Add Workflow**
3. Select a trigger event
4. Add one or more actions
5. Configure the action details (which template, timing, etc.)
6. Activate the workflow

Visual Workflow Editor [#visual-workflow-editor]

Resytech includes a visual node-based editor for building complex workflows. Drag and connect trigger and action nodes to define the flow. The graph is saved as a JSON structure so you can duplicate or export workflows.

Execution Tracking [#execution-tracking]

Every workflow run is tracked with detailed execution data:

| Field                  | Description                                                 |
| ---------------------- | ----------------------------------------------------------- |
| **Trigger Event Type** | The event that started the execution                        |
| **Trigger Event Data** | The full event payload (JSON)                               |
| **Status**             | Current execution status (e.g., running, completed, failed) |
| **Started At**         | When the execution began                                    |
| **Completed At**       | When the execution finished (if applicable)                 |
| **Error Message**      | Details if the execution failed                             |

Each action within an execution is tracked as a step:

| Field             | Description                                        |
| ----------------- | -------------------------------------------------- |
| **Node ID**       | The node in the workflow graph                     |
| **Node Type**     | The action type (e.g., `send_template`, `webhook`) |
| **Status**        | Step status                                        |
| **Input Data**    | The configuration passed to the action             |
| **Output Data**   | The action's result                                |
| **Error Message** | Details if the step failed                         |

View execution history from **Dashboard > Marketing > Workflows** by selecting a workflow and opening its **Executions** tab.

Examples [#examples]

Booking Confirmation [#booking-confirmation]

* **Trigger:** Booking Created
* **Action:** Send confirmation email with booking details

Pre-Visit Reminder [#pre-visit-reminder]

* **Trigger:** Booking Reminder (24 hours before)
* **Action:** Send SMS with date, time, and location directions

Post-Experience Follow-Up [#post-experience-follow-up]

* **Trigger:** Booking Completed
* **Action:** Send survey email (after 2-hour delay)

Cancellation Notification with Webhook [#cancellation-notification-with-webhook]

* **Trigger:** Booking Cancelled
* **Action 1:** Send cancellation email to customer
* **Action 2:** Fire webhook to external CRM with cancellation data

Auto-Add Note on Reschedule [#auto-add-note-on-reschedule]

* **Trigger:** Booking Rescheduled
* **Action:** Add booking note with old and new times for audit purposes

Related How-To Guides [#related-how-to-guides]

* [Create a Workflow](/how-to/workflows/create-a-workflow)
* [Configure Workflow Triggers](/how-to/workflows/configure-workflow-triggers)
* [Test a Workflow](/how-to/workflows/test-a-workflow)
* [Monitor Workflow Executions](/how-to/workflows/monitor-workflow-executions)
* [Create an Email Template](/how-to/marketing/create-email-template)
* [Create an SMS Template](/how-to/marketing/create-sms-template)
