---
title: Automations
description: A friendly guide to TSync Automations — let TSync do routine work for you. When something happens (a new lead, an overdue invoice), TSync reacts automatically. No technical background needed.
product: TSync Intelligence 11.3.6
language: en
canonical: https://docs.tsync.pro/modules/tsync-automations/
source: https://docs.tsync.pro/llms.txt
---

# Automations ⚙️

Every business has little jobs that get done the same way, over and over: someone
gets a welcome message, a manager gets pinged when a big invoice comes in, a
salesperson gets a reminder to call back. **Automations lets TSync handle those
jobs for you**, so nobody has to remember them.

The idea is simple. You build a little recipe that says:

> **When _this_ happens, do _that_.**

For example: *when a new lead comes in, send the sales team a notification.* Or:
*when an invoice goes overdue, email the customer a reminder.* You set it up once,
and TSync runs it on its own from then on — day and night, without anyone
clicking a thing.

## What you can build

An automation (we call it a **workflow**) is a chain of simple blocks you drag
onto a canvas and connect with arrows. There are three kinds of block:

- **A trigger** — the thing that *starts* the workflow. "A new lead is added."
  "An invoice becomes overdue." "Every morning at 9am." A workflow always begins
  with exactly one trigger.
- **A condition** (optional) — a question that splits the path. "Is the invoice
  bigger than €10,000?" If yes, go one way; if no, go another.
- **An action** — the thing TSync *does*. Send a notification, send an email,
  wait a while, create a task, ask someone to approve something, and more.

You can keep it as short as **trigger → action**, or build longer chains with
conditions, branches and pauses. Most useful workflows are just a handful of
blocks.

## Turn it on

Open **Setup → Modules**, find **Automations**, and click **Activate**. A new
**Automations** entry appears in the left-hand menu, with a **Dashboard**, a
**Workflows** list, a **History** view and **Settings**.

One important thing: automations run on a background schedule, so the **scheduled
task ("cron") must be set up** for timed workflows and reminders to fire on time.
If it isn't already, follow [Set up the cron job](../setup-cron-job.md) — it's a
one-time step.

## Build your first automation, step by step

Let's create a real one together: **when a new lead arrives, notify the sales
team.** It takes about two minutes.

1. **Open the builder.** Go to **Automations → Workflows** and click **New
   workflow**. Give it a clear name, like *"Notify sales on new lead"*. You land
   on a blank canvas.
2. **Add the trigger.** From the blocks on the left, drag **New lead** onto the
   canvas. This is what kicks things off — every time a lead is created, this
   workflow wakes up.
3. **Add the action.** Drag a **Notify staff** block onto the canvas, then draw
   an arrow from the trigger to it.
4. **Say who to notify.** Click the **Notify staff** block. A settings panel
   opens on the right. Pick the people or the role (for example *Sales*) who
   should hear about it, and type the message. You can drop the lead's own
   details straight into the text — more on that just below.
5. **Save.** Press **Ctrl + S** (or click **Save**). Your workflow is now live.

That's it. The next time a lead comes in, the chosen people get a notification
inside TSync — a little badge on the bell icon at the top of the screen. No
outside tools, no extra setup.

When you create a workflow you also choose its **visibility**: **Private** (the
default — only you can see and edit it) or **Global** (everyone with access can
see it). You set this with the *"Private workflow"* checkbox in the new-workflow
window, alongside the name, an optional **category**, and a short description.

> **Want to try it without waiting for a real lead?** Use the **Test workflow**
> button. It runs the workflow once with sample data and changes nothing real, so
> you can confirm it behaves the way you expect.

## Your list of workflows

**Automations → Workflows** is where all your automations live. Each row shows the
name, who owns it, its category, when it was created, and an **on/off switch**.

- **Turn one on or off** with the switch in the **Enabled** column — no need to
  open it. A workflow that's off simply never runs until you switch it back on.
- **Open one** by clicking its name. You land on its detail page (more below).
- **Find the one you want** with the filters at the top: pick one or more
  **categories**, or narrow by a **created-between** date range.
- **Act on several at once.** Tick the boxes on the left (or **Select all**), then
  use the toolbar to **Enable**, **Disable** or **Delete** the lot, or **Export**
  your selection to **CSV, Excel or PDF**. You can also export *all* your visible
  workflows from the same menu. (You'll only ever change workflows you're allowed
  to — anything you can't touch is quietly skipped.)

### A closer look at one workflow

Clicking a workflow's name opens its **detail page**, which has two tabs:

- **Workflow** — a read-only picture of the recipe. Click **Builder** to jump
  into the editor and make changes.
- **History logs** — every step this particular workflow has run, with the date,
  the block, what it was working on, and whether each step **succeeded** or
  **failed**. This is the fastest way to answer *"did my automation actually
  run, and what did it do?"*

## Putting your own data into messages

When a workflow runs, it knows the details of whatever set it off — the lead's
name, the invoice total, the customer's email. You can slot those straight into
any text box using **double curly braces**:

```
New lead: {{trigger.name}} ({{trigger.email}})
```

When the workflow runs, TSync swaps `{{trigger.name}}` for the real name and
`{{trigger.email}}` for the real email. You can also tidy up values as you go —
for example round a number or change a date format — but for everyday use, just
dropping in the field is all you need.

## The building blocks you'll reach for

### Things that start a workflow (triggers)

- **Something happens in TSync** — a lead, invoice, estimate, contract, task,
  project, payment, purchase order, stock movement or production order is
  created or changes status. These are the bread and butter.
- **A contract becomes signed** — pick **Contracts** and the **Signed** case. It fires whichever way the
  signature arrived: the customer accepted it in the portal, **or** a colleague pressed *Mark as signed* for
  one signed on paper. Both count as signed in business terms, so the workflow starts **once**, not twice, when
  both happen to the same contract. If a contract is un-marked and later marked again, it fires again — the
  state genuinely changed a second time, and every transition is written into the contract's own history so you
  can tell a first signature from a correction. There is a ready-made **"Contract signed → note in the file"**
  template in the Marketplace to start from.
- **A scheduled time** — run on a repeating clock. Choose **repeat every** *day*,
  *week* or *month* (and the hour, weekday or day-of-month it should fire), or set
  a custom schedule. Great for daily digests and reminders.
- **A signal from another tool** — another system can poke TSync through a secure
  web address to kick off a workflow. Your administrator sets this up when you
  need it.
- **A message on a channel** — when [Omnichannel](tsync-omnichannel.md) is on, a
  workflow can start the moment somebody writes to you on WhatsApp, Viber,
  Messenger or Instagram, when a channel creates a lead, or when somebody opts
  out. **A chat that isn't a lead yet counts too** — chats are kept as plain
  conversations until someone qualifies them, and the trigger carries the message
  text, the sender, the channel and any phone or e-mail they volunteered, so your
  conditions have something real to test.

### Things a workflow can do (actions)

- **Notify staff** — a notification inside TSync, on the bell icon. Pick one
  person, several people, or a whole role. No outside service needed.
- **Send an email** — to a customer, a colleague, anyone. Use a template or write
  it inline.
- **Wait** — pause for a set time (minutes, hours or days) before the next step.
  You can ask it to only count working hours if you like.
- **Ask for approval** — pause and email someone a link with **Approve** and
  **Reject** buttons. When they decide, the workflow picks up where it left off
  and carries on down the matching path.
- **Create something** — a task, a lead, an invoice, an estimate, a production
  order or a purchase order.
- **Branch** — send the workflow down different paths depending on a value (for
  example, treat VIP customers differently from everyone else), or run a couple
  of paths at once.
- **Change a status** or **assign** a task or project to someone.
- **Answer or qualify a conversation** — **Send channel message** and **Send
  channel template** reply on the customer's own channel (WhatsApp, Viber,
  Messenger, Instagram); **Qualify chat → create lead** turns a conversation into
  a real lead. Leave **Only unqualified conversations** switched on, so a rule
  never touches a chat a colleague has already picked up.
- **Note something for the record** — write an entry that shows up in the
  workflow's own history, handy for keeping an audit trail.

### When the flow has to find its own records

The triggers above start a flow **for one particular record**: this lead, this invoice. But **"A scheduled
moment" brings nothing with it** — it fires at the appointed time and that is all. A flow that runs every
morning therefore has to find its own work.

That is what this pair of blocks is for, and they are always used together:

| The block | What it does |
|---|---|
| **Find leads** / **Find contracts** | gathers a list matching your filters and puts it in a variable |
| **For each lead** / **For each contract** | takes that list and does something with every item |

Without the first one, a recurring rule over contracts simply cannot exist: the obligation can be created the
moment the contract is made, but nothing could ever come back **a week later** and check whether anything
happened.

**The filters are not fixed — they are fields you fill in.** On *Find contracts*: contract types (empty = all),
**unsigned only**, older than **N days** (3 by default), only those **without an open task**, skipping ones
whose end date has passed, and a **cap** on results (50 by default). On *For each contract*: which task to
create, who it goes to, how many days until it is due, and who gets notified.

#### Example: nobody forgets the signature again

1. **Trigger:** a scheduled moment, every day at 09:00.
2. **Find contracts:** unsigned only · older than 3 days · without an open task.
3. **For each contract:** create a task for whoever drew the contract up, due in 2 days.

From tomorrow, every contract left unsigned produces a task for the person who made it — and only one, because
the "without an open task" filter stops counting it the next day.

#### Searching for a text inside the contract — and its trap

*Find contracts* can also search **a piece of text in the contract body**, so you can find contracts that are
**missing** a required annex. The text it looks for by default is the title of the data-processing annex.

> ⚠️ **If you rename that annex's title in the contract template, you must change the search text here too.**
> Otherwise the rule does not fail — it reports **zero results**, which looks exactly like "everything is fine".
> It is the one place in automations where a change made somewhere else silently stops a rule.

**Why it searches the text and not the annex list:** the annex list knows *how many* annexes a contract has,
their number and their date — but **not what each one IS**. A data-processing annex is indistinguishable there
from a pricing one. The title inside the contract body is the only thing that says what it is about.

## More examples to learn from

**Email a reminder when an invoice goes overdue**

- **Trigger:** Invoice becomes overdue
- **Action:** Send email to the customer — *"Invoice {{trigger.number}} is now
  overdue. Please arrange payment."*

**Get a manager's sign-off on big invoices**

- **Trigger:** New invoice
- **Condition:** Invoice total is over 10,000
- **Action:** Ask for approval — emails the manager a link; the workflow waits
  for their decision before going further

**Send a daily summary of overdue invoices**

- **Trigger:** Every day at 9:00
- **Action:** Notify the finance team with the day's overdue list

**Welcome every new lead**

- **Trigger:** New lead
- **Action:** Send a friendly welcome email, then create a follow-up task for the
  salesperson

**Turn a serious WhatsApp enquiry into a lead by itself**

- **Trigger:** A message arrives on a channel
- **Condition:** the message mentions a quote or a price
- **Action:** Qualify chat → create lead (only unqualified conversations), then
  notify the sales team

> For the simple case — *"someone writes 'price', send them the price list"* — you
> don't need a workflow at all. **Omnichannel → Keyword replies** does that on its
> own; see [Omnichannel](tsync-omnichannel.md). Build a workflow when the answer
> depends on more than the words in the message.

## A faster way to start: the Marketplace

You don't have to build everything from scratch. Open **Automations →
Marketplace** for a gallery of ready-made workflows — welcome a new lead, chase
overdue invoices, react to a signed contract, route an approval, and more. Click
**Apply** and the workflow is copied into your account, switched off, so you can
look it over and tweak it before turning it on.

The same page has an **Import JSON** button: if a colleague exported a workflow
(see *Share between sites* below), drop the file here to bring it in as a new,
switched-off workflow you can review and enable.

## Reusable actions of your own (Custom Actions)

Sometimes you do the same thing in lots of workflows — post to one specific chat
channel, call one particular web address, log a particular note. **Automations →
Custom Actions** lets an administrator define those once, give them a friendly
name and icon, and they then appear as a ready-to-use block in every workflow's
editor — no copy-pasting settings each time. Each custom action is built on one
of a small set of safe building blocks (an in-app notification, a web request, or
a log entry), so there's no code to write. This page is admin-only.

## Helpful things while you build

- **The canvas is visual.** Drag blocks, connect them with arrows, and click any
  block to edit it in the panel on the right.
- **Tidy up automatically.** Click **Arrange** (or press `Ctrl + Alt + L`) to
  line everything up neatly.
- **Take a guided tour.** First time on the canvas? Click **Tour** in the top
  corner for a quick walkthrough.
- **Every save is remembered.** TSync keeps a snapshot each time you save, so you
  can compare versions or roll back if a change didn't work out — open
  **Versions**.
- **See exactly what happened.** After a workflow runs, you can replay it on the
  canvas: blocks that ran light up green, anything that failed turns red, and
  steps that were skipped are dimmed. Perfect for understanding *why* something
  did or didn't happen.
- **Share between sites.** Any workflow can be exported to a file and imported on
  another TSync install.

## Keeping an eye on things

The **Automations → Dashboard** is your home base. It shows how many workflows
ran, a 7-day trend, your busiest workflows, and any recent failures — with a link
straight to the one that needs attention. A quick weekly glance here keeps
everything running smoothly.

### The History log

For the full step-by-step record across *all* workflows, open **Automations →
History**. Every line is one step a workflow ran: the date and time, which
workflow, the block, what record it was working on, and the result. **Filter by
workflow** or by a **date range** to zero in on a particular run. (An
administrator can also **Clear logs** here to tidy up old entries.) If you only
care about one workflow, the same information sits on that workflow's own
**History logs** tab.

## Settings: categories, task templates and access

**Automations → Settings** (for administrators) has three tabs:

- **Categories** — the labels you use to group workflows (Sales, Finance,
  Production…). Add, rename or remove them here; they're what the category filter
  on the workflows list uses.
- **Task templates** — pre-written tasks (subject, description, dates,
  assignee…). When a workflow's **Create task** action uses one of these, every
  task it makes comes out consistent, without re-typing.
- **Permissions** — who may see and manage workflows. You can grant access to
  *all* workflows or only a person's *own* private ones, and separately control
  creating, editing, deleting, viewing the history, and changing these settings.

## Tips for good automations

- **Name workflows clearly** and group them by area (Sales, Finance, Production)
  so they're easy to find later.
- **Test before you trust.** The **Test workflow** button runs with sample data
  and touches nothing real.
- **Keep them readable.** If a workflow grows past a dozen-or-so blocks, it gets
  hard to follow — split it into smaller ones.
- **Check the dashboard now and then.** A workflow that keeps failing is usually
  pointing at something worth fixing.

## If something isn't working

| What you're seeing | What to check |
|---|---|
| A workflow never runs | Make sure the [scheduled task (cron)](../setup-cron-job.md) is set to run every minute — timed and background workflows depend on it. |
| A timed workflow doesn't fire | Same thing — the background schedule has to be running. |
| The guided tour seems stuck | Do a hard refresh of the page (`Ctrl + Shift + R`), then click **Tour** again. |
| A replay shows greyed-out blocks | That's normal — those are steps the workflow didn't reach this time. Red means a step failed; hover it for the reason. |

## The IL lead-management pack (ready-made templates)

The Marketplace includes a pack of **22 ready-made templates** (coded **IL**) for a disciplined sales process —
first-contact SLA, stage follow-ups, task control, load-based distribution, vacations and new-manager rules. They
appear under the categories **IL Sales Process** and **IL Operations**.

A few you'll likely start with:

- **IL-001 — New lead, contact in 1 hour:** the safe starter. A new lead gets a 1-hour contact task, a note and a
  notification. Turn this on first.
- **IL-008 — Offer follow-up:** after an offer, calls at 1 hour, 24 hours and 3 days — and it stops on its own once
  the lead moves on.
- **IL-014 — Cards without tasks:** a daily sweep that finds active leads with no open task and creates one.
- **IL-002 / IL-016 — Distribution:** reassign or assign leads to the lightest-loaded manager.

**How to use them:** open **Marketplace**, pick an IL template, click **Apply**. Like every marketplace workflow it
is created **switched off** — review it, map the roles and pipeline to your own setup on **IL Configuration** (see
below), test it with a sample lead, then enable it. Start with IL-001, then add the others one at a time.

### IL Configuration — set the pack up in one place

Some IL templates expect a few **custom fields** on the lead (a meeting date, a loss reason, a problem category, and
so on) and they refer to **generic roles** (*Sales*, *Presale*, *Team Lead*, *Operations*) and a **presale pipeline**
that may be named differently on your install. Rather than edit each template, use the setup console.

Open **Automations → IL Configuration** (`/admin/workflow_automation/il_config`, admin-only). It does two things:

- **Creates the custom fields the templates need** — it checks which of the IL lead fields already exist and
  **creates the missing ones with one click** (*Create all missing*, or one at a time). A field that already exists
  is never duplicated.
- **Maps roles and the pipeline to your install** — match the generic labels **Sales / Presale / Team Lead /
  Operations** to your own real role names, and point the **presale pipeline** at your funnel. The templates then
  resolve those names automatically, so they work **without editing a single template**. (Leave a mapping blank and
  the literal name is used, so a fresh install keeps working too.)

Do this **before** you enable the IL templates that rely on those fields and roles. Nothing runs until you switch a
template on, so you can apply them all and set them up at your own pace.

## See also

- [PBX Connector](tsync-pbx.md) — turn phone calls into automatic actions (a
  missed call can kick off a callback task)
- [Set up the cron job](../setup-cron-job.md) — needed for timed and background
  workflows
- [Getting started with TSync](../index.md) — back to the basics
