Dynamic Credential Webhook

Reçoit des credentials via webhook pour les utiliser dans le workflow

Overview

This node acts as a webhook trigger designed to receive dynamic credentials via HTTP POST requests. It is useful in scenarios where workflows need to be dynamically supplied with credentials at runtime, for example, when integrating with multiple Microsoft services and needing to update or inject credentials without manual intervention.

Practical examples include:

  • Receiving OAuth tokens or API keys from an external system and using them immediately within the workflow.
  • Automating credential rotation by pushing new credentials securely through the webhook.
  • Centralizing credential management by having a dedicated service send credentials to this node.

Properties

Name Meaning
Type de Credential The type of credential expected to be received. Options: Microsoft Graph, Microsoft Outlook OAuth2, Microsoft Entra OAuth2
Secret de validation Optional secret string used to validate incoming webhook requests to ensure authenticity

Output

The node outputs JSON data containing:

  • success: A boolean indicating if the credential was successfully received.
  • credentialType: The type of credential received (matches the selected input).
  • dynamicCredentials: An object with the following fields:
    • type: The credential type.
    • data: The actual credentials payload received in the webhook body.
    • timestamp: The time when the credentials were received.
    • id: A unique identifier generated for this credential instance.

This output can then be used downstream in the workflow to authenticate API calls or other operations requiring these credentials.

Dependencies

  • Requires an HTTP POST request to the configured webhook URL.
  • If the "Secret de validation" property is set, the incoming request must include a matching header x-webhook-secret for authentication.
  • No external API keys or additional n8n credentials are required beyond what is sent in the webhook payload.

Troubleshooting

  • Invalid secret error: If the webhook secret is set but the incoming request does not provide the correct x-webhook-secret header, the node will throw a 401 error with message "Le secret de validation est invalide". Ensure the secret matches exactly.
  • Missing credentials in request: If the webhook payload does not contain a credentials field, the node throws a 400 error with message "Aucun credential fourni dans le corps de la requête". Make sure the POST body includes a valid credentials object.
  • Payload format: The node expects the credentials inside the credentials property of the JSON body. Incorrect formatting will cause errors.
  • Security: Avoid exposing the webhook URL publicly without a secret to prevent unauthorized credential injection.

Links and References

Discussion