Webhook triggers and the Gumloop API

Gumloop · Practical · 10 min

Webhooks connect agents to tools that have no built-in trigger, like your own website or internal systems.

A webhook is an automatic message one system sends to a web address when something happens: "new signup", "order paid". A webhook trigger gives your agent such an address.

When the other system sends data to the URL, usually as JSON (a text format that writes data as "name": value pairs, like the example), Gumloop accepts it, replies right away with a success message, and runs the agent in the background. The agent's answer is not sent back to the caller; have the agent post its result somewhere (Slack, a CRM, an email).

Getting the data into the prompt:

  • Insert the Raw JSON badge into your prompt: "A new signup arrived: [Raw JSON]. Research the company and post a summary in #sales."
  • Or turn on Send raw JSON instead of a prompt and let the agent's instructions explain what to do.

Protect the URL: it contains a secret part and works as the password itself, so anyone who has it can start your agent. Don't paste it into public places. Each trigger accepts a limited number of calls per minute; extra calls are refused with a "try again later" response.

For developers, the Gumloop API goes further: create and update agents, start sessions (conversations) and send messages, and even call agents through an OpenAI-compatible chat interface. It uses a Gumloop API key from your profile settings, with Python and JavaScript SDKs (ready-made code libraries) and a command-line tool. Non-programmers can ask a developer to wire this up, or use webhooks for the simple cases.

Example

{
  "event": "signup",
  "customer": {
    "email": "ada@example.com",
    "company": "Example Labs",
    "plan": "trial"
  }
}

Remember

  • A webhook trigger gives the agent a URL any system can call with data
  • The caller only gets an acknowledgement; the agent must post its result itself
  • The URL is a secret; the API offers full programmatic control

Watch out for

  • Expecting the webhook call to return the agent's answer, like a normal web form.

Check yourself

  1. Your website calls the agent's webhook URL. What does the website receive back?

Sign in to answer, see the explanations, and get this lesson back as a quick review later.

Official docs: docs.gumloop.com/core-concepts/agent_triggers