Aigency icon

Aigency

Interact with Aigency API

Overview

The node interacts with the Aigency API to perform various user-related operations. Specifically, the "Delete Message" operation allows users to delete a specific message associated with a given user ID and message ID. This is useful in scenarios where you want to programmatically manage or clean up messages for users within the Aigency platform.

Practical examples include:

  • Automatically deleting outdated or irrelevant messages from a user's message history.
  • Managing message lifecycle in customer support or chatbot applications integrated with Aigency.
  • Removing sensitive or erroneous messages upon request.

Properties

Name Meaning
User ID The numeric identifier of the user whose message is to be deleted.
Message ID The string identifier of the specific message to delete for the given user.

Output

The output JSON contains the result of the delete operation returned by the Aigency API. Typically, this will confirm whether the deletion was successful or provide an error message if it failed.

Example output structure:

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

If the operation fails and "Continue On Fail" is enabled, the output will contain an error object like:

{
  "error": "Error message describing what went wrong"
}

No binary data is output by this node.

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 Aigency API.

Troubleshooting

  • Missing Credentials: If the API key or URL is not provided, the node throws an error instructing to set environment variables or configure credentials.
  • API Errors: If the API returns an error (e.g., invalid user ID or message ID), the node either throws an error or outputs the error in the JSON depending on the "Continue On Fail" setting.
  • Network Issues: Connection failures to the API endpoint will cause errors; ensure the API URL is reachable and correct.
  • Invalid Parameters: Providing incorrect types or missing required parameters (User ID, Message ID) will cause the node to fail.

Links and References

Discussion