Source: https://manu-tests-all-orgs.docs-staging.pageloop.ai/product/assets-objects/custom-objects/build-the-model/workflows

# Workflows & Automations

Custom objects have full workflow support. You can build automations that trigger when records are created or updated, run on a recurring schedule, or fire based on specific field conditions. This is where custom objects go from a structured database to an active part of your operations.

To create a workflow: open the object type → **Automations** → **New automation**.

---

## Trigger Types

### Record created

Fires when a new record of this type is created — by a person, by another automation, or via the API.

Use for: welcome notifications, kickoff actions, creating linked records in other systems, logging the creation event to an audit trail.

**Example:** When a new Vendor record is created, notify the procurement team lead and create a service request to complete vendor onboarding.

---

### Record updated

Fires when any field on a record changes, or when a specific field changes.

By default, any field update triggers the automation. Narrow it with conditions:

- Trigger only when a specific field changes (e.g. fire only when `Status` changes, not when `Notes` is edited)
- Trigger only when a field changes from a specific value to another (e.g. fire only when `Status` changes from `Active` to `Renewal Pending`)

Use for: status-change notifications, escalations, handoffs between teams when a record moves through a lifecycle.

**Example:** When a Contract's `Status` changes to `Renewal Pending`, notify the `Owner` and send a service request to procurement to start the renewal process.

**Example:** When a Vendor's `Status` changes to `Suspended`, notify all Contract owners with active contracts linked to that vendor.

---

### Scheduled — recurring

Fires on a repeating schedule: hourly, daily, weekly, or monthly. You define the interval and can specify the time of day and timezone.

Use for: periodic reviews, data hygiene, recurring reports, proactive alerts based on date fields.

**Example:** Every day at 8am, find all active contracts where `End Date` is within 30 days and send a reminder to each contract's `Owner`.

**Example:** Every month on the first, find all Vendor records where `Status` is `Active` and `Renewal Date` is in the past, and update `Status` to `Under Review`.

---

### Scheduled — run once

Fires at a specific date and time. Set it when creating the automation.

Use for: one-time migrations, delayed actions, reminders tied to a specific event date.

---

## Condition Filtering

Every trigger type supports condition filters that limit which records the automation acts on.

Conditions can check:

- Whether a field equals, contains, or matches a value
- Whether a field is empty or filled
- Whether a field changed from one value to another (for update triggers)
- Whether a relationship field links to a specific person or record

Conditions are evaluated at trigger time. An automation with a condition only runs when both the trigger fires and all conditions pass.

**Example:** A scheduled daily automation that checks `End Date is within 30 days` only sends reminders for contracts actually expiring soon — not every contract in the system.

---

## Actions

Workflow actions available on custom objects:

- **Send notification** — email or in-app notification to a person, a relationship field value (e.g. the contract owner), or a group
- **Update a field** — change a field value on the triggering record or a related record
- **Create a service request** — opens a ticket in a workspace, pre-filled with context from the custom object record
- **Call a webhook** — send record data to an external system
- **Run a script** — execute custom logic via the code action

When building action templates, you can reference field values from the record using variables — `{{record.name}}`, `{{record.owner.email}}`, `{{record.end_date}}` — so notifications and requests include the relevant context without manual copy-pasting.

---

## Practical Examples

**Contract expiry pipeline**

Three automations working together:

1. **60 days out** — scheduled daily, condition: `End Date within 60 days AND Status is Active`. Action: update `Status` to `Renewal Pending`, notify `Owner`.
2. **30 days out** — scheduled daily, condition: `End Date within 30 days AND Status is Renewal Pending`. Action: create a service request to procurement with contract details.
3. **Past end date** — scheduled monthly, condition: `End Date is in the past AND Status is Active`. Action: update `Status` to `Expired`.

**Vendor offboarding**

Trigger: `Status changes to Offboarded`. Action: find all contracts linked to this vendor with `Status is Active`, update their status to `Under Review`, and notify each contract owner.

**New client kickoff**

Trigger: `Record created` on the Client object type. Action: create a service request in the onboarding workspace pre-filled with the client name, tier, and account owner. The onboarding team picks it up immediately without anyone having to manually open a ticket.
