castomFLOW
Open castomFLOW

Triggers & actions

Wetin start am, wetin e do, how e decide

Three questions, and every workflow on dis platform na answer to dem. Dis page na di vocabulary: di ways wey run fit begin, di things wey step fit do, and di pieces wey shape di path between di two.

Triggers

Four ways wey one run fit start

One schedule

Every ten minutes, every Monday for seven o'clock, first working day of the month. You go choose the timezone, so when clock change no go be like incident.

One webhook

Your shop, your CRM, your billing system, anything wey fit make HTTP request. Signature verification dey on by default and dem go keep the payload with the run.

One event from the world

Concert wey dem announce, match wey dem schedule, earthquake, flood warning, air-quality level wey pass, provider outage. More than 175 sources, dem dey refresh am every ten to twenty minutes.

One poll, or one person

Watch one endpoint, one mailbox or one folder and start when something change. Or start am by hand, from the console, because sometimes na that one be the honest answer.

One run per thing. Trigger wey fire two times for the same event — webhook wey the sender retry, poll wey see the same row again — go start one run, no be two. Dem dey key the deduplication on whatever identify the thing, and you fit set that key yourself when the sender own idea of id worse pass your own.

Actions

Steps wey dey do something

Action dey change something outside the run: e dey write, send, charge, book, fetch or file. Two kinds, and the difference na whether model dey inside.

Deterministic actions

Call HTTP endpoint. Read and write your own systems. Reshape payload. Look something up inside reference data. Send e-mail, SMS, push notification or printed letter. Offer booking slot. Collect payment. Mint short link. Fetch image with im licence join. Write row, file, or record.

Same input, same output. Dem no cost anything to run, na why the honest advice be say make you use dem for everything wey no really need judgment.

AI actions

Classify this message. Draft that reply. Summarise thread into three bullet points. Extract fields from document wey no structured. Choose between options based on rule wey you write in prose. Translate, keep the tone.

Every AI step go declare the shape of wetin e go return, and dem go validate the return against that shape before the run continue. If model produce something wey no correct, the step go fail clean instead of to spoil the next twelve steps.

Something happen. Then the right thing happen next.

Flow: the steps wey only dey think about the run

Conditions dey branch based on value. Both paths dey defined, always — condition wey im else-branch no defined na the commonest way automation dey quietly lose records, so you no fit leave one dey hang here.

Waits dey hold one run until one moment or one event. Wait na wake_at wey dem write on the run itself, no be row wey dey sit inside queue, na why workflow fit hold ten thousand people for three weeks without any of am costing anything or anybody noticing.

Quiet hours dey stop outbound messages from landing for three for morning. Run wey reach send step inside the quiet window go wait make the window close. Severity fit override am, deliberately, for the alerts wey suppose wake people.

Splits dey send share of runs go path A and the rest go path B, so you fit compare two subject lines, two waits or two orderings against each other on live traffic.

Goals dey mark the thing wey the workflow dey for. When run reach im goal, e go stop there, no matter wetin remain downstream — the customer wey buy no go get the third reminder to buy.

Basket wey dem leave behindYou don reach goal
  • ⚡Wetin dey start amBasket wey no do anything for 40 minutes. Dem deduplicate am on basket id.
  • ?ConditionBasket pass 150 zł? Yes — take the longer path.
  • ⏸Waitwake_at on the run. No queue row, no cost.
  • ADivide dem50/50 on the subject line. This run take variant A.
  • ✉Send amE-mail with short link, redirects dey count per recipient.
  • ★GoalOrder don place. Run stop here; dem no go ever send the second reminder.

Steps wey call model: 1Steps wey no cost anything: 5

Errors na part of the flow, no be exception to am

Step wey fail get where e fit go. Retry with backoff, and limit on how many times. Take alternative path. Stop the run and file am where person go see am. Carry on regardless, because that particular step na optional and you go prefer get most of the outcome instead of none of am.

The default for step wey dey talk to another person system na to retry small times and then stop — because system wey down at 09:14 dey usually up at 09:19, and because run wey don stop dey easier to reason about than run wey half-happen.

Wetin you no fit do: step no fit loop back to earlier step. Workflow na directed path, no be program with jump instruction. If your job really need loop, iterate over list inside one single step, or start one run per item — both dey supported, and both dey easier to read afterwards than cycle go be.