Triggers & Events
Agents should not wait to be asked. When something happens, whether a form is submitted in another system, a deal is won in your CRM or a meeting is booked, the right agent or workflow should start on its own. MeetLoyd gives you three ways to wire this:
| Use it when | Where | |
|---|---|---|
| Webhook triggers | An outside system can call a URL when something happens | Work › Automation › Triggers |
| Event subscriptions | An agent should react to something that happens in MeetLoyd or a connected app | Ask Loyd, or Work › Automation › Event Catalog |
| Reactions | Several events together, or in a given order, should start the work | Work › Automation › Reactions |
For time-based work, use Schedules.
Webhook triggers
A webhook trigger gives you a unique URL. When an outside system (a form tool, a payment provider, a CI pipeline, any system that can send an HTTP POST) calls it, MeetLoyd starts the agent or workflow you chose and passes it the request's data.
External system --> Trigger URL --> Checks & mapping --> Agent or workflow runs
Creating a trigger
- Go to Work › Automation › Triggers.
- Click Create Trigger.
- Give it a name and a description.
- Choose the Target Type (Agent or Workflow) and the Target.
- Keep Require HMAC signature verification ticked (recommended for production).
- Click Create Trigger. MeetLoyd shows the trigger's webhook URL and its signing secret. Copy both now: the secret is shown only this once.
- Configure the URL and the secret in the sending system. The URL stays available in the trigger's details.
Or ask Loyd: "Create a webhook trigger that sends new Typeform submissions to the lead-qualification agent."
Signature verification
When verification is on, each request must be signed with the trigger's signing secret, the same way GitHub and most webhook senders sign their deliveries:
- compute the HMAC-SHA256 of the raw request body, using the signing secret as the key;
- send it, hex-encoded, in an
X-Hub-Signature-256header (anX-Signatureheader is also accepted), assha256=<digest>or as the bare digest.
Sign the exact bytes you send: re-serialising the JSON after signing changes the digest. Requests without a valid signature are refused.
A sender that already supports GitHub-style webhook secrets works as is: paste the signing secret into its secret field.
The signing secret is shown once, when the trigger is created. If you lose it, or think it has leaked, click Regenerate secret in the trigger's details: a new secret is shown once and the old one stops working immediately. Without verification, anyone who knows the URL can start your agent, so keep verification on for every production trigger.
Input mapping
To pass only what the agent needs, a trigger can map the incoming payload. Mapping is set through the Triggers API:
| Mapping | Description |
|---|---|
| Template | Builds the agent's input from fields of the payload |
| Static fields | Adds constant values, such as source: "stripe" |
| Include headers | Passes selected HTTP headers through |
Managing triggers
From the trigger's details you can pause and reactivate it, edit it, and see every execution with its status and duration. Failed executions are counted separately so problems stand out. A paused or disabled trigger refuses incoming requests.
Event subscriptions
Many things your agents should react to happen inside MeetLoyd or in apps you have connected: a CRM lead is created, a deal changes stage, a meeting is booked, an invoice is paid, a project milestone is approved, a pull request is opened. These are events, and agents can subscribe to them. No webhook is needed.
- Browse what can happen: Work › Automation › Event Catalog lists every event your agents can react to, grouped by area and searchable. Expand an event to see what listens to it: the agents and teams subscribed, and any outbound webhooks.
- Subscribe an agent: ask Loyd, for example "When a new lead is created in the CRM, have the SDR agent qualify it." Loyd wires the subscription for you.
- Stay in control: depending on your team's governance settings, a subscription an agent requests may need approval. Pending requests appear under Pending event subscriptions on the Triggers page, where you approve or reject them.
- Spot idle agents: agent and team pages show what wakes each agent up (schedules, triggers, events, inbound mail, handoffs). An agent with nothing that wakes it is flagged, and you can hand the fix to Loyd from there.
Workflows can start on events too. See Starting a workflow on an event.
Reactions: when several things happen
Some situations are only meaningful in combination: a deal is won and the contract is signed, or an incident is opened then not acknowledged. A reaction fires when a condition over several events is met.
- Go to Work › Automation › Reactions and click New reaction.
- Build the Condition by combining events with all of, any of, then (in order) and not.
- Optionally set correlate by (for example
projectId), so the combined events must be about the same thing. - Optionally set a cooldown in minutes, so a burst of events fires the reaction once.
- Under Then fire, choose what starts: an Agent (with an optional task prompt that can quote the event data, such as
{{payload.amount}}), a Workflow, or a Webhook.
Each reaction's Activity shows when it fired, so you can see why it did, or did not, fire.
Best practices
If the system is already connected to MeetLoyd, subscribe to its events instead of building a webhook. There is no URL to protect and nothing to maintain.
Use input mapping so the agent receives the fields it needs, not the whole payload. It avoids leaking data and keeps the agent focused.
A spike of failures on a trigger usually means the sending system changed its payload or its authentication.
Next: Learn about Workflows for orchestrating multi-step processes.