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 new user to an existing account by specifying their email, role, and optionally their first and last names. It is useful in scenarios where you need to programmatically manage team members or collaborators within an account, such as adding administrators, accountants, or employees to your business account system.

Practical examples include:

  • Automatically inviting new employees to the company account when they are onboarded.
  • Adding accounting personnel with specific permissions to handle financial data.
  • Managing user roles dynamically based on workflow conditions.

Properties

Name Meaning
Account Id Identifier of the account to which the user will be invited.
Email Email address of the user to invite to the account.
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 and the status of the invitation. 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 authenticating requests to the external service managing accounts and users.
  • The node expects the base URL and authentication token to be configured in the credentials setup.
  • The operation sends HTTP requests with JSON payloads to the external API endpoint responsible for user invitations.

Troubleshooting

  • Common issues:
    • Invalid or missing Account Id can cause the invitation to fail.
    • Providing an improperly formatted email address may result in validation errors.
    • Insufficient permissions associated with the API key might prevent user invitations.
  • Error messages:
    • "Account not found" indicates the specified Account Id does not exist or is inaccessible.
    • "Invalid email format" means the email property does not meet expected standards.
    • "Unauthorized" or "Forbidden" suggests issues with API credentials or permissions.
  • Resolutions:
    • Verify that the Account Id is correct and accessible.
    • Ensure the email address is valid and properly formatted.
    • Check that the API key has sufficient rights to invite users.

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 using HTTP request nodes for similar integrations.

Discussion