Aigency icon

Aigency

Interact with Aigency API

Overview

The node interacts with the Aigency API, providing a variety of operations related to user messages, subscriptions, capabilities, and other user-related data. Specifically, the "Scan Subscriptions" operation triggers a scan of the user's subscriptions via the API.

This node is useful in scenarios where you want to programmatically manage or query user data within the Aigency platform, such as scanning for updates in subscriptions, managing messages, or retrieving user-specific information.

Practical example: You might use the "Scan Subscriptions" operation to refresh or update the list of active subscriptions for a given user, ensuring your workflow has the latest subscription data from Aigency.

Properties

Name Meaning
User ID The numeric identifier of the user whose subscriptions are to be scanned. This is required.

Output

The output is an array of JSON objects representing the result returned by the Aigency API for the "scanSubscriptions" method. Each item corresponds to the API response for one input item processed.

  • The json field contains the API response's result object.
  • If an error occurs during the API call, the output will contain an error field describing the issue.
  • The node does not output binary data.

Dependencies

  • Requires access to the Aigency API endpoint.
  • Requires an API key credential and API URL, which can be provided either through n8n credentials configuration or environment variables (AIGENCY_API_KEY and AIGENCY_API_URL).
  • Uses HTTP POST requests with JSON-RPC 2.0 protocol 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 configured properly.
  • API Errors: If the API returns an error, it will be included in the output unless "Continue On Fail" is disabled, in which case the node execution stops with an error.
  • Invalid User ID: Providing an invalid or non-existent user ID may cause the API to return errors.
  • Network Issues: Connectivity problems to the API URL will cause failures; verify network access and correct API URL.
  • Incorrect Operation: Using an unsupported operation value will cause errors; ensure the operation is set to "scanSubscriptions" for this context.

Links and References

Discussion