Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

This node, named "Ajax," is designed to interact with the Ajax API (version indicated in the code). Specifically, for the Employee Management resource and the Invites An Employee operation, it facilitates sending invitations to employees within a specified company. This can be useful in scenarios where an organization wants to programmatically invite new employees to join their system or platform by specifying their email and roles.

Practical examples include:

  • Automatically inviting new hires to the company's internal system after onboarding.
  • Managing employee access by assigning specific roles during the invitation process.
  • Integrating employee invitation workflows into larger automation pipelines.

Properties

Name Meaning
Company Id The unique identifier of the company to which the employee will be invited.
Additional Fields Optional fields to provide more details about the employee invitation:
- Email The email address of the employee to be invited.
- Role One or more roles assigned to the employee upon invitation. Possible roles include:
OWNER, SENIOR_CMS_ENGINEER, CMS_ENGINEER, HEAD_OF_INSTALLERS, INSTALLER, HEAD_OF_OPERATORS, OPERATOR, RAPID_RESPONSE_TEAM

Output

The node outputs JSON data representing the result of the invitation operation. This typically includes confirmation details such as whether the invitation was successfully sent, any identifiers related to the invited employee, and possibly status messages from the Ajax API.

If the node supports binary data output, it would generally relate to attachments or files returned by the API, but based on the provided code and properties, this node primarily deals with JSON responses.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the @digital-boss/n8n-designpatterns package for response-operation resolution and execution.
  • Uses internal backend modules for state management, HTTP client communication, and operation handling.
  • The node expects proper configuration of the Ajax API credentials within n8n.

Troubleshooting

  • Common Issues:

    • Missing or invalid API credentials will prevent successful communication with the Ajax API.
    • Providing an incorrect or empty Company Id will likely cause the invitation to fail.
    • Omitting the employee's email in additional fields may result in incomplete invitation data.
    • Assigning roles not recognized by the API could lead to errors or ignored role assignments.
  • Error Messages:

    • Authentication errors indicating invalid or missing API keys: Verify that the API key credential is correctly set up.
    • Validation errors related to required fields like Company Id or Email: Ensure all mandatory fields are filled.
    • API response errors due to invalid roles or malformed requests: Double-check the roles assigned and the structure of additional fields.

Links and References

Discussion