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

# Trigger or Schedule Workflow

> Allow Neo to trigger workflows immediately or schedule them to run at a future time

The Trigger or Schedule Workflow tool allows Neo Agent to trigger other configured workflows immediately or schedule them to run at a specific future date and time. It can also schedule the current workflow to re-run itself later.

## What It Does

When enabled, the agent can:

* Analyze the ticket and determine if another workflow should be triggered
* Trigger any of the configured workflows immediately
* Schedule a workflow (including itself) to run at a future date and time
* Chain workflows together for complex, time-sensitive automation

> [!TIP]
>
> Use custom instructions to specify WHEN and WHICH workflow(s) to trigger or schedule. Example: "If the ticket mentions employee termination, immediately trigger the Access Removal workflow and schedule the Account Deletion workflow for 30 days after the last day."

## How to Use

1. Enable the tool and select which workflows can be triggered or scheduled
2. Provide custom instructions on when to trigger or schedule each workflow
3. Keep the allowlist focused on workflows you're comfortable being triggered automatically

### Example Instructions

```
Trigger the "User Onboarding" workflow when tickets mention:
- New employee setup
- New hire
- Account creation needed

When processing an employee termination:
1. Trigger the "Access Removal" workflow immediately
2. Schedule the "Account Cleanup" workflow to run on
   the employee's last day
3. Schedule the "Mailbox Archive" workflow to run
   30 days after the last day
```

## Triggering Immediately vs. Scheduling

The tool supports two modes based on the situation:

### Immediate Trigger

When the agent determines a workflow should run right now, it triggers it immediately for the current ticket. You can configure whether the agent should wait for the triggered workflow to complete before continuing.

When the agent waits, its run pauses as soon as it finishes its turn and shows **Waiting for workflow** in [Executions](https://docs.neoagent.io/product/executions.md). Once the triggered workflow's work is done, the agent continues with its outcome from where it stopped. That includes a workflow that stops for a technician's approval: the agent continues only after the approval is answered and the workflow finishes. The paused run holds no resources while it waits.

* **Several workflows at once:** an agent can wait for more than one workflow. It continues as each workflow finishes, and is told which ones it still waits for. Workflows that finish close together can reach it in one continuation.
* **An approval or a script in the same turn:** if the agent also asked for a technician's approval or ran an RMM script before it finished its turn, it continues when that approval is answered or that script finishes, and is told then which workflows finished.
* **A workflow that does not succeed:** if the workflow fails, is stopped, or does not run on the ticket, the agent continues and is told how it ended.
* **A workflow that never finishes:** a wait ends after 14 days. The agent then continues without the outcome and is told the workflow did not finish, so it can follow your instructions for that case.
* **Already running:** if the target workflow is already running on that ticket, the agent does not wait for it and is told so.
* **Credits:** the continuation runs use no credits. The agent's own run and the triggered workflow's run are charged as usual.

> [!NOTE]
>
> **Run only once per ticket** behaves differently on the two immediate-trigger paths, depending on whether the agent waits for the target to finish:
>
> * **Fire and forget** (the agent does not wait): if the target has **Run only once per ticket** enabled and has already succeeded on this ticket, the trigger is skipped and shows as **SKIPPED** in [Executions](https://docs.neoagent.io/product/executions.md). The target's own guarantee holds.
> * **Wait for completion** (the agent waits for the target to finish before it continues): **Run only once per ticket is not enforced.** This path starts the target directly and does not go through the same check, so the target can run again on a ticket it has already processed.
>
> This difference is a known behaviour, not a setting you control. If you need the once-per-ticket guarantee to hold in both cases, add your own guard — for example, a filter or an internal note that the agent checks before it triggers the target.

> [!NOTE]
>
> **In a chat agent, the agent never waits — "wait for completion" is ignored.** Someone is waiting for a reply, and these workflows commonly take six to eleven minutes, so a chat agent always uses the fire-and-forget path. Instead of waiting it tells you what it started and roughly how long that takes, and reads the result afterwards through **Get Workflow Run Status** (added automatically alongside this tool) so it can report what the run actually did. Ask it to check and it will.
>
> Ticket-triggered agents, and scheduled agents that run without a ticket, pause and continue as described above. A scheduled agent that works on a ticket it found starts the workflow without waiting, because no later run of it continues that ticket's conversation.
>
> A chat agent can only read runs of the workflows it is allowed to trigger — the list you set above. If it needs to report on another workflow, add that workflow to the list.

### Scheduled Execution

When an action needs to happen in the future, the agent schedules the workflow to run at a specific date and time. This creates a **Scheduled Work** entry that you can view and manage from your dashboard.

> [!NOTE]
>
> When scheduling for the future, the agent can schedule any workflow in the allowlist **or the current workflow itself**. Self-scheduling is useful when the agent needs to re-process the same ticket later (e.g., check back in a week to verify a fix).

## What Gets Scheduled

When the agent schedules work for the future, it creates an entry with:

| Field | Description |
| - | - |
| **Workflow** | The workflow to execute |
| **Scheduled For** | When to run (must be in the future) |
| **Ticket** | The current ticket for context |
| **Instructions** | Additional guidance for the scheduled run |

All scheduled work appears in the **Scheduled Work** section of your dashboard where you can view, reschedule, or cancel pending entries.

> [card] [Scheduled Work Dashboard](https://docs.neoagent.io/product/scheduled-work.md)
>
> Learn more about managing scheduled work from the dashboard

## Example Scenarios

### Offboarding with Delayed Actions

An agent processing a termination ticket on March 1st for an employee whose last day is March 15th:

```
Agent actions:
1. Immediately: Trigger "Remove Sensitive Access" workflow
2. Immediately: Add internal note documenting the offboarding plan
3. Schedule for March 15th: Run "Disable Account" workflow
4. Schedule for April 15th: Run "Delete Account" workflow
```

### Follow-Up Verification

After resolving a recurring issue:

```
Agent actions:
1. Immediately: Apply the fix and close the ticket
2. Schedule for 7 days later: Re-run the current workflow
   to check if the issue recurred
```

### Conditional Workflow Chaining

An agent determines the ticket needs specialized handling:

```
Agent actions:
1. Analyze the ticket content
2. If it mentions mailbox permissions → Trigger "Mailbox Access Review"
3. If it mentions new hire starting next month →
   Schedule "User Onboarding" for the start date
```

## Requirements

The tool can only trigger or schedule workflows that are:

* **Enabled** — Disabled workflows cannot be triggered or scheduled
* **Triggered type** — Only event-triggered workflows support this

### When a workflow your instructions name is not available

If your instructions tell the agent to run a workflow first when it is available, and that workflow is not in its allowlist, the agent skips that step and carries on with the rest of the job. It notes the skipped step in its run summary, unless your instructions set an exact format for that summary. To make the agent stop instead, say so in the instructions, for example: "If the Bundling workflow is not available, do not assign the ticket; add a note for the dispatcher."

> [!WARNING]
>
> When scheduling, the time must be in the future. The agent cannot schedule work for a time that has already passed.

## Which target settings apply to a direct invocation

A direct hand-off from one agent to another is **not** the same as a PSA event reaching the target. When an agent triggers a target with this tool, most of the target's own trigger settings are deliberately skipped, so the source agent is in control of the hand-off. This is different from how the target behaves when a PSA event arrives on its own.

There are three separate gates, and they are easy to confuse:

| Gate | When it applies | What it checks |
| - | - | - |
| **Run Now** (dashboard) | You click Run Now on a workflow | The **source** workflow's own **Filter Ticket** conditions (see [Filter tickets](https://docs.neoagent.io/core/filter-tickets.md)). A mismatch shows as SKIPPED. The "Bypass 'Filter Ticket' conditions" switch turns this off. |
| **PSA event matching** | Your PSA emits an event (ticket created, status changed, note added, …) | The target's full callback filter: entity type, run-once, the configured trigger event, then the Filter Ticket conditions. |
| **Direct Agent-to-Agent invocation** | An agent triggers a target with this tool | Only two of the target's settings, listed below. |

For a **direct invocation**, the target's settings apply as follows:

| Target setting | Applies? |
| - | - |
| **Enabled** | Yes — a disabled target cannot be triggered |
| **Triggered type** | Yes — only Triggered workflows can be a target |
| **Entity type** | Yes — a ticket agent cannot invoke a target set to a different entity type |
| **Filter Ticket conditions** | No — skipped for the hand-off |
| **Execution window** (weekends, hours) | No — skipped for the hand-off |
| **Configured trigger event** | No — not consulted. A target set to **Manual only**, or to a trigger event that did not occur, can still be invoked this way |

> [!NOTE]
>
> Because the target's **Filter Ticket** conditions and its **configured trigger event** are skipped, those settings are a gate on **PSA events**, not a guard against a direct invocation from another agent. If you only want a target to run for certain tickets, control that on the **source** agent — through its instructions and its own filter — because the source agent decides which tickets to hand off. Set the allowlist on this tool to the exact targets you are comfortable being invoked directly.

### Instructions the source agent passes on

When the source agent triggers a target immediately and that call starts a new run, the instructions it writes reach the target as **handoff notes**: what the source agent found, and what it asks the target to do. If the target is already running for that ticket, no new run starts and the notes do not reach it. The target is told to rank these notes below its own custom instructions. This lowers their weight, but it does not guarantee the target ignores a note that conflicts with its instructions.

The guard you can rely on is the **source** agent: its ticket filter and its instructions decide which tickets it hands off and what it asks for. Still write a rule the target must keep on every run into the target's own custom instructions. For example, on a dispatch agent: "Only assign tickets in the Ready for Dispatch status. If the ticket is in any other status, stop."

Instructions you give yourself through **Run Now** keep their full weight for that run.

## Related

> [card] [Scheduled Work](https://docs.neoagent.io/product/scheduled-work.md)
>
> View and manage all scheduled work from the dashboard

> [card] [PSA API](https://docs.neoagent.io/agents/tools/psa/psa-api.md)
>
> Add internal notes to document trigger or scheduling decisions in the ticket


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.