Skip to main content

Work with your troop

Start work when something happens

Start a teammate with an event in Troopy or a webhook from another app, and see what each event did.

A trigger is a routine that starts when something happens, and not on a clock. It starts a teammate with each event: something in Troopy, or a webhook from another app. This page tells how to make a trigger, set up the app that sends to it, and read what each event did.

Before you begin

  • Owners and admins make, change and delete triggers. Other people read them.
  • A teammate never sees the URL or the secret of a trigger.
  • A workspace has no limit of triggers.

The two kinds of trigger

KindWhat starts itExample
Something in TroopyAn event of a product of Troopy.A customer asks to cancel, and the Churn watcher drafts a check-in.
A webhookA request that another app sends to the URL of the trigger.GitHub opens an issue, and the Engineer reads it.

The events of Troopy

EventProduct
A user signs upCustomers
A customer starts a trialCustomers
A customer starts to payCustomers
A payment of a customer failsCustomers
A customer asks to cancelCustomers
A customer leavesCustomers
A customer comes backCustomers
A customer becomes at riskCustomers
A customer says somethingCustomers
A customer disputes a paymentDisputes
The bank decides a disputeDisputes
A reply to a campaign comesCampaigns
New mail comes to a shared mailboxEmail
A ticket goes liveEngineering

A teammate takes an event only when it has the tool that reads the record of the event. The form offers only those teammates. With none, it names the roles to hire.

The apps that send webhooks

SenderWho makes the secret
A URL alone, for Zapier, Make, n8n, forms and your own scriptsNo secret. The URL is the secret, so keep it private.
GitHubTroopy makes the secret, and you put it into GitHub.
StripeStripe makes the signing secret, and you give it to Troopy.
ShopifyYour Shopify app has a client secret, and you give it to Troopy.
Standard WebhooksThe sending app makes the signing secret, and you give it to Troopy.
Your own code, with HMACTroopy makes the secret. Your code signs each request with it.

Make a trigger

  1. Start the form

    On Routines, select New routine, then When something happens.

  2. Say what starts it

    Under What starts it, pick Something in Troopy and the event, or a webhook and Who sends it.

  3. Pick the teammate

    Pick the Teammate that it starts. For an event of Troopy, the list shows the teammates that can read its record.

  4. Write the instructions

    Under What the teammate does with each event, write it like a brief: the goal, the steps, and where the result goes.

  5. Save

    Select Create routine. The page of the trigger opens.

More settings has Most tasks a day: a trigger starts 20 tasks in a day at first, and 200 at most. For a webhook, Only these fields keeps only some fields of each event for the teammate.

Set up the sender of a webhook

On the page of the trigger, Set up the sender gives the steps for its app.

  1. Select Copy the URL, and put the URL into the sending app.
  2. For GitHub or your own code, select Copy the secret, and put it into the app.
  3. For Stripe, Shopify or Standard Webhooks, copy the signing secret from the app. Add it under Signing secret.
  4. Select Test to send a test event. It starts the teammate for real.

Until a trigger has the secret that it needs, Troopy refuses each request to it.

What happens to an event

  1. Troopy checks the signature of the request, and keeps the event one time.
  2. The event goes on the task of the trigger that the teammate did not start yet. A task holds 10 events at most. More events start a new task.
  3. The teammate starts on the task. The brief holds your instructions, and the events show as material.

The words of an event come from outside Troopy. The teammate reads them as material, never as instructions. A person approves each call of that work: no standing rule does. See Stay in control of your troop.

Read the events of a trigger

Recent events on the page of the trigger lists each event, with what became of it:

What it showsWhat it means
The status of its taskThe event started work. Select it to open the task.
Not run: the routine was pausedThe trigger was paused when the event came.
Not run: the limit of the dayThe trigger already started its most tasks of the day.
Not runThe event started nothing. Select Run now to start it.

The page loads again every 5 seconds while an event is on its way to done.

Limits

LimitValue
Triggers in a workspace25
Requests to one trigger60 a minute
Requests to all the triggers of a workspace300 a minute
Size of a request256 KB
Events that a trigger keeps in a day500
Days that Troopy keeps an event30

An event of Troopy that is older than 48 hours starts nothing. An event from before the trigger was made starts nothing.

When a teammate leaves

A trigger whose teammate left the troop pauses. It shows in the last card of Routines, Without a teammate. Give the trigger to another teammate on its page, and switch it on again.

A teammate proposes a trigger

When you ask a teammate for one, it can propose a trigger for its own work. The proposal waits on Routines. An owner or admin approves it. The teammate never gets the URL or the secret.