> For the complete documentation index, see [llms.txt](https://docs.spara.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spara.com/agents/workflows.md).

# Workflows

Workflows define a proactive GTM playbook for your agents to execute. Instead of waiting for leads to reach out, workflows let Spara take action: sending emails, making calls, and routing leads through multi-step sequences based on their data and behavior. Workflows live inside an Agent, alongside its capabilities.

For example, a [https://github.com/spara-ai/spara-app/blob/gitbook/gitbook/documentation/agents/capabilities/phone.md](https://github.com/spara-ai/spara-app/blob/gitbook/gitbook/documentation/agents/capabilities/phone.md "mention") capability deployed to a phone number picks up incoming calls. Add a **Call Phone** step to a workflow and that same capability dials leads proactively, turning an incoming tool into an outgoing engine.

<figure><img src="/files/2uJIiRtB82n39o7nUPDs" alt=""><figcaption><p>A workflow with triggers, conditions, branching logic, calls, emails, and waits.</p></figcaption></figure>

## How workflows are built

A workflow is a **Trigger** (the criteria that decides which leads enter) followed by a sequence of **Steps** that run in order, all assembled on a canvas in the Workflow editor:

* [Configuring Workflows](/agents/workflows/configuring.md): the editor, triggers, settings, and how a published workflow runs.
* [Workflow Steps](/agents/workflows/steps.md): the individual actions a workflow can run, from sending an email to branching on a condition.

### Outgoing time windows

Outgoing time windows let you control when each channel is allowed to send. You can configure separate windows for email, SMS, and outgoing calls in **Settings**. When a Send Email, Send Text, or Call Phone step fires outside its configured window, the lead is **held** at that step — not dropped — and the step retries automatically once the window reopens.

This means a lead can progress through earlier steps (like a Wait or Condition) and only pause when it reaches a channel step that falls outside its window.

## FAQ

### Why did my workflow step not fire at the expected time?

If you have outgoing time windows configured (Settings > Email or Settings > Phone Numbers > Outgoing Times), a Send Email, Send Text, or Call Phone step will not fire outside the allowed window. Leads are held at that step and retried automatically when the window reopens — so the step will still fire, just later than immediately scheduled.

Check the lead's timeline in the Leads table to see where it is in the workflow and whether it's waiting on a time window.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.spara.com/agents/workflows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
