Lesson 2 of 6 · 25 min

Workflow Triggers and Webhooks Explained

Start workflows from events, schedules or other systems, and secure the entry point.

In this lesson1. Three kinds of triggers2. Calling a workflow webhook3. Protect the entry point4. Worked example: a form to a workflow5. Common trigger mistakes

Three kinds of triggers

Event triggers start a workflow when something happens inside the platform: a contract is added, a proposal is accepted, a document is signed. Schedule triggers run on a timetable, such as every Monday morning. External triggers start from another system through a webhook: the client's website form, CRM or app sends a request to the workflow's own address. Choose the trigger closest to the real start of the work.

Calling a workflow webhook

A webhook is an HTTP endpoint that accepts data and starts a run. The sending system posts a small JSON body with the fields the workflow needs. Keep the payload simple and validate it on arrival: required fields, email format and sensible lengths. The example below is illustrative; check your platform's documentation for the exact address and fields.

typescript · illustrative
// Illustrative: start a workflow when a website form is submitted
const res = await fetch(WORKFLOW_HOOK_URL, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    name: form.name,
    email: form.email,
    company: form.company,
    notes: form.message
  })
});
if (!res.ok) console.error("Workflow did not start", res.status);

Protect the entry point

Treat a webhook address like a key. Keep it out of public client-side code where possible, send from a server, and rotate it if it leaks. Rate limit incoming requests and check required fields. For runs started by the public, any step that contacts a customer or spends money should ask a person first. These defaults stop spam and abuse from becoming real actions.

  • Send from a server, not the browser, where possible
  • Validate fields on arrival
  • Rate limit and rotate leaked addresses
  • Ask a person before customer-facing steps on public runs

Worked example: a form to a workflow

A consultancy's website form collected name, email, company and a message. The developer added a server function that posted these fields to the workflow's webhook address after basic validation, and returned a thank you page to the visitor. The workflow drafted a reply and a short proposal outline, then waited for a consultant's approval before anything was sent.

When a bot started submitting junk, rate limits and the approval step meant nothing reached real customers, and the address was rotated in minutes.

Common trigger mistakes

Triggers are the front door of a workflow. Weak doors let in noise, duplicates and abuse.

  • Exposing the webhook address in browser code
  • No validation of required fields
  • Choosing a schedule when an event would be timelier
  • Letting public runs contact customers without approval
Key takeaways
  • Use event, schedule or external triggers, whichever matches the real start.
  • Keep webhook payloads small and validated.
  • Treat webhook addresses like keys.
  • Public runs should ask before customer-facing actions.
Try it

For one client process, choose the trigger and write the JSON payload it needs. List the validation rules you would apply and decide which steps must ask a person for runs started from a public form.

Check your understanding

1. Which trigger fits a website contact form?

2. Why validate webhook payloads?

3. What should public runs do before contacting customers?

← PreviousHow to Map a Business Process for AutomationNext lesson →Conditional Branching in Workflows: If This, Then That
XDQ Partner Network

Turn what you learn into monthly income

Resell AI agents and apps under your own brand. Up to 30% off credits, up to 30% recurring share, and apps built by XDQ Labs for your clients. Free to join.

Partner NetworkFor developer agenciesFor resellersFor consultantsWhite-label buildsDeal registration
Join the Partner Network free →
XDQ xAgents · AI lab for your company
While you sleep, your AI agents keep working.

From USD 49 or INR 2,999 a month. A person approves every step.

Start free, 14 days →See every agent300 credits · no card needed · prices include taxes🚀 Startup? Free landing page for 30 days →Need custom software or a security review? Send a brief →
Practise this lesson

Templates from our playbooks

Copy ready templates with when to use each one and why it works.

Playbook · Agency growthThe Agency LinkedIn Growth System: Positioning, a Weekly Content Engine, 10 Post Hooks and 40 Outreach MessagesFor software, AI and digital agencies. How to pick a niche, set up founder and team profiles, publish three posts a week, use hiring posts for reach, and start conversations with 40 messages for clients and partners.50 templates · 27 min readOpen the playbook →Playbook · Agency growthReach Beyond LinkedIn: A Channel by Channel Growth Plan for Agencies and ResellersGoogle Business Profile, WhatsApp Business, YouTube, Instagram, communities, directories, job platforms, partnerships, events, email and AI search. What each channel is good for, how to start, and 25 ready posts and captions.25 templates · 24 min readOpen the playbook →Playbook · Reselling software40 Sales Scripts for Software Resellers: Calls, WhatsApp, Demos, Objections and RenewalsFor people reselling software to small and mid sized businesses in India. Call openers, WhatsApp messages for warm leads, demo and no show scripts, objection replies, closing, onboarding and renewal scripts.40 templates · 25 min readOpen the playbook →