Send Keycloak Email icon

Send Keycloak Email

Send a reset password email in Keycloak

Overview

This node sends an email to a specified user in Keycloak to trigger a predefined action, such as resetting the user's password. It is useful in scenarios where automated user management workflows require sending emails for account recovery or other user actions managed by Keycloak.

For example, you can use this node to automatically send a password reset email to users who request it through a form, or as part of an administrative workflow that triggers specific user actions via email notifications.

Properties

Name Meaning
User ID The identifier of the user in Keycloak to whom the email will be sent.
Add Result to Output Field The name of the field in each output item where the result of the email action will be stored.
Realm The Keycloak realm under which the target user resides.
Default Action The default action to trigger in the email. Currently supports only "UPDATE_PASSWORD".
Get Action Into Field of Each Row The name of the input field from which to get the action for the email on a per-row basis. If empty, the default action is used.
Active Token An optional token for authenticating with Keycloak. If not provided, the node attempts to obtain one using credentials.

Output

The node outputs the original input data augmented with an additional field (if specified) containing the result of the email action for each item. This result field includes:

  • result: Boolean indicating success (true) or failure (false) of the email sending.
  • message: A short message describing the outcome ("Email send" or "Email not send").
  • reason: If the email was not sent, this contains the error message explaining why.
  • data: On success, contains any response data returned from the Keycloak API.

No binary data is produced by this node.

Dependencies

  • Requires access to a Keycloak server with appropriate admin API permissions.
  • Needs an API authentication token for Keycloak, either provided directly via the "Active Token" property or obtained using client credentials configured in the node's credentials.
  • The node uses the Keycloak Admin REST API endpoint /admin/realms/{realm}/users/{userId}/execute-actions-email to trigger the email action.

Troubleshooting

  • Token is empty error: Occurs if no valid authentication token is available and the node cannot obtain one using client credentials. Ensure that either an active token is provided or client credentials (client ID and secret) are correctly configured.
  • Email not sent with reason: The node captures errors from the Keycloak API and reports them in the output field. Common causes include invalid user IDs, incorrect realm names, insufficient permissions, or network issues.
  • No action found: If neither the default action nor a per-row action is specified, the node will not send an email and will report this in the output field.
  • Verify that the realm and user IDs are correct and that the Keycloak server URL is reachable.

Links and References

Discussion