Actions109
- Activity Actions
- Assets Actions
- Authentication Actions
- Collections Actions
- Extensions Actions
- Fields Actions
- Files Actions
- Folders Actions
- Items Actions
- Permissions Actions
- Presets Actions
- Relations Actions
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
- Webhooks Actions
Authentication → Reset Password
AI-generatedOverview
The Directus (DrWade) n8n node for the resource Authentication and operation Reset Password allows you to reset a user's password in a Directus instance using a one-time JWT token. This is typically used as part of a password recovery or reset workflow, where a user has requested a password reset and received a token via email.
Common scenarios:
- Automating password reset flows for users who have forgotten their passwords.
- Integrating Directus authentication with custom user management or support systems.
- Building self-service password reset features in customer portals.
Practical example:
A user requests a password reset on your website. Your system sends them an email with a reset link containing a JWT token. The user clicks the link, enters a new password, and this node is triggered to update their password in Directus using the provided token and new password.
Properties
| Name | Type | Meaning |
|---|---|---|
| Token | String | One-time use JWT token that verifies the user. Required for resetting the password. |
| Password | String | The new password to set for the user. |
| JSON/RAW Parameters | Boolean | If true, allows passing all body parameters as raw JSON; otherwise, uses individual fields. |
| Body Parameters | JSON | (Used only if "JSON/RAW Parameters" is true) Raw JSON object with body parameters for the request. |
Output
- The output will be a single item with a
jsonfield containing the response from the Directus API. - The structure of the
jsonfield depends on the Directus API's response for the password reset endpoint (auth/password/reset). Typically, it may include status information or confirmation of the password reset. - Example output:
{ "json": { // Directus API response, e.g., "data": { /* ... */ } } } - No binary data is produced by this operation.
Dependencies
- External Service: Requires access to a running Directus instance.
- API Credentials: Needs valid Directus API credentials configured in n8n under the name
directusApi. - Environment: The Directus instance must have password reset functionality enabled and properly configured (e.g., email sending).
Troubleshooting
Common issues:
- Invalid or expired token: If the JWT token is invalid or has expired, the API will reject the request. Ensure the token is current and matches what was sent to the user.
- Weak password: If the new password does not meet Directus's password policy, the API may return an error.
- Missing required fields: Both "Token" and "Password" are required unless using raw JSON mode.
Error messages and resolutions:
"Token is invalid or expired": Obtain a fresh reset token and try again."Password does not meet requirements": Use a stronger password that meets Directus's policy."Missing required parameter": Ensure all required fields are filled or correctly structured in the JSON body.