Hotmart Trigger icon

Hotmart Trigger

Recebe eventos da Hotmart via webhooks

Overview

The Hotmart Trigger node listens for webhook events sent by Hotmart, a digital product and subscription platform. It processes various types of notifications related to purchases, subscriptions, access to content, and payment statuses. This node is useful for automating workflows based on Hotmart events, such as sending confirmation emails after a purchase, updating CRM records when a subscription changes, or triggering marketing campaigns upon first access to a course.

The node supports three modes of operation:

  • Standard Mode: All events come through a single output. You can filter by a specific event or receive all events.
  • Smart Mode: Events are routed to multiple outputs, one per event type, allowing different workflow branches without additional conditional nodes.
  • Super Smart Mode: Further separates purchase approval events into single purchases, new subscriptions, and renewals, plus other event types, enabling highly granular workflow branching.

Practical examples include:

  • Sending personalized messages for new subscriptions vs. renewals.
  • Handling abandoned carts separately from completed purchases.
  • Reacting differently to chargebacks or refunds.
  • Tracking user progress in courses with "First Access" and "Module Completed" events.

Properties

Name Meaning
Como configurar este webhook na Hotmart? Clique aqui A notice with a link to Hotmart's official documentation on how to configure the webhook URL in Hotmart's dashboard.
Modo de Trigger Defines how incoming webhook data will be processed:
- Padrão (Uma Saída) = Standard mode with one output.
- Smart (Múltiplas Saídas) = Multiple outputs, one per event.
- Super Smart (Separa Assinaturas) = More detailed separation including subscription types.
Evento (Standard mode only) Selects which specific Hotmart event to process, e.g., Purchase Approved, Subscription Cancellation, First Access, etc. Choosing "Todos" receives all events.
Opções (Options) collection Collection of options:
- Path Customizado: Custom webhook path segment (default "hotmart").
- Modo de Resposta: How to respond to Hotmart ("Imediatamente", "Quando Último Nó Terminar", or "Usando Nó de Resposta").
- Código de Status da Resposta: HTTP status code for immediate response.
- Dados da Resposta: Response body for immediate response.
- Usar Token de Verificação: Enable validation of Hotmart token header.
- Token de Verificação: The expected token value for validation.
Personalizar Nomes das Saídas (Smart and Super Smart modes only) Whether to use custom short names for outputs instead of default long names.
Nome alternativo para: [EventName] (Smart and Super Smart modes only, shown if customizing outputs) Custom display names for each event output, e.g., "Aprovada" for Purchase Approved, "Assinatura" for new subscriptions, "PIX" for PIX payments, etc.

Output

The structure of the output depends on the selected trigger mode:

  • Standard Mode: Single output named "Webhook Data". Emits an array with one JSON object containing the full webhook payload plus metadata fields:

    • eventName: Human-readable event name.
    • eventType: Event code string.
    • eventCategory: Category like "purchase", "subscription", or "club".
    • receivedAt: ISO timestamp when event was received.
    • isSubscription: Boolean indicating if event relates to a subscription.
    • metadata: Contains the verification token and original headers.
  • Smart Mode: Multiple outputs, each corresponding to a specific event type (e.g., Purchase Approved, Purchase Complete, Subscription Cancellation). Each output emits an array with one JSON object structured similarly to standard mode but filtered by event type.

  • Super Smart Mode: Even more outputs, splitting Purchase Approved events into three separate outputs:

    • Single purchase
    • New subscription
    • Renewal subscription
      Plus outputs for other event types similar to Smart mode. This allows very fine-grained routing of events.

No binary data is emitted by this node.

Dependencies

  • Requires configuration of a webhook URL in Hotmart's dashboard pointing to the n8n webhook URL generated by this node.
  • Optionally requires a verification token configured both in Hotmart and in the node to validate incoming requests via the X-HOTMART-HOTTOK HTTP header.
  • No external API keys or credentials are required beyond the webhook setup and optional token.
  • No additional environment variables needed.

Troubleshooting

  • Token Validation Failure: If enabled, the node checks the X-HOTMART-HOTTOK header against the configured token. If they don't match, the node responds with HTTP 401 Unauthorized and logs "Token inválido". Ensure the token matches exactly between Hotmart and the node settings.

  • Unknown Event Error: If Hotmart sends an event not recognized by the node, it responds with HTTP 400 Bad Request and logs "Evento desconhecido". Verify that the event type is supported and correctly spelled.

  • Event Filtering in Standard Mode: If you select a specific event in standard mode, other events will be rejected with HTTP 400 and message "Evento não corresponde à inscrição". To receive all events, choose "Todos".

  • Webhook Not Triggering: Confirm the webhook URL is correctly set in Hotmart and that the node is active. Check activation messages in the node UI.

  • Response Mode Issues: Using "Quando Último Nó Terminar" or "Usando Nó de Resposta" modes delays the HTTP response until the workflow finishes or a response node runs. Use "Imediatamente" for faster acknowledgment recommended by Hotmart.

Links and References

Discussion