Aigency icon

Aigency

Interact with Aigency API

Overview

This node integrates with the Aigency API, allowing users to perform various operations related to user management, messaging, subscriptions, capabilities, and more within the Aigency platform. Specifically, the "Disable Dev Mode" operation disables the developer mode for a specified user.

Common scenarios where this node is beneficial include automating user state changes, managing subscriptions or capabilities programmatically, sending messages, or retrieving user-related data from the Aigency system. For example, an automation workflow could disable developer mode for a user after certain conditions are met, such as completion of testing or deployment phases.

Properties

Name Meaning
User ID The numeric identifier of the user for whom the operation (e.g., disabling dev mode) is performed. This is required.

Output

The node outputs JSON data representing the result of the API call. For the "Disable Dev Mode" operation, the output JSON contains the result field with the response from the Aigency API indicating success or failure of the operation.

If an error occurs, the output JSON will contain an error field describing the issue.

No binary data output is produced by this operation.

Example output JSON structure:

{
  "result": {
    // API-specific response details about disabling dev mode
  }
}

or in case of error:

{
  "error": "Error message describing what went wrong"
}

Dependencies

  • Requires an API key credential and API URL for authenticating requests to the Aigency API.
  • These credentials can be configured either in the n8n credentials interface or via environment variables named AIGENCY_API_KEY and AIGENCY_API_URL.
  • The node uses HTTP POST requests with JSON-RPC 2.0 format to communicate with the API.

Troubleshooting

  • Missing Credentials: If neither credentials nor environment variables are set, the node throws an error indicating missing credentials. Ensure that the API key and URL are properly configured.
  • API Errors: If the API returns an error, it is either thrown as a node error or returned in the output JSON if "Continue On Fail" is enabled.
  • Invalid User ID: Providing an invalid or non-existent user ID may cause the API to return an error.
  • Network Issues: Connectivity problems to the API URL will cause request failures.

To resolve errors:

  • Verify API key and URL correctness.
  • Confirm the user ID exists in the Aigency system.
  • Check network connectivity and firewall settings.
  • Enable "Continue On Fail" to handle errors gracefully in workflows.

Links and References

Discussion