# platforma Trigger pentrun8n

Nodul **Platform Trigger** inițiază un flux de lucrun8natunci când are loc un eveniment subscris al platformei.

## Requirements

- platformaAPIcredențiale cu acces la organizația selectată și permisiunea de a gestiona abonamentele webhook. - Un URL webhook de producție pe care platforma poate ajunge prin HTTPS. - Configurarea corectă a webhook-ului public înn8n, mai ales atunci cândn8nrulează în spatele unui proxy invers.

## How it works

Când activați un flux de lucru care include platforma Trigger:

1. The node creates a webhook subscription in the platform for the selected organization and events.
2. the platform delivers signed `POST` requests to the node's webhook URL.
3. The node verifies the HMAC-SHA256 signature and timestamp freshness by
   default.
4. The workflow runs with the webhook payload as its input item.
5. When you deactivate the workflow, the node deletes the subscription.

Dacă organizația, evenimentele selectate sau URL-ul webhook se modifică, nodul elimină abonamentul static și creează un abonament corespunzător în timpul activării.

## Configuration

| Field                             | Description                                                                                                                 |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Organization ID**               | Organization that emits the events                                                                                          |
| **Events**                        | One or more event types to subscribe to                                                                                     |
| **Verify Signature**              | Reject deliveries with a missing or invalid HMAC signature; enabled by default                                              |
| **Timestamp Tolerance (Seconds)** | Reject deliveries outside this past-or-future window; defaults to `300`. Set to `0` only to disable freshness checking.      |

Credențialele folosesc aceeași [platformaAPIcredențiale] (/docs/developers/api/n8n/autentificare) ca nodul de acțiune.

:::cauză Păstrați activată verificarea semnăturilor. Dezactivarea permite oricărui sistem care cunoaște URL-ul webhook să înceapă fluxul de lucru.O semnătură valabilă fără o toleranță la timestamp poate fi, de asemenea, redată. :::

## Supported events

platforma Trigger acceptă același set de evenimente ca și abonamentele webhook, inclusiv:

- Third party created / updated / deleted
- User created / updated / deleted
- Obligation created / updated / deleted
- Rights request created / updated / deleted
- Document created / updated / archived / unarchived / deleted
- Document version created / updated / published / rejected / deleted
- Document version signature requested / signed / cancelled
- Document version approval quorum requested / updated / approved / rejected / voided

Consultați încărcăturile complete în format fir în [Tipuri de evenimente Webhook](/docs/developers/api/webhooks/event-types).

## Output

Fiecare executare a declanșatorului produce întregul corp JSON al webhook-ului – învelișul rădăcină plus câmpurile de resurse încorporate:

| Root field       | Description                                                         |
| ---------------- | ------------------------------------------------------------------- |
| `eventId`        | Unique delivery identifier (good idempotency key)                   |
| `subscriptionId` | Webhook subscription ID                                             |
| `organizationId` | Organization ID                                                     |
| `eventType`      | Event type (e.g. `document:updated`)                                |
| `createdAt`      | Event timestamp                                                     |
| `data`           | Current entity payload (resource fields live here, not at the root) |
| `updatedFrom`    | Present on `*:updated` events — entity snapshot before the change   |

the platform also sends HTTP headers such as `X-Probo-Webhook-Event`, `X-Probo-Webhook-Organization-Id`, `X-Probo-Webhook-Timestamp`, `X-Probo-Webhook-Signature`, and `X-Probo-Webhook-Host`. The Trigger node uses the signature headers for verification; workflow expressions typically read the body root fields above. See [Webhooks Overview](/docs/developers/api/webhooks/overview) for the full header/root field reference.

Example expressions:

```text
{{ $json.eventType }}
{{ $json.organizationId }}
{{ $json.updatedFrom.membership.role }}
{{ $json.data.membership.role }}
```

## Quickstart

1. **Add the platform Trigger** to a new workflow.
2. **Select credentials** and set the **Organization ID**.
3. **Choose events**, for example `Document Version Signature Signed`.
4. **Add downstream nodes** that use `$json.data` (and `$json.updatedFrom` for updates).
5. **Activate the workflow**. The node registers the production webhook
   subscription automatically.

## Build reliable event workflows

- Filter on `eventType` before accessing event-specific fields under `data`.
- Check that optional fields exist. `updatedFrom` is present only for update
  events.
- Use `eventId` as an idempotency key before creating an external side effect.
- Keep the workflow response fast. The trigger acknowledges the webhook before
  downstream execution.
- Configure an n8n error workflow for downstream failures. the platform does not retry
  failed webhook deliveries.

## Troubleshooting

| Symptom                                   | Check                                                                                                   |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Activation cannot create the subscription | `v1:webhook` scope, user permissions, organization ID, and n8n's configured production webhook URL     |
| the platform cannot deliver                      | Public DNS, HTTPS certificate, reverse proxy, firewall, and the subscription's endpoint URL             |
| Delivery returns `403`                    | Signature verification state, server clocks, and whether the subscription was recreated after a change |
| Workflow receives no selected event       | The workflow is active and the event belongs to the selected organization and event set                 |
| Duplicate downstream action               | Deduplicate with `eventId` and review manual or error-workflow retries                                  |

Dacăn8ns-a mutat la o nouă adresă URL publică, dezactivați și reactivați fluxul de lucru, astfel încât nodul să poată înlocui vechea abonament.

## Related

- [Webhook overview](/docs/developers/api/webhooks/overview) — Revizuirea ambalajului, a titlurilor și a comportamentului de livrare - [Tipuri de evenimente](/docs/developers/api/webhooks/event-types) — Inspectați câmpurile de sarcină utilă pentru fiecare eveniment acceptat