4 ready-to-build workflows

AI agent workflows for Temples, trusts & pilgrimage administration

Administrative help for the people who run a pilgrimage site — multilingual pilgrim information, queue-slot and accommodation enquiries, UPI donation receipts, annadanam planning and crowd advisories drafted for the trust to approve, with the trust's own rules written as editable formulas. Never doctrinal, never a safety call.

Each recipe below is expressed only in VegaDūta's real workflow building blocks — Trigger, Agent, Knowledge, Condition, Approval, Output, Tool (MCP), Voice, Device, Loop, Code and Parallel — so it maps 1:1 to something you can assemble in the Workflow designer. Consequential actions always pass a human Approval step.

1. Multilingual pilgrim helpline — administrative questions only

Today: one person sits in the trust office with a landline and a register. She answers the same fifteen questions all day — what time is the morning darshan, where do I leave my footwear, is my cottage booking confirmed, where is the medical post — and she answers them in the two languages she happens to speak. A family from another state stands at the counter while a stranger in the queue translates for them. After the office closes at six the phone simply rings. The information is all printed on a board by the gate, in one language, which nobody at the far end of a phone line can read.

Trigger: WhatsApp / Voice / Call (pilgrim helpline)

How the workflow runs

  1. Trigger

    Pilgrim asks a question. A WhatsApp message or a Voice/Call to the helpline number — most pilgrims will phone, many will message, and both land in the same workflow at any hour.

  2. Voice

    Answer in the pilgrim's own language. A Voice node with ElevenLabs for speech and Sarvam for Indian languages holds the conversation in whatever language the caller uses, rather than forcing them onto the two the desk covers today or onto a stranger in the queue.

  3. Knowledge

    Answer only from the trust's published information. A scoped Knowledge collection holds ONLY the trust's own published administrative material: darshan and aarti timings, queue and slot rules, facility locations, footwear and luggage counters, accommodation policy, medical and help-desk positions, prohibited items, dress-code notice as published. The board by the gate, now readable over a phone line in any language.

  4. Code

    The trust's own routing rule. A user-defined SpEL tool, `enquiry_route`, maps the classified enquiry type to ANSWER_FROM_KNOWLEDGE, HUMAN_TRUST_STAFF or ESCALATE_NOW. The boundary that matters most here is a formula the trust owns and can tighten — not a behaviour buried in a prompt.

  5. Condition

    Administrative, or something else?. A Condition node acts on that routing: an administrative or logistics question is answered; anything doctrinal, ritual, religious-advice or personal-guidance shaped is NOT answered and goes to a person of the trust. So does anything about a medical or safety situation.

  6. Agent

    Answer, or hand over cleanly. An Agent node answers the administrative question from Knowledge and names the notice it came from, or says plainly that it is a question for the trust's staff and passes it on with the conversation so far — it never improvises a religious answer.

  7. Output

    Reply, and log the gap. An Output node replies on the pilgrim's channel; unanswered questions are logged so the trust can see exactly which of its notices are missing or unclear and publish them.

Channels & connectors

  • WhatsApp
  • Voice / Call
  • ElevenLabs (voice)
  • Sarvam (Indian languages)
  • SMS / Twilio
  • Knowledge base
  • Approval / HITL (escalation to trust staff)

Outcome

Routine administrative questions are answered accurately in the pilgrim's own language at any hour, including after the office closes, and everything outside that narrow scope reaches a person of the trust instead of being improvised.

Why it helps

The mechanism is scope plus grounding: the same fifteen administrative facts are asked thousands of times and are already published by the trust on the board by the gate, so answering them from that published text in many languages is a retrieval-and-translation problem, not a judgement one. The strict boundary is what makes it safe — the agent's job includes knowing what it must not answer, and that boundary is a formula the trust controls, not a hope about model behaviour.

Build spec

1 agent1 helpline agent. The language layer, the administrative/doctrinal boundary formula, the routing Condition and the escalation to trust staff are workflow nodes and tools, not extra agents. · Pattern: Multilingual voice + chat intake → strict administrative-only scope enforced by the trust's own rule → grounded answer or clean human handover

System prompt (paste-ready)

You are an ADMINISTRATIVE helpdesk assistant for {{trust}}, speaking to pilgrims in their own language. You answer ONLY practical, logistical questions using the trust's published information in Knowledge: darshan and aarti timings, queue and slot procedure, facility and counter locations, footwear/luggage/cloakroom arrangements, accommodation policy, transport and parking, medical post and help desk, prohibited items, published dress-code notice, lost-and-found procedure. Always answer from Knowledge and name which published notice it comes from. If Knowledge does not contain the answer, say so plainly and hand over to the trust's staff — never estimate a timing or a fee. You must NOT answer anything doctrinal, scriptural, ritual, astrological or spiritual, must not advise on what a pilgrim should offer, perform or observe, must not interpret or generate religious content, and must not comment on any dispute or on other institutions — route ALL of that to a person of the trust with a short, respectful line. If anyone describes a medical, crowd or safety situation, stop answering and escalate immediately to trust staff. Be brief, warm and factual.

Agent roles & model tiers

  • Pilgrim helpline agent (per conversation) Economy tier — this is the very high-volume step and the work is retrieval plus multilingual restatement of published facts, not reasoning; Sarvam carries the Indian languages, and a fallback model on a second provider means the helpline keeps answering during an outage instead of going silent like the six o'clock landline

    Answer administrative pilgrim questions strictly from the trust's published Knowledge, in the pilgrim's own language, citing the notice. Refuse and hand over anything doctrinal, ritual, advisory or safety-related. Never estimate a timing, a fee or an availability.

MCP connectors

  • Darshan / queue-slot booking system — via Tool (MCP): read-only status lookup for a slot reference the pilgrim quotes (never a booking, never an allocation)
  • Accommodation allotment system — via Tool (MCP): read-only confirmation status for a cottage booking reference
  • Trust helpdesk queue — via Tool (MCP): file an escalation with the full conversation attached, so the staff member does not start from nothing
  • WhatsApp / Voice / SMS — first-party pilgrim channels, answering at any hour

Built-in tools

  • user-defined tool `enquiry_route` (SpEL): input.category == 'DOCTRINAL' ? 'HUMAN_TRUST_STAFF' : (input.category == 'SAFETY' ? 'ESCALATE_NOW' : 'ANSWER_FROM_KNOWLEDGE') — the trust's own boundary rule as a deterministic formula they can tighten, e.g. adding a category that must always reach a person during a festival week
  • user-defined tool `counter_directions` (SpEL): input.facility + ' — ' + input.gate + ', open ' + input.openTime + '–' + input.closeTime — the trust's own house phrasing, identical in every language version
  • knowledge_search (the trust's own published notices only: timings, queue procedure, facilities, accommodation policy, prohibited items — a scoped collection, so nothing unpublished is reachable)
  • http_request (read-only status lookup for a booking or slot reference the pilgrim quotes)

Guardrails

  • Scope is administrative and logistical ONLY — the agent answers nothing doctrinal, scriptural, ritual, astrological or spiritual, gives no religious advice, generates no religious content, and routes every such question to a person of the trust
  • That boundary is enforced twice: by the prompt and by the trust's own `enquiry_route` SpEL rule feeding a Condition node, so it does not depend on model behaviour alone
  • Every answer is grounded in the trust's own published material in the scoped Knowledge collection and names the notice it came from; where Knowledge is silent the agent says so and hands over rather than estimating a timing, fee or availability
  • Any mention of a medical emergency, a crowd or safety situation, or a missing person ends the automated conversation and escalates to trust staff immediately — the agent never assesses or advises on a safety situation
  • The agent takes no bookings, allocates no slot and confirms no accommodation in this workflow — it can only read and restate a status the trust's own system returns
  • Unanswered questions are logged as a Knowledge gap for the trust to fill, so the fix is publishing the information rather than letting the model fill the void

Cost strategy

This is the highest-volume workflow in the pack by a wide margin, so the model tier here is the single biggest cost decision — put it on the economy tier and keep it there. It is genuinely economy-tier work: a tightly scoped Knowledge collection of published notices, retrieval, and restatement in the pilgrim's language. Resist upgrading when an answer is wrong; the fix is almost always a missing or ambiguous notice, which the gap log will show you, not a bigger model.

Output & delivery

WhatsApp, Voice (ElevenLabs + Sarvam) or SMS → the `enquiry_route` SpEL rule and a Condition node enforce the administrative-only boundary → the economy-tier agent answers from the trust's scoped published Knowledge, citing the notice → anything doctrinal, advisory or safety-related is filed to the trust's helpdesk queue with the conversation attached → an Output node replies in the pilgrim's language, and every unanswered question is logged as a Knowledge gap for the trust to publish.

2. Donation and offering intake on UPI → receipt and acknowledgement, treasurer-approved

Today: a devotee in another city wants to contribute towards annadanam. He makes a bank transfer with no reference, then phones the office three days running to ask whether it arrived. In the office, a clerk writes receipts by hand from a counterfoil book, matching bank lines to names by guesswork, and posts them out weeks later — with the donor's name spelt as he heard it on the phone. Acknowledgement letters for tax purposes are a second handwritten queue on top of that, and at least one receipt a month has to be reissued because the name or the fund is wrong.

Trigger: WhatsApp / Webhook (donation intent) + Razorpay (UPI payment event)

How the workflow runs

  1. Trigger

    Devotee starts a contribution. A WhatsApp message or a Webhook from the trust's donation page starts the flow — purpose (annadanam, building fund, general offering), amount, and the name and address the receipt should carry.

  2. Agent

    Capture the receipt details correctly. An Agent node collects and confirms exactly what a valid receipt needs — donor name spelt back for confirmation, postal address, purpose checked against the trust's published list of funds, and whether a tax-exemption acknowledgement is wanted. It works in the donor's own language, which is how the spelling stops being a guess.

  3. Tool (MCP)

    Take the payment on Razorpay UPI. Razorpay is a real first-party connector: the workflow raises a UPI collect request or payment link for the stated amount, tagged with the purpose, and waits for the payment event. Money is handled by Razorpay, never by the agent — and the reference exists from the first second, which is what kills the reconciliation guesswork.

  4. Condition

    Paid, and matched?. A Condition node proceeds only on a confirmed Razorpay payment event whose amount and reference match the intent; a partial, failed or unmatched payment goes to the office queue rather than generating a receipt.

  5. Code

    The trust's own receipt format and acknowledgement rule. Two user-defined SpEL tools: `receipt_line` formats the receipt body in the trust's exact wording, and `ack_class` decides from the amount and the fund whether a tax-exemption acknowledgement is prepared — the trust's published policy as an editable formula, not a hard-coded rule.

  6. Approval

    Treasurer approves before a receipt is committed. An Approval node holds the drafted receipt and any acknowledgement. A receipt is a financial and legal document of the trust — the treasurer or authorised officer signs it off; the agent only drafts.

  7. Output

    Issue and file it. On approval a Tool (MCP) node writes the entry to the trust's donation ledger and accounting system with the Razorpay reference attached, and an Output node sends the receipt to the donor on WhatsApp and by send_email in their own language — same day, not three weeks.

Channels & connectors

  • Razorpay (UPI)
  • WhatsApp
  • Email
  • Webhook
  • Sarvam (Indian languages)
  • Tool (MCP → donation ledger / accounting)
  • Approval / HITL

Outcome

A devotee can contribute by UPI from anywhere and receive a correct, treasurer-approved receipt promptly in his own language, with the ledger entry and the payment reference already reconciled — no phone calls asking whether it arrived, no counterfoil book.

Why it helps

The mechanism is capturing receipt-quality details at the moment of the donation, and having a payment reference from the first second, rather than reconstructing both afterwards from an unlabelled bank line — that is what makes same-day receipting possible at all, and what removes the misspelt-name reissue. Razorpay handles the money and the confirmation event; the agent never touches funds, and the treasurer still signs every document the trust issues.

Build spec

1 agent1 intake/receipt-drafting agent. The payment itself is the Razorpay connector, the payment match is a Condition node, the receipt format and acknowledgement rule are SpEL tools, and the treasurer sign-off and ledger write are workflow nodes. · Pattern: Detail capture → real UPI collection via Razorpay → strict payment match → trust's own format rules → treasurer approves → ledger + receipt

System prompt (paste-ready)

You take donation details for {{trust}} in the donor's own language. Collect strict JSON {donor_name_for_receipt, postal_address, email, phone, amount, purpose (must be one of the trust's published funds in Knowledge), acknowledgement_wanted (bool), language}. Confirm the spelling of the name and the purpose back to the donor before proceeding — a receipt with a wrong name has to be reissued. Use ONLY the published fund list in Knowledge; if the donor names a purpose that is not on it, ask rather than mapping it yourself. NEVER state that a payment has been received — only the Razorpay payment event does that. Do not ask for or accept any card number, bank account number, UPI PIN or OTP, and never ask for a government ID number; if the donor volunteers one, do not record it. Draft the receipt text for the treasurer to approve — never tell the donor a receipt has been issued before approval.

Agent roles & model tiers

  • Donation intake / receipt drafter (per donation) Standard tier — a receipt is a legal document of the trust and a mis-captured name or fund costs a manual reissue and a phone call; volume is bounded by donations, so the tier is affordable, and a fallback model keeps the donation path open during a provider outage

    Collect and confirm receipt-grade donor details in the donor's language, restricted to the trust's published fund list. Never confirm payment, never handle or request card/bank/PIN/OTP or ID numbers, and draft the receipt strictly for treasurer approval.

MCP connectors

  • Donation ledger / trust accounting system — via Tool (MCP): write the approved entry against the correct fund and record the Razorpay payment reference on it, so reconciliation is already done
  • Receipt-number series — via Tool (MCP): draw the next receipt number from the trust's own series at approval time, so numbers stay sequential and auditable
  • Trust donation page — inbound via Webhook: the same flow as the WhatsApp path
  • Razorpay — first-party connector: raise the UPI collect request tagged with the fund, and receive the payment-confirmation event
  • WhatsApp / Email — first-party donor channels for the approved receipt

Built-in tools

  • user-defined tool `receipt_line` (SpEL): input.donorName + ' — ' + input.purpose + ' — ' + input.currency + ' ' + input.amount + ' — Ref ' + input.paymentRef + ' — ' + input.receiptDate — the trust's exact receipt wording as an editable formula, so changing the format for a new financial year needs no developer
  • user-defined tool `ack_class` (SpEL): input.amount >= input.ackThreshold ? 'ACK_LETTER' : 'RECEIPT_ONLY' — the trust's own published acknowledgement threshold, which the treasurer can raise or lower directly
  • knowledge_search (published fund list, receipt format, acknowledgement policy and eligibility exactly as the trust has published it)
  • http_request (draw the receipt number; write the approved ledger entry with the payment reference attached)
  • send_email (deliver the approved receipt and acknowledgement to the donor)

Guardrails

  • The agent never confirms a payment — only a matched Razorpay payment event advances the workflow, and a partial, failed or unmatched payment goes to the office queue instead of generating a receipt
  • No receipt and no tax-exemption acknowledgement is issued without the treasurer's Approval — the agent drafts, an authorised officer of the trust commits
  • The agent never handles funds and never asks for a card number, bank account number, UPI PIN or OTP; payment is taken entirely by the Razorpay connector
  • No government ID number is requested or stored, and any volunteered ID number is not recorded — the receipt is drafted from the name, address and purpose only
  • Fund purposes are restricted to the trust's published list; the agent asks rather than mapping an unfamiliar purpose onto a fund itself
  • The ledger write and the receipt number draw are keyed to the Razorpay payment reference, so a retried webhook cannot create a duplicate receipt or a double ledger entry
  • The agent gives no tax advice — the acknowledgement wording and threshold come from the trust's published policy via `ack_class`, and any question beyond that goes to the trust's office
  • The flow is administrative only: it records a contribution and issues a receipt, and never generates religious content, blessing text or any statement about what a contribution means

Cost strategy

Volume is bounded by the number of donations, so there is no runaway multiplier and a standard-tier model is the right call — the failure mode here is a misspelt donor name or a wrong fund, both of which cost a reissue and a phone call, far more than the model difference. If the trust runs a high-volume small-offering season, split the flow: an economy-tier pass for short purpose-only offerings, standard tier only where an address and an acknowledgement are being captured. The formatting and threshold work sits in zero-cost SpEL tools rather than in tokens.

Output & delivery

WhatsApp or the donation-page Webhook → the agent captures and confirms receipt-grade details in the donor's language from the published fund list → Razorpay raises the UPI collection and returns the payment event → the Condition node advances only on a matched payment → `receipt_line` and `ack_class` apply the trust's own format and acknowledgement policy → the treasurer approves at the Approval node → a Tool (MCP) node draws the next receipt number and writes the ledger entry keyed to the Razorpay reference, and an Output node sends the receipt on WhatsApp and via send_email.

3. Annadanam and prasad demand forecast → kitchen and procurement handoff

Today: the kitchen in-charge decides at nine the night before how much to cook for annadanam. He does it by pulling out last year's register for roughly the same day, looking at the wall calendar, asking the cottage office how full they are, and adding a bit for the weather — all of it in his head, all of it his alone. If he is short, people who travelled a long way are turned away at the second sitting. If he is long, the surplus is a loss the trust absorbs quietly. The stores list is then written out by hand and given to a volunteer to buy in the morning.

Trigger: Scheduled Webhook (evening-before / weekly planning run)

How the workflow runs

  1. Trigger

    Planning run fires. A scheduled Webhook starts the planning cycle at the cadence the kitchen actually plans on — the evening before, or weekly ahead of a festival period.

  2. Parallel

    Gather the real signals at once. A Parallel node pulls simultaneously: booked darshan slots and accommodation occupancy from the trust's systems (via Tool (MCP)), the trust's own calendar entries from Knowledge, and the historical served counts the kitchen already writes in its register. The same four inputs the in-charge uses — assembled in seconds instead of from memory.

  3. Agent

    Build the forecast. An Agent node produces a served-count range — not a single number — per sitting, showing which signal drove it (slot bookings, occupancy, a calendar day, a comparable past day) and stating its uncertainty honestly.

  4. Code

    Convert to quantities deterministically. A Code node plus a user-defined SpEL tool, `per_head_qty`, turn the counts into ingredient quantities using the kitchen's own documented per-head portions. This is arithmetic against published recipes, so it belongs in a formula the kitchen can edit for a festival menu — not in a model's head.

  5. Approval

    Kitchen in-charge decides the number. An Approval node hands the range and the draft procurement list to the kitchen in-charge, who sets the actual number. Committing food quantity and spend is the trust's decision, and the person who knows the day is the one who makes it — now with the four signals in front of him instead of in his memory.

  6. Output

    Issue the plan. On approval an Output node sends the confirmed sitting plan and procurement list to the kitchen and stores teams on WhatsApp and via send_email, and a Tool (MCP) node files it against the trust's stores system — so the volunteer buying in the morning has a costed list, not a scrap of paper.

Channels & connectors

  • Webhook (scheduled)
  • WhatsApp
  • Email
  • Knowledge base
  • Tool (MCP → slot/accommodation systems + stores)
  • Approval / HITL

Outcome

The kitchen in-charge starts each planning cycle with a reasoned served-count range, its drivers, and a costed ingredient list to adjust — instead of last year's register, a wall calendar and his own memory at nine at night.

Why it helps

The mechanism is assembling signals that already exist but sit in four different places — booked slots, cottage occupancy, the trust's own calendar, last year's served counts — into one view at the moment the decision is made. It deliberately outputs a range with its drivers rather than a single confident number, because a forecast presented as certainty is worse than no forecast; the commitment stays with the person who knows the day.

Build spec

2 agents1 forecasting agent (once per planning run) + 1 procurement-conversion agent (once, after the forecast). The parallel signal gathering, the per-head arithmetic, the kitchen in-charge's decision and the stores filing are workflow nodes and tools. · Pattern: Parallel signal gather → range forecast with drivers → recipe-grounded procurement draft → kitchen in-charge commits the number

System prompt (paste-ready)

(Forecast) You prepare an annadanam planning estimate for {{trust}}. From the supplied signals — booked darshan slots, accommodation occupancy, the trust's own calendar entries, and recorded historical served counts for comparable days — produce per meal sitting {low, likely, high} served counts, the ONE signal that most drove the estimate, and an explicit confidence (LOW|MEDIUM|HIGH). Use only the supplied data and the trust's own records; never invent a historical figure and never use outside assumptions about attendance. If a comparable historical day is missing, say so and mark confidence LOW rather than extrapolating. Output a RANGE, never a single number — the kitchen in-charge sets the actual figure. This is an operational planning estimate only: do not comment on the observance a sitting relates to and do not produce any religious or ritual content.

Agent roles & model tiers

  • Forecaster (once per planning run) Standard tier — this is the hard step: weighing several partial signals and being honest about uncertainty, and it runs only once per cycle so the tier costs little in absolute terms

    Produce per-sitting {low, likely, high} served counts from the supplied signals only, name the dominant driver, and state confidence. Never invent a historical figure; missing comparables mean LOW confidence, not extrapolation. Range only, never a single number.
  • Procurement converter (once, after the forecast) Economy tier — this is arithmetic against the kitchen's documented per-head recipes, not judgement; the Code node and the `per_head_qty` SpEL tool do the actual multiplication

    Convert the served-count range into ingredient quantities using ONLY the documented per-head portions and recipes in Knowledge. Show the per-head basis for each line so the kitchen can check it. Never substitute an ingredient, never assume a portion size that is not documented.

MCP connectors

  • Darshan / queue-slot booking system — via Tool (MCP): read booked slots per sitting for the target day
  • Accommodation allotment system — via Tool (MCP): read cottage occupancy and expected check-ins, the signal the in-charge currently gets by walking to the cottage office
  • Kitchen served-count records — via Tool (MCP): read the recorded counts for comparable past days, replacing the annual register hunt
  • Kitchen stores / procurement system — via Tool (MCP): file the approved sitting plan and ingredient list against stores, and pull current stock on hand
  • WhatsApp / Email — first-party channels to the kitchen and stores teams

Built-in tools

  • user-defined tool `per_head_qty` (SpEL): input.perHeadGrams * input.servedCount / 1000 — the kitchen's own per-head portion arithmetic as an editable formula, adjusted for a festival menu without touching code
  • user-defined tool `planning_number` (SpEL): input.confidence == 'LOW' ? input.high : input.likely — the trust's own conservatism rule, so a low-confidence day is planned to the top of the range on purpose rather than by argument
  • knowledge_search (the trust's calendar entries, documented per-head portions and recipes, historical served-count records)
  • http_request (read booked slots, occupancy and stock on hand; file the approved plan against stores)
  • send_email (issue the confirmed sitting plan and procurement list to the stores team)

Guardrails

  • The agent forecasts, it does not decide — the kitchen in-charge sets the committed number and approves the procurement list at the Approval node before any spend or cooking quantity is fixed
  • Output is always a range with its dominant driver and an explicit confidence; a single confident number is prohibited, because a forecast that hides its uncertainty is worse than none
  • Estimates use only the trust's own signals and records — booked slots, occupancy, its own calendar, its own served-count history; no outside attendance assumptions and no invented historical figures
  • Procurement quantities are computed by a Code node and the kitchen's own SpEL per-head formula against documented portions, with the per-head basis shown per line so a human can check it; no ingredient substitution
  • The agent makes no food-safety, hygiene or dietary judgement of any kind — quantity planning only; anything of that nature is the kitchen's own process
  • The forecast is planning input for the trust's administration and carries no religious or ritual significance — it never comments on the observance a sitting relates to

Cost strategy

This runs once per planning cycle, not per pilgrim, so absolute cost is small — spend it where the judgement is. One standard-tier forecasting call is worth it because that is the step weighing partial signals; the procurement conversion is arithmetic against documented recipes and belongs on the economy tier, with the multiplication itself done by a zero-cost SpEL tool rather than by tokens. The Parallel gather is I/O, not model calls, so widening the signal set costs latency rather than money.

Output & delivery

A scheduled Webhook fires → a Parallel node gathers booked slots, occupancy, calendar entries and historical served counts → the standard-tier forecaster returns per-sitting {low, likely, high} with its dominant driver and confidence → `planning_number` applies the trust's conservatism rule and a Code node plus `per_head_qty` compute ingredient quantities from documented recipes → the kitchen in-charge sets the number and approves at the Approval node → an Output node issues the sitting plan and costed procurement list to the kitchen and stores teams on WhatsApp and by send_email, and a Tool (MCP) node files it against stores.

4. Crowd-pressure signal → advisory drafted for the trust, never issued by an agent

Today: on a heavy day the queue is held by volunteers with a rope line and one hand-held mic, shouting the same instruction down a line that stretches past where the sound carries. The office is answering the same question on a hundred calls — how long is the wait — while trying to manage the situation. When the trust decides to ask people to arrive later, someone has to write that message, find three people to translate it, and get it onto the trust's channels; by then it is twenty minutes old and the pilgrims already inside the complex have heard none of it.

Trigger: Webhook (queue/slot system pressure signal or duty-officer raise)

How the workflow runs

  1. Trigger

    A pressure signal arrives. A Webhook from the queue/darshan slot system (waiting time or throughput crossing a threshold the trust itself sets) or a duty officer raising it manually from the rope line. The slot system has no first-party connector; it reaches the workflow via Webhook and Tool (MCP).

  2. Tool (MCP)

    Assemble the current picture. A Tool (MCP) node reads current slot occupancy, queue-line status and accommodation check-ins so the draft describes what the trust's own systems are actually reporting — nothing beyond that.

  3. Code

    The trust's own pressure bands. A user-defined SpEL tool, `pressure_band`, compares the reported wait against thresholds the trust set, and decides whether this is an officer-attention case or a routine notice. The trust owns those numbers and edits them for a festival week — the model is never asked to judge when a situation is serious.

  4. Agent

    Draft an advisory for the trust to consider. An Agent node writes a short factual draft: the currently reported wait, which gates the published procedure directs to, and the trust's own published guidance for a heavy day. It drafts; it makes no operational recommendation about closing, holding or diverting.

  5. Parallel

    Prepare every language at once. A Parallel node prepares the draft in the languages the pilgrim base actually uses via Sarvam, so approving once approves a complete, fact-identical bundle — instead of starting a hunt for three translators at the worst possible moment.

  6. Approval

    The trust's officer decides — always. An Approval node holds everything. A crowd-safety judgement and any public advisory belong to the trust's officers and the civil authorities, never to an agent. The workflow's job is to have the message ready the instant a human decides to send one.

  7. Output

    Publish only what was approved. On approval an Output node sends the exact approved text to pilgrims on WhatsApp and SMS and to the trust's Telegram channel, in each language — reaching the people already inside the complex, which the mic never does.

Channels & connectors

  • Webhook
  • WhatsApp
  • SMS / Twilio
  • Telegram
  • Sarvam (Indian languages)
  • Tool (MCP → queue/slot + accommodation systems)
  • Approval / HITL

Outcome

When pressure builds, the trust's officer has a factual, multilingual advisory already drafted and ready to release — and the decision about whether to release it, and what it says, stays entirely theirs.

Why it helps

The mechanism is removing the drafting and translation delay from the critical path, not removing the human from it: on a heavy day the bottleneck is producing an accurate message in six languages while also managing the rope line, so the workflow does that part in advance and the channels reach people the mic cannot. Every safety judgement remains with the trust's officers and the civil authorities — the agent only surfaces and escalates, and the threshold that decides what is serious is a number the trust wrote.

Build spec

2 agents1 drafting agent (once per signal) + 1 translation agent run once per language through the Parallel node. The threshold signal, the systems read, the pressure-band formula, the officer's approval and the publish are workflow nodes and tools. · Pattern: Threshold signal → grounded draft → parallel translate → trust officer decides → publish only the approved text

System prompt (paste-ready)

You draft administrative crowd advisories for {{trust}}, for an officer of the trust to review. From the supplied queue/slot and accommodation data plus the trust's published heavy-day guidance in Knowledge, write a factual draft of at most 60 words: the currently reported waiting time, the gate or entry the published procedure directs to, and the trust's own published guidance. Use ONLY the supplied readings and the published guidance — never estimate a wait, never predict how a crowd will behave, and never invent a gate or a timing. You must NOT recommend closing an entry, holding a queue, diverting pilgrims, stopping darshan, or any other operational or safety action; if the data looks serious, add a single line flagging that it needs an officer's attention and stop. Include no religious or ritual content of any kind. This is a DRAFT — you never publish, and you never imply the trust has decided anything.

Agent roles & model tiers

  • Advisory drafter (once per signal) Standard tier — it must stay strictly inside the supplied readings and refuse to make operational recommendations under pressure, which is exactly where a weaker model drifts; a fallback model on a second provider matters here because a heavy day is when you cannot wait out an outage

    Write a ≤60-word factual draft from the supplied queue/accommodation readings and the trust's published heavy-day guidance. No estimated waits, no crowd predictions, no invented gates, no operational or safety recommendation, no religious content. Flag seriousness for an officer and stop.
  • Translator (once per language, via Parallel) Economy tier — a constrained, fact-locked rewrite through Sarvam; it runs once per language so it is the multiplier

    Translate the officer-bound draft with waiting times, gate names and guidance byte-identical to the source. Use the official published form of every gate or facility name from Knowledge. Add nothing, soften nothing, drop nothing.

MCP connectors

  • Queue / darshan slot system — via Tool (MCP): read current occupancy, reported waiting time and throughput per entry; the threshold crossing itself arrives inbound via Webhook
  • Accommodation allotment system — via Tool (MCP): read check-in load, since arrivals staying overnight change the shape of the day
  • Trust broadcast subscriber list — via Tool (MCP): resolve which pilgrims are subscribed and in which language, so one approval covers the right audience
  • WhatsApp / SMS / Telegram — first-party pilgrim channels, reaching people already inside the complex

Built-in tools

  • user-defined tool `pressure_band` (SpEL): input.waitMinutes >= input.redMins ? 'OFFICER_NOW' : (input.waitMinutes >= input.amberMins ? 'DRAFT_ADVISORY' : 'LOG_ONLY') — the trust's own thresholds, raised or lowered by the trust for a festival week without a developer, so the model never decides what counts as serious
  • user-defined tool `advisory_stem` (SpEL): input.gate + ': current reported wait ' + input.waitMinutes + ' minutes (as at ' + input.readingTime + ')' — the trust's exact house phrasing, identical across every translation
  • knowledge_search (the trust's published heavy-day guidance, gate and entry procedure, official facility names)
  • http_request (read current slot occupancy, queue status and accommodation check-ins)

Guardrails

  • An agent NEVER makes a crowd-safety call and never publishes — closing an entry, holding a queue, diverting or stopping darshan are decisions for the trust's officers and the civil authorities; the workflow surfaces and escalates, nothing more
  • The Approval node is mandatory and covers the English draft and every translation together, so an officer approves the complete bundle that will actually go out
  • The seriousness threshold is the trust's own SpEL formula against numbers it set, not a model judgement — that keeps the safety boundary in the trust's hands
  • The draft contains only what the trust's own systems reported and what the trust has published — no estimated waiting times, no predictions of crowd behaviour, no invented gates or timings
  • The agent is prohibited from making any operational recommendation; where the readings look serious it flags that an officer's attention is needed and stops there
  • No religious, ritual or doctrinal content appears in an advisory — these are administrative notices about queues, gates and timings only
  • Translations are fact-locked to the approved source and use the official published names of gates and facilities, so approving once cannot let a softened or drifted version reach a different language group
  • Idempotent per signal id, so a threshold that flickers does not produce repeated advisory blasts to pilgrims

Cost strategy

Fires only when the trust's own threshold is crossed, so volume is low and bursty — the sizing question is the per-signal bundle, not a steady rate. One standard-tier draft plus L economy-tier translations is the right shape: translation is the multiplier and is fact-locked rewriting, while the single draft is where a drift into recommending an action would actually matter. Putting the threshold in a SpEL tool rather than asking a model to judge seriousness keeps both the cost and the safety boundary in the right place.

Output & delivery

A queue/slot threshold Webhook or a duty-officer raise → a Tool (MCP) node reads current occupancy, queue status and check-ins → `pressure_band` applies the trust's own thresholds → the standard-tier agent drafts a ≤60-word factual advisory with no operational recommendation → a Parallel node prepares every language via Sarvam, fact-locked → an officer of the trust approves or rejects the complete bundle at the Approval node → an Output node publishes only the approved wording to pilgrims on WhatsApp and SMS and to the trust's Telegram channel.

Related industries

Build one of these in minutes

The sandbox gives you a live agent workspace — no account, no card. Or head back to the full catalogue and compare patterns across every industry.

See how VegaDūta compares to n8n, Dify and BotpressWhy VegaDūta's architectureEstimate your WhatsApp API costs