Aigency icon

Aigency

Interact with Aigency API

Overview

This node integrates with the Aigency API, allowing users to perform various operations related to user data and messaging within the Aigency platform. The "Get Warnings" operation specifically retrieves warning records associated with a given user. This can be useful for monitoring user behavior, compliance checks, or alerting systems that need to react to warnings issued to users.

Practical examples include:

  • Fetching recent warnings for a user to display in an admin dashboard.
  • Automating follow-up actions when a user receives certain types of warnings.
  • Integrating with other workflows that require knowledge of user warnings for decision-making.

Properties

Name Meaning
User ID The numeric identifier of the user whose warnings are being retrieved.
Limit Maximum number of warning records to return (minimum value is 1).
Offset Number of warning records to skip before starting to collect the results (for pagination).

Output

The output is a JSON object containing the result of the "Get Warnings" API call. It typically includes an array of warning entries related to the specified user, respecting the limit and offset parameters.

Example structure of the json output field:

{
  "result": [
    {
      "warningId": "string",
      "userId": number,
      "message": "string",
      "timestamp": "ISO8601 datetime string",
      ...
    },
    ...
  ]
}

If the node encounters an error during the API call, it outputs a JSON object with an error field describing the issue.

The node does not output binary data.

Dependencies

  • Requires access to the Aigency API endpoint.
  • Needs an API key credential and API URL configured either via n8n credentials 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 will throw an error indicating missing credentials. Ensure API key and URL are properly configured.
  • API Errors: If the API returns an error (e.g., invalid user ID, rate limits), the node will either throw an error or continue on fail depending on the workflow settings.
  • Invalid Parameters: Providing non-numeric or missing required fields like User ID, Limit, or Offset may cause errors.
  • Network Issues: Connectivity problems to the API URL will result in failure; verify network access and API availability.

Links and References

Discussion