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 by the bundled version import). It supports multiple resources and operations, including user management. Specifically, for the User resource and the Create New User operation, it allows creating a new user in the Ajax system by providing necessary user details such as login, password hash, phone number, first name, language, agreement version, and phone validation type.

Common scenarios where this node is beneficial include:

  • Automating user onboarding workflows by programmatically creating users in the Ajax system.
  • Integrating Ajax user management into broader automation pipelines.
  • Synchronizing user data from other systems into Ajax.

Practical example:

  • When a new employee joins a company, an automation workflow can trigger this node to create their user account in Ajax with all required details, ensuring immediate access and compliance with agreements.

Properties

Name Meaning
Login The unique login identifier for the new user.
Password Hash The hashed password string for the user's authentication.
Phone The user's phone number, used for contact and verification.
First Name The user's first name.
Language The preferred language setting for the user interface or communications.
Agreement Version Numeric version of the user agreement that the user has accepted.
Phone Validation Type Method to validate the user's phone number; options are CALL or SMS.

Output

The node outputs JSON data representing the result of the user creation operation. This typically includes confirmation of the created user’s details or any relevant response data from the Ajax API indicating success or failure.

If the node supports binary data output, it would relate to any files or media returned by the Ajax API, but based on the provided code and properties, the primary output is structured JSON data about the created user.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the external Ajax API service being available and reachable.
  • Uses internal helper classes for HTTP communication, state management, and operation resolution/execution.
  • Requires proper configuration of the node's credentials within n8n to connect securely to the Ajax API.

Troubleshooting

  • Authentication errors: If the API key credential is missing or invalid, the node will fail to authenticate. Ensure the correct API key is configured.
  • Validation errors: Missing required fields like login, password hash, or phone will cause the operation to fail. Verify all required inputs are provided.
  • Phone validation issues: If the phone validation type is not correctly set to either CALL or SMS, the API may reject the request.
  • Network issues: Connectivity problems to the Ajax API endpoint will cause execution failures. Check network settings and API availability.
  • API version mismatch: Using incompatible versions of the Ajax API might lead to unexpected errors. Confirm the node version matches the API version.

Links and References

Discussion