Aigency icon

Aigency

Interact with Aigency API

Overview

The node interacts with the Aigency API, providing various operations related to user data management and messaging. Specifically, the "Delete All Warnings" operation removes all warning records associated with a specified user ID. This can be useful in scenarios where an administrator or system needs to clear accumulated warnings for a user, such as after resolving issues or resetting user status.

Practical example: An admin wants to clear all warnings for a user who has resolved their previous infractions, ensuring the user's profile is clean moving forward.

Properties

Name Meaning
User ID The unique numeric identifier of the user whose warnings are to be deleted.

Output

The output is a JSON object containing the result of the "Delete All Warnings" operation. It typically includes confirmation that the warnings were deleted or an error message if the operation failed.

Example structure:

{
  "result": {
    // Operation-specific response details confirming deletion
  }
}

If an error occurs, the output JSON will contain an error field describing the issue.

Dependencies

  • Requires an API key credential and API URL for authenticating requests to the Aigency API.
  • These credentials must be configured either in the n8n credentials interface or provided via environment variables named 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 API key and URL are properly configured.
  • API Errors: If the API returns an error (e.g., invalid user ID, network issues), the node outputs the error message. Check the user ID validity and network connectivity.
  • Continue on Fail: If enabled, the node continues processing subsequent items even if one fails, returning error details in the output JSON.

Links and References

Discussion