Aigency icon

Aigency

Interact with Aigency API

Overview

The node named "Aigency" allows interaction with the Aigency API, providing a wide range of operations related to user messages, subscriptions, capabilities, and other user-related data. The specific operation "Get Next Scan" (internally called getNextScanOfSubscriptions) retrieves information about the next scheduled scan for a user's subscriptions.

This node is useful in scenarios where you want to automate or monitor subscription scans for users within the Aigency platform. For example, you might use it to check when the next scan will occur for a given user’s subscriptions to trigger further processing or notifications.

Properties

Name Meaning
User ID The numeric identifier of the user for whom the next scan of subscriptions is requested.

Output

The output JSON contains the result returned by the Aigency API for the "Get Next Scan" operation. It typically includes details about the next scheduled scan time or related metadata for the user's subscriptions.

Example structure (simplified):

{
  "nextScan": "2024-06-01T12:00:00Z",
  "subscriptionsCount": 5,
  "details": { /* additional info about the scan */ }
}

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 n8n credentials configuration or environment variables (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 response, the node either throws an error or continues on fail depending on the node settings. Check the error message for details such as invalid user ID or network issues.
  • Invalid User ID: Providing an incorrect or non-existent user ID may cause errors or empty results.
  • Network Issues: Connectivity problems to the API URL will cause failures; verify network access and API endpoint correctness.

Links and References

Discussion