Actions35
- Add Message
- Add Subscription
- Call Capability
- Delete All Memories
- Delete All Messages
- Delete All Warnings
- Delete Last Messages
- Delete Memory
- Delete Message
- Disable Capability
- Disable Dev Mode
- Disable Subscription
- Enable Capability
- Enable Dev Mode
- Enable Subscription
- Get Balance
- Get Capabilities
- Get Current User
- Get Dev Mode
- Get File URL
- Get Memories
- Get Messages
- Get Next Scan
- Get Reward Amount
- Get Subscriptions
- Get Usage History
- Get Warnings
- Login
- Logout
- Remove Capability
- Remove Subscription
- Scan Subscriptions
- Send Message
- Sync Capabilities
- Throw Error
Overview
This node integrates with the Aigency API, allowing users to perform various operations related to user messages, subscriptions, capabilities, and other account-related actions. Specifically, the "Delete All Messages" operation deletes all messages associated with a given user and session.
Common scenarios for this node include managing user data in applications that use Aigency services, such as cleaning up message histories, managing subscriptions, or interacting with user capabilities programmatically.
For example, the "Delete All Messages" operation can be used to clear a user's entire message history within a session, which might be useful for privacy compliance, resetting conversation states, or administrative cleanup tasks.
Properties
| Name | Meaning |
|---|---|
| User ID | The numeric identifier of the user whose messages are to be deleted. |
| Session ID | The string identifier of the session from which all messages will be deleted. |
Output
The output is a JSON object containing the result of the delete operation. If successful, it typically contains confirmation details from the Aigency API about the deletion. In case of failure, an error object with a descriptive message is returned.
No binary data output is produced by this operation.
Example output JSON structure:
{
"result": {
// Details confirming deletion, varies based on API response
}
}
If an error occurs:
{
"error": "Error message describing what went wrong"
}
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_KEYandAIGENCY_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 in n8n.
- API Errors: If the API returns an error (e.g., invalid user ID, session ID, or network issues), the node either throws an error or continues on fail depending on the workflow settings.
- Invalid Input: Ensure that the User ID is a valid number and Session ID is a non-empty string; otherwise, the API may reject the request.
- Network Issues: Connectivity problems to the Aigency API endpoint will cause failures; verify network access and API availability.
Links and References
- Aigency API Documentation (Assumed link, replace with actual if available)
- n8n Documentation on Creating Custom Nodes