> For the complete documentation index, see [llms.txt](https://docs.abby.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abby.fr/sans-code-make/declencheurs.md).

# Déclencheurs

Un déclencheur commence à exécuter un scénario immédiatement après qu'une application ou un service donné ait envoyé des informations à Make sur un événement qui s'est produit.

Un déclencheur lance un scénario Make quand un évènement se produit dans Abby : un projet ou une tâche est créé, modifié ou supprimé.

![Exemple de déclencheur (un message est créé sur Slack quand l'utilisateur reçoit un message sur son téléphone).](https://3592603466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE3yh13Zh33m4NDXb9TTQ%2Fuploads%2FaqbYf2GPbOipIeHE6cbC%2Fimage.png?alt=media\&token=db649d41-f64c-4274-9d97-4caa7f44c957)

## Ajouter un déclencheur Abby

1. Ajoutez le module "Nouvel évènement" dans votre scénario

![](https://3592603466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE3yh13Zh33m4NDXb9TTQ%2Fuploads%2FvQEOMlUSR9OxZBBMkImO%2Fimage.png?alt=media\&token=a84e68d7-c563-480c-a4ed-46d31dc81f27)

2. Cliquez sur "Add" puis sélectionnez un évènement dans la liste déroulante.

<figure><img src="https://3592603466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE3yh13Zh33m4NDXb9TTQ%2Fuploads%2FfAYobr8QBP1nuH0Wugsq%2FCapture%20d%E2%80%99e%CC%81cran%202025-01-03%20a%CC%80%2017.05.42%201.png?alt=media&amp;token=376b23d0-f5e1-45cf-8237-c14156644ff2" alt="" width="563"><figcaption></figcaption></figure>

3. Connectez votre évènement à une autre action

![Envoyer un e-mail avec Gmail lorsqu'un évènement Abby survient](https://3592603466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE3yh13Zh33m4NDXb9TTQ%2Fuploads%2FydctK6TeZqiRtMjdK074%2Fimage.png?alt=media\&token=19880b37-d14f-4b86-8fa6-db5134eed0fa)

### Choisir un évènement

Les six évènements correspondent aux webhooks `opportunity.*` (projets) et `task.*` (tâches) d'Abby. Abby envoie à Make un corps JSON de la forme `{ "type": "<évènement>", "data": ... }`.

Un évènement part quand l'opération correspondante est exécutée sur l'API d'Abby, pour l'entreprise connectée.

| Déclencheur     | Évènement (`type`)    | Contenu de `data`                   |
| --------------- | --------------------- | ----------------------------------- |
| Projet créé     | `opportunity.created` | Le projet créé                      |
| Projet modifié  | `opportunity.updated` | Le projet modifié                   |
| Projet supprimé | `opportunity.deleted` | L'identifiant du projet supprimé    |
| Tâche créée     | `task.created`        | La tâche créée                      |
| Tâche modifiée  | `task.updated`        | La tâche modifiée                   |
| Tâche supprimée | `task.deleted`        | L'identifiant de la tâche supprimée |

Un projet est une opportunité dans l'API. Voir [Opportunités](https://docs.abby.fr/reference-de-lapi/opportunites.md) et [Tâches](https://docs.abby.fr/reference-de-lapi/taches.md).

<details>

<summary>Projet créé, modifié</summary>

`data` est le projet, tel que la route de l'API le renvoie (`ReadOpportunityDto`). Les champs ci-dessous sont ceux des routes `/v2/opportunity`. Les anciennes routes `/opportunity` (dépréciées) renvoient une forme un peu différente (`LegacyReadOpportunityDto`) :

```json
{
  "type": "opportunity.created",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": 1700000000,
    "name": "New Project Lead",
    "description": "Potential client interested in our services",
    "dueDate": 1700000000,
    "amount": 100000,
    "rank": "0|hzzzzz:",
    "customerId": "507f1f77bcf86cd799439011",
    "categoryId": "123e4567-e89b-12d3-a456-426614174000",
    "category": { "...": "catégorie du projet" },
    "customer": { "...": "client du projet" }
  }
}
```

`createdAt` et `dueDate` sont des timestamps Unix, `amount` est en centimes. Pour `opportunity.updated`, seul `type` change. `opportunity.updated` part aussi quand une catégorie de projets est supprimée : un évènement est envoyé pour chaque projet déplacé vers une autre catégorie. Les exemples de valeurs viennent de la spécification OpenAPI. Les champs de `category` et `customer` sont décrits dans [Opportunités](https://docs.abby.fr/reference-de-lapi/opportunites.md).

</details>

<details>

<summary>Projet supprimé</summary>

`data` est l'identifiant du projet supprimé, sans autre champ.

```json
{
  "type": "opportunity.deleted",
  "data": "<identifiant du projet>"
}
```

</details>

<details>

<summary>Tâche créée, modifiée</summary>

`data` est la tâche, telle que la route de l'API la renvoie (`ReadTaskDto`). Champs obligatoires : `id`, `companyId`, `name`, `description`, `priority`, `rank`, `opportunityRank`, `dateRank`, `createdAt`, `updatedAt`. Champs facultatifs : `customerId`, `customer`, `dueDate`, `opportunityId`, `opportunity`, `doneAt`, `deletedAt`.

```json
{
  "type": "task.created",
  "data": { "id": "...", "companyId": "...", "name": "...", "...": "voir Tâches" }
}
```

Pour `task.updated`, seul `type` change. Le détail des champs est dans [Tâches](https://docs.abby.fr/reference-de-lapi/taches.md).

</details>

<details>

<summary>Tâche supprimée</summary>

`data` est l'identifiant de la tâche supprimée, sans autre champ.

```json
{
  "type": "task.deleted",
  "data": "<identifiant de la tâche>"
}
```

</details>

Cette page liste les six évènements pour lesquels l'envoi est établi. Elle ne décrit aucun déclencheur de facture ou de devis.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.abby.fr/sans-code-make/declencheurs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
