Triggers & queues
Triggers and queues let other systems drive your pipelines. A trigger reacts to an event; a queue holds work items and runs the pipeline once per item, with the item’s data filled into the pipeline’s inputs.
In short
On this page you can
- Start a pipeline when another system calls a Webhook URL.
- Start it when a matching e-mail arrives in an IMAP mailbox, or a file lands in a folder.
- Map webhook fields, mail parts or file details to the pipeline’s inputs.
- Collect work items in a queue; each item is one pipeline run with its own data.
- Retry, defer or resolve failed items and watch SLA breaches.
How to use it
- Make sure the pipeline’s Type and Select steps hold the values you want to fill: those are its inputs.
- On Triggers, click New trigger, choose the type and the target pipeline or queue.
- Fill the settings and the Input mapping, then save.
- Click Test, check the mapped inputs, and Fire once.
- For many records, create a queue on Queues and add items by hand, by Excel or by trigger.
When to use what#
| You want | Use |
|---|---|
| Run at fixed times | A Period on the pipeline (“Time-based scheduling stays in the pipeline's Schedule tab.”) |
| Run when something happens elsewhere: an order is placed, a mail arrives, a file is dropped | A trigger with the pipeline as target |
| Process many records, each once, with retries and a record of what was done | A queue, filled by hand, Excel or a trigger |
| A fixed list of rows you type yourself, run on demand or on the schedule | Data & loop › Table (manual) |
| Start from a deployment pipeline | The CLI call |
Pipeline inputs#
Triggers, queue items and table rows can only fill a pipeline’s inputs. Inputs are created for you: every value a Type, Clear & Type or Select step types or selects (web, mobile and desktop) is an input. You see them in Pipeline Parameters.
- Names come from the step names, without AI: “Type email address” becomes
email_address. The name is fixed when you save the pipeline, so renaming the step later does not break a mapping. - One value, one input: the same field with the same value in several cases (the login e-mail in every case) is one input. Different values get
name,name_2,name_3. - An input you do not fill keeps the pipeline’s value.
- Nothing that is not an input, such as waits, assertions, code or API steps, can be changed from outside.
Triggers#
“Triggers start a pipeline or add an item to a queue when a file arrives, an e-mail comes in or a webhook is called.”
New trigger
On ScheduleTriggers, click New trigger. Give it a Name.
Choose the type
Webhook (“Another system calls a URL”), E-mail (“A matching e-mail arrives”) or File (“A file lands in a folder”).
Choose the target
Pipeline (start one run) or Queue (add one item).
Fill the settings
See the table below.
Map the inputs
In Input mapping, give each input an Expression (below). For a queue target, map
referencetoo: it becomes the item’s reference.Save, then test
“Trigger saved”. A webhook gets its URL now. Click Test (next section).
The trigger is listed with Enabled, Last fired, Count and Last error.
| Type | Settings | How it fires |
|---|---|---|
| Webhook | None. The Webhook URL is created when you save; the drawer shows an example call. | Another system sends a JSON body with POST to the URL. The answer says whether it was accepted and gives the run ID or item ID. |
| IMAP server, Port, Username, Password, Use SSL, Folder, From contains, Subject contains, Check every (s), After processing: Mark as read or Move to folder (Target folder) | The mailbox is checked every 120 seconds by default (30 at the fastest). Only unread mails that match the filters fire, up to 20 per check. If firing fails, the mail stays unread and is tried again at the next check. | |
| File | Robot machine (an agent: “The folder is watched on this agent machine”), Folder path, File pattern, Include subfolders, Stable for (s), Done folder, Error folder | The agent watches the folder. A file fires once it has not changed for Stable for seconds. The robot machine must be online. |
The webhook URL is the key
Anyone who knows the URL can start the pipeline. Share it only with the calling system. Regenerate makes a new one: “The current URL will stop working. Systems calling it must be updated.” Turn a trigger off with Enabled; a disabled webhook refuses calls with “Trigger is disabled”.
Input mapping expressions#
| Expression | Takes | Example |
|---|---|---|
body.<field> | A field of the webhook body | body.customerNo |
mail.subject, mail.from, mail.body, mail.date | Parts of the e-mail | mail.from |
file.path, file.name, file.baseName, file.modified | Details of the file | file.path |
regex:<source>:<pattern> | The first group of a regular expression on any of the above | regex:mail.subject:No: (\d+) takes 10245 from “Order No: 10245” |
const:<value> | A fixed value | const:TEST |
For a webhook with an empty mapping, body fields go to the inputs with the same name (“If the mapping is empty, body fields are passed to inputs with the same name.”). A mapping row whose input no longer exists says “No longer an input of the target”.
Test a trigger#
- Check connection (e-mail): logs in and shows the last five matching mails without marking them read (“Connection OK” or “Test failed”).
- Test opens Test with sample data. SmartestQA fills sample source data from the trigger type and the pipeline’s inputs; edit it as you like. It shows the Mapped inputs, “Inputs without a value (default is used):” and “Not an input, not sent:”.
- Fire really runs it once: “Fired: pipeline run started (run id …). See the result in Reports.”, or for a queue “Fired: item #12 added to queue. Track it on the Queues tab.”
Queues#
“A queue collects work items; each item is one run of its processing pipeline with the item's data written to the pipeline inputs.”
New queue
On ScheduleQueues, click New queue. Fill Name, Description and the Processing pipeline (“Runs once per item”).
Choose when items run
Run mode: When items arrive, or Periodically with Interval (min) from 1 minute to 7 days (default 15).
Set capacity and retries
Max parallel (“Agents working at the same time”, 1–50), Max retries (0–10, “Failed items are retried after 1 min”), optional SLA (min) (“max wait before warning”) and Unique reference (“An item with an already queued reference is rejected”).
Add items
Select the queue, then New item (a Reference, the business key such as an invoice number, and Item data: “Empty fields use the pipeline's default value.”), Upload Excel, or a trigger with the queue as target. Download template (.xlsx) gives the columns:
referenceplus one per input.“n items added to the queue”. Items start as Pending. With When items arrive they are picked up within about 15 seconds, up to Max parallel at a time; with Periodically, at the next interval.
Work with items#
| Status | Means |
|---|---|
| Pending | Waiting to run |
| In progress | Its pipeline run is going |
| Success | The run finished with no failed case, or someone resolved it |
| Failed | The run failed after every retry, no report appeared within 120 minutes, or the run took more than 8 hours |
| Deferred | Put aside until the time in Deferred until |
- Filter with Status filter and Search by reference. Columns: Reference, Status, Attempt, Source (Manual, Excel, Webhook, E-mail, File, Data table, API, Test), Created.
- Retry puts a failed item back to Pending; its attempt count is not reset.
- Defer for a number of minutes or hours.
- Mark as resolved: “The item is marked successful without running; the note is kept for audit.”
- Open run opens the item’s report. Delete removes the item.
- Pause stops the queue from starting items (“Queue paused”); Resume continues.
- Each item run uses the item’s data only; the pipeline’s own data table is not used in that run. Queue item runs send no e-mail and wait behind other runs in the server queue.
The list shows, per queue, the run mode (“on arrival · 3 agents”, “every 15 min · 3 agents”), Pending, In progress, Success 24h, Failed 24h and “n over SLA”. How they are counted: Queue counts.
If something goes wrong#
Didn’t find your answer?Write to support with your project name and what you see on screen.
info@smartestqa.ai