Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Overview

The node provides functionality to invite a new user by sending an invitation email. It is useful in scenarios where you want to programmatically add users to a system and control their roles and access via invitations. For example, an admin can automate inviting team members with specific roles without manually sending emails or managing user creation.

Properties

Name Meaning
Email The email address of the user to invite. This is required and specifies who will receive the invitation.
Role The role assigned to the invited user. This determines the permissions and access level the user will have once they accept the invitation.
Additional Fields Optional extra settings for the invitation:
- Invite URL: A custom URL that the invitation link will direct to, with the invite token appended as a parameter. Requires environment variable configuration to enable.

Output

The output JSON contains the result of the invitation operation, typically including details about the invited user and the status of the invitation (e.g., success confirmation, invitation token). If binary data were involved (not indicated here), it would represent files or attachments related to the invitation process.

Dependencies

  • Requires an API endpoint or service capable of handling user invitations.
  • Needs proper authentication credentials (such as an API key or token) configured in n8n to authorize the invitation request.
  • To use a custom invite URL, the environment variable USER_INVITE_URL_ALLOW_LIST must be set appropriately on the server side to whitelist allowed URLs.

Troubleshooting

  • Missing Required Fields: Errors may occur if the email or role fields are empty or invalid. Ensure these are correctly provided.
  • Invalid Role: Providing a non-existent or unauthorized role identifier may cause the invitation to fail.
  • Custom Invite URL Not Working: If using a custom invite URL, verify that the environment variable allowing this feature is properly configured; otherwise, the invite link may not function as expected.
  • Authentication Failures: Ensure that the API credentials used by the node are valid and have permission to send invitations.
  • Network Issues: Connectivity problems with the API endpoint can cause timeouts or failures.

Links and References

Discussion