Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Accounts → Invite User To Account

AI-generated

Overview

This node operation allows you to invite a user to an existing account by sending an invitation email with a specified role and optional personal details. It is useful in scenarios where you need to programmatically add users to an account within a system, such as onboarding new team members or collaborators with defined access levels.

Practical examples include:

  • Automatically inviting new employees to a company account with the "Employee" role.
  • Adding accounting personnel to an account with restricted permissions.
  • Granting admin access to a partner or manager by sending them an invitation.

Properties

Name Meaning
Account Id Identifier of the account to which the user will be invited.
Email Email address of the user to invite.
Role Role assigned to the invited user. Options: Admin, Accounting, Employee.
First Name (Optional) First name of the invited user.
Last Name (Optional) Last name of the invited user.

Output

The node outputs JSON data representing the result of the invitation request. This typically includes confirmation details about the invited user or the status of the invitation process. The exact structure depends on the API response but generally contains fields like user ID, email, role, and invitation status.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authentication with the external service managing accounts and users.
  • The node uses HTTP requests with JSON payloads to interact with the external API.
  • Proper configuration of the base URL and authentication credentials in n8n is necessary.

Troubleshooting

  • Common issues:
    • Invalid or missing Account Id can cause the invitation to fail.
    • Incorrect or malformed email addresses may lead to errors or undelivered invitations.
    • Insufficient permissions associated with the API key might prevent user invitations.
  • Error messages:
    • "Account not found" indicates the provided Account Id does not exist or is inaccessible.
    • "Invalid email format" suggests the email property is not correctly formatted.
    • "Unauthorized" or "Forbidden" errors imply authentication or permission problems; verify API credentials and roles.
  • To resolve these, ensure all required properties are correctly set, validate email formats, and confirm that the API key has adequate permissions.

Links and References

  • Refer to the external API documentation for detailed information on user invitation endpoints and role definitions.
  • Consult n8n documentation on setting up API credentials and HTTP request nodes for further customization.

Discussion