> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/teammates/routines-and-automation/managing-and-running-routines.md).

# Managing & Running Routines

Learn how to run routines on demand, pause or resume schedules, edit prompts, and review automated outputs.

Once your routines are configured, you can manage their lifecycle, execute them on-demand, or adjust their frequency at any time. Diaflow provides both a quick-access widget in the chat interface and a comprehensive management dashboard inside Teammate Settings.

## Two Places to Access Your Routines <a href="#user-content-1-two-places-to-access-your-routines" id="user-content-1-two-places-to-access-your-routines"></a>

Depending on your workflow, you can view and control your routines from two locations:

* **Quick-Access Widget (Chat Workspace):**\
  Located at the bottom-right corner of your Teammate's workspace. It lists your active routines with instant **Run** and **More Options (`...`)** buttons so you don't have to leave the chat.
* **Full Management Dashboard (Teammate Settings → Routines):**\
  Open **Settings `⚙️`** in the top-right header and select the **Routines** tab. This full view displays detailed scheduling timestamps, filter options, and inline toggle controls.

{% tabs %}
{% tab title="Quick-Access Widget" %}

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FPlUKmf3ACYoPfAhiZGqW%2Frounded-image%20(42).png?alt=media&amp;token=44f9cc8e-90d5-4739-bf72-e05aedc122e6" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Full Management Dashboard " %}

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2Fp7Vfbgm8r3KQe45tVjoj%2Frounded-image%20(43).png?alt=media&amp;token=8ed10794-754e-441e-8be6-e51c53085b09" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Running a Routine On-Demand <a href="#user-content-2-running-a-routine-on-demand--run-now" id="user-content-2-running-a-routine-on-demand--run-now"></a>

You don't always have to wait for the scheduled time or an incoming app event to trigger a routine.

* **How to trigger:** Click the **Play icon** next to any routine in either the chat widget or Teammate Settings.
* **When to use Run Now:**
  * **Testing New Prompts:** Verify that your newly created routine produces the expected output immediately after saving.
  * **Ad-hoc Deliverables:** Generate fresh briefings or audit reports right before an unscheduled team meeting.
  * **Re-running Tasks:** Manually re-trigger an analysis if your connected data source was recently updated.

## Pausing & Resuming Routines (Toggle Switch) <a href="#user-content-3-pausing--resuming-routines-toggle-switch" id="user-content-3-pausing--resuming-routines-toggle-switch"></a>

If you are going on leave, reorganizing connected accounts, or temporarily suspending a recurring task, you can pause routines without deleting them.

* **Green Toggle (ON):** The routine is active and will execute automatically according to its schedule or event triggers.
* **Gray Toggle (OFF):** The routine is paused. Automated triggers are temporarily deactivated, but all prompts, schedules, and configurations remain saved.
* **To resume:** Simply click the toggle switch back to **ON** when you're ready.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FZitRahtxKxadyikzq3zf%2Frounded-image%20(44).png?alt=media&amp;token=22788a7e-0fea-4860-ba6f-a3ce9d7c0014" alt=""><figcaption></figcaption></figure>

## Editing & Deleting Routines <a href="#user-content-4-editing--deleting-routines" id="user-content-4-editing--deleting-routines"></a>

* **Editing:** Click the **Pencil icon `✏️`** next to any routine in Teammate Settings (or select `Edit` from the `...` menu in the chat widget) to open the configuration editor. You can update:
  * The **Routine Name** and internal instructions (**Prompt**).
  * Recurrence frequency or execution hours.
  * Connected app event triggers.
  * The `Start a new thread each run` preference.
* **Deleting:** Click the **`...` (More Options)** icon and select **Delete routine**.\
  *(Note: Deleting a routine permanently removes its schedule and instructions. If you only need a temporary pause, use the Toggle Switch instead).*

## Searching & Filtering Routines <a href="#user-content-5-searching--filtering-routines" id="user-content-5-searching--filtering-routines"></a>

For Teammates managing multiple automated tasks across different business areas:

* **Search Bar:** Type any keyword into the `Search...` field at the top of the Routines tab to quickly locate specific tasks by name or instruction.
* **Status Filter:** Filter the list to view all routines, active ones, or paused workflows at a glance.

## Where to Find Routine Outputs <a href="#user-content-6-where-to-find-routine-outputs" id="user-content-6-where-to-find-routine-outputs"></a>

When a routine finishes running (either automatically or via `▷ Run Now`), results are delivered based on your routine's thread configuration:

| Setting                                 | Where the Output Appears                                                                 | Best Used For                                                                                                                                |
| --------------------------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **`Start a new thread each run` = ON**  | Creates a fresh, dedicated session under **Historical Threads** in the right-hand panel. | Independent, recurring reports (e.g., *Daily Cost Audits*, *Weekly Sales Recaps*) where you want each day's results kept in an isolated log. |
| **`Start a new thread each run` = OFF** | Appends directly to your active conversation thread with a clear timestamp header.       | Continuous ongoing projects or collaborative brainstorming where you want recent automated updates visible in the current chat context.      |

### Next steps <a href="#user-content-next-steps" id="user-content-next-steps"></a>

* [**Teammate Settings**](/teammates/teammate-settings.md)**:** Learn how to fine-tune your Teammate's reasoning level, communication style, and custom instructions.
