> ## Documentation Index
> Fetch the complete documentation index at: https://docs.play2sell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automation Workflows

> Set up automation workflows with triggers, conditions, and actions to eliminate repetitive tasks.

# Automation Workflows

Workflows let you automate repetitive tasks in SalesOS. Define a trigger (what starts the workflow), optional conditions (when it should run), and actions (what happens).

## How Workflows Work

A workflow consists of three parts:

1. **Trigger** — An event that starts the workflow (e.g., deal moves to a stage)
2. **Conditions** — Optional filters that must be true for the workflow to proceed
3. **Actions** — What happens when the trigger fires and conditions are met

## Creating a Workflow

<Steps>
  <Step title="Go to Admin > Workflows">
    Open the Admin panel and click **Workflows**.
  </Step>

  <Step title="Click Create Workflow">
    Click **+ Create Workflow** and give it a descriptive name.
  </Step>

  <Step title="Select a trigger">
    Choose what event starts this workflow (see trigger types below).
  </Step>

  <Step title="Add conditions (optional)">
    Add filters to narrow when the workflow runs. For example: "Only if deal value is greater than \$10,000."
  </Step>

  <Step title="Add actions">
    Define what happens when the workflow triggers. You can chain multiple actions.
  </Step>

  <Step title="Activate">
    Toggle the workflow to **Active**. It will start running immediately for new events.
  </Step>
</Steps>

## Trigger Types

| Trigger                 | Fires When                                       |
| ----------------------- | ------------------------------------------------ |
| **Deal stage changed**  | A deal moves from one stage to another           |
| **Deal created**        | A new deal is added to the pipeline              |
| **Deal value changed**  | The monetary value of a deal is updated          |
| **Deal owner changed**  | A deal is reassigned to a different rep          |
| **Lead created**        | A new lead is added                              |
| **Lead status changed** | A lead's status changes (e.g., New to Qualified) |
| **Lead converted**      | A lead is converted to a deal                    |
| **Task due**            | A task reaches its due date                      |
| **Task overdue**        | A task passes its due date without completion    |
| **Field updated**       | A specific field value changes                   |

## Condition Types

Conditions let you control when a workflow should actually execute:

* **Field equals / not equals** — Check a specific field value
* **Field contains** — Check if a text field contains a substring
* **Field greater than / less than** — Numeric comparisons
* **Field is empty / is not empty** — Check if a field has a value
* **Owner is** — Check the assigned user
* **Team is** — Check the team membership
* **Stage is** — Check the current pipeline stage

Combine multiple conditions with AND / OR logic.

## Action Types

<AccordionGroup>
  <Accordion title="Update Field">
    Automatically set a field value. Examples: set priority to "High" when deal value exceeds \$50K, or update a status field when a stage changes.
  </Accordion>

  <Accordion title="Move Stage">
    Automatically move a deal to a different pipeline stage. Example: move to "Closed Lost" if a deal has been in "Proposal" for 30+ days with no activity.
  </Accordion>

  <Accordion title="Assign Owner">
    Change the deal or lead owner. Example: reassign leads from a departing rep to a round-robin pool.
  </Accordion>

  <Accordion title="Send Notification">
    Send an in-app or email notification to a specific user, the deal owner, the team leader, or a custom recipient. Example: notify the manager when a deal over \$100K is created.
  </Accordion>

  <Accordion title="Create Task">
    Automatically create a task assigned to the deal or lead owner. Example: create a "Send follow-up email" task 3 days after a deal enters "Proposal" stage.
  </Accordion>

  <Accordion title="Send Webhook">
    Send an HTTP POST request to an external URL with the event data. Example: notify your ERP system when a deal is closed.
  </Accordion>

  <Accordion title="Add Tag">
    Apply a tag to the deal or lead. Example: add "High Value" tag when deal value exceeds \$50K.
  </Accordion>

  <Accordion title="Send Chat Message">
    Post a message to a chat channel. Example: post to #wins when a deal is closed as won.
  </Accordion>
</AccordionGroup>

## Workflow Examples

### Auto-Notify Manager on Big Deals

* **Trigger**: Deal created
* **Condition**: Deal value > \$50,000
* **Actions**:
  1. Send notification to team leader: "New high-value deal: {deal_name} worth {deal_value}"
  2. Add tag: "High Value"
  3. Set priority to "High"

### Follow-Up Reminder

* **Trigger**: Deal stage changed to "Proposal"
* **Condition**: None
* **Actions**:
  1. Create task: "Follow up on proposal" due in 3 days, assigned to deal owner

### Stale Deal Alert

* **Trigger**: Field updated (last\_activity\_date)
* **Condition**: Days since last activity > 14 AND stage is not "Closed Won" or "Closed Lost"
* **Actions**:
  1. Send notification to deal owner: "Deal {deal_name} has had no activity for 14 days"
  2. Send notification to team leader

<Tip>
  Start with a few simple workflows and expand over time. Too many workflows at once can create confusion. Monitor the workflow log to ensure they behave as expected.
</Tip>

## Workflow Log

Every workflow execution is logged. Go to **Admin > Workflows > Log** to see:

* When each workflow ran
* What triggered it
* Whether it succeeded or failed
* What actions were executed
* Any error messages

<Warning>
  Review the workflow log regularly, especially after creating new workflows. Misconfigured workflows can cause unintended changes to your data.
</Warning>

## Enabling and Disabling Workflows

Toggle any workflow on or off from the workflow list. Disabled workflows do not run but their configuration is preserved.

## Next Steps

<CardGroup cols={2}>
  <Card title="Branding" icon="palette" href="/admin/customization/branding">
    Customize the look of your workspace
  </Card>

  <Card title="n8n Integration" icon="plug" href="/api/integrations/n8n">
    Build advanced automations with SalesOS Connect
  </Card>
</CardGroup>
