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 "Disable Subscription" operation disables a subscription for a given user by their User ID and subscription ID.

This node is beneficial in automation workflows where managing user subscriptions dynamically is required, such as disabling access or notifications for specific users based on external triggers or conditions.

Example use case: Automatically disable a user's subscription when they cancel a service or fail payment, ensuring they no longer receive updates or content.

Properties

Name Meaning
User ID The numeric identifier of the user whose subscription you want to disable.
ID The string identifier of the subscription to be disabled for the specified user.

Output

The node outputs JSON data containing the result of the API call. The structure typically includes a result field with details about the success or failure of the disable subscription request. If an error occurs, the output JSON will contain an error field describing the issue.

No binary data output is produced by this operation.

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 directly in 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 (e.g., invalid user ID or subscription ID), the node will either throw an error or continue with error output depending on the "Continue On Fail" setting.
  • Network Issues: Connection failures or unreachable API endpoints will cause errors; verify network connectivity and correct API URL.
  • Invalid Parameters: Providing incorrect types or missing required parameters like User ID or ID will cause the API to reject the request.

Links and References

Discussion