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 named "Aigency" allows interaction with the Aigency API, providing a variety of operations related to user messages, subscriptions, capabilities, and other user-related data management. Specifically, the "Add Message" operation enables users to add a message object to a session for a specified user.
This node is beneficial in scenarios where you want to programmatically manage user sessions and messages within the Aigency platform, such as logging chat messages, adding system or user-generated messages, or integrating messaging workflows into automation pipelines.
For example, you could use this node to:
- Add a new chat message to a user's session in a customer support chatbot.
- Log system notifications or alerts as messages associated with a user session.
- Automate message insertion based on external triggers or events.
Properties
| Name | Meaning |
|---|---|
| User ID | The numeric identifier of the user for whom the message is being added. |
| Session ID | The string identifier of the session to which the message will be added. |
| Message (JSON) | A JSON object representing the message to add. It must include at least content and type fields describing the message content and its type. |
Output
The output of the node is an array of JSON objects, each representing the result of the API call for each input item processed. For the "Add Message" operation, the output JSON contains the result field from the API response, which typically includes details about the added message or confirmation of success.
If an error occurs during the API call, the output JSON will contain an error field describing the issue, unless the node is configured to stop execution on failure.
The node does not output binary data.
Dependencies
- Requires access to the Aigency API endpoint.
- Requires an API key credential and the API URL, which can be provided either via n8n credentials configuration or environment variables (
AIGENCY_API_KEYandAIGENCY_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 throws an error indicating missing credentials. Ensure that the API key and URL are properly configured.
- API Errors: If the API returns an error, it will be included in the output JSON under the
errorfield. Common causes include invalid user IDs, session IDs, or malformed message JSON. - Network Issues: Connectivity problems to the API URL will cause failures; verify network access and correct API URL.
- Invalid Message Format: The message property must be a valid JSON object containing required fields like
contentandtype. Invalid JSON or missing fields may cause API errors.
Links and References
- Aigency API Documentation (hypothetical link, replace with actual if available)
- n8n Documentation - Creating Custom Nodes
- JSON-RPC 2.0 Specification: https://www.jsonrpc.org/specification