Aigency icon

Aigency

Interact with Aigency API

Overview

The node interacts with the Aigency API, allowing users to perform various operations related to user messages, subscriptions, capabilities, and other account-related actions. Specifically, the "Enable Subscription" operation activates a subscription for a given user by their User ID and subscription ID.

This node is beneficial in automation workflows where managing user subscriptions programmatically is required, such as enabling or disabling user access to services, managing messaging subscriptions, or controlling capabilities dynamically based on external triggers.

Example use case: Automatically enable a subscription for a user after they complete a payment process, ensuring their access is activated without manual intervention.

Properties

Name Meaning
User ID The numeric identifier of the user for whom the subscription will be enabled.
ID The string identifier of the subscription to enable for the specified user.

Output

The node outputs JSON data containing the result of the API call. The structure is:

{
  "result": { ... }
}
  • The result field contains the response from the Aigency API for the requested operation.
  • If an error occurs, the output JSON will contain an error field describing the issue.
  • The node does not output binary data.

Dependencies

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

Troubleshooting

  • Missing Credentials: If neither environment variables nor configured credentials are found, the node throws an error indicating missing credentials. Ensure that the API key and URL are properly set.
  • API Errors: If the API returns an error, it is passed through the node's output. Users can enable "Continue On Fail" to handle errors gracefully.
  • Invalid Parameters: Providing incorrect or missing parameters like User ID or subscription ID may cause API errors.
  • Network Issues: Connectivity problems to the API URL will result in request failures; verify network access and API endpoint availability.

Links and References

Discussion