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
The node interacts with the Aigency API, providing various operations to manage user messages, subscriptions, capabilities, and other related data. Specifically, the Get Messages operation retrieves a list of messages for a specified user session, supporting pagination through limit and offset parameters.
This node is useful in scenarios where you want to programmatically access or manipulate user-related data within the Aigency platform, such as fetching chat history, managing subscriptions, or querying user capabilities.
Example use case:
You want to fetch the latest 50 messages from a user's session to display in a custom dashboard or to process them further in an automation workflow.
Properties
| Name | Meaning |
|---|---|
| User ID | The numeric identifier of the user whose messages are being retrieved. |
| Limit | Maximum number of message results to return (minimum 1). |
| Offset | Number of messages to skip before starting to collect the result set (for pagination). |
| Session ID | Identifier of the user session from which to retrieve messages. |
Output
The output is an array of JSON objects representing the messages retrieved from the Aigency API. Each item in the output corresponds to one message or an error object if the request failed for that item.
- The
jsonfield contains the message data returned by the API under theresultkey. - If an error occurs and the node is configured to continue on failure, the
jsonfield will contain anerrorproperty 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 provided either via n8n credentials configuration or environment variables named
AIGENCY_API_KEYandAIGENCY_API_URL. - The node uses HTTP POST requests with JSON-RPC 2.0 format to communicate with the API.
Troubleshooting
Missing Credentials Error:
If neither credentials nor environment variables are set, the node throws an error indicating missing credentials. Ensure you configure the API key and URL properly.API Errors:
If the API returns an error response, it will be surfaced in the node output. Common causes include invalid user IDs, session IDs, or exceeding rate limits. Check the error message for details.Pagination Issues:
Using incorrectlimitoroffsetvalues may result in empty or incomplete message lists. Make surelimitis at least 1 andoffsetis non-negative.Network or Authorization Failures:
Connection issues or invalid API keys will cause the node to fail. Verify network connectivity and API credentials.
Links and References
- Aigency API Documentation (Replace with actual URL if available)
- n8n Documentation - Creating Custom Nodes