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, allowing users to perform various operations related to user data and capabilities. Specifically, the "Get Balance" operation retrieves the balance information for a specified user ID. This node is useful in scenarios where you need to programmatically check a user's balance within the Aigency platform, such as in financial applications, reward systems, or usage tracking.
Practical example:
- An automation workflow that checks a user's balance before allowing them to make a purchase or access premium features.
Properties
| Name | Meaning |
|---|---|
| User ID | The numeric identifier of the user whose balance you want to retrieve. |
Output
The output JSON contains the result of the "Get Balance" operation from the Aigency API. It typically includes the balance details associated with the specified user ID. If an error occurs, the output will contain an error field describing the issue.
Example output structure:
{
"balance": 123.45,
"currency": "USD",
"userId": 789
}
(Note: The exact fields depend on the Aigency API response.)
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 configured either in the n8n Web interface or via 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: If the API key or URL is not set, the node will throw an error instructing to configure these credentials either in the UI or environment variables.
- API Errors: If the API returns an error (e.g., invalid user ID, unauthorized access), the node will either throw an error or continue with an error object in the output depending on the "Continue On Fail" setting.
- Connection Issues: Network problems or incorrect API URLs will cause connection failures; verify the API URL and network accessibility.
- Invalid User ID: Ensure the User ID is a valid number and corresponds to an existing user in the Aigency system.
Links and References
- Aigency API Documentation (Replace with actual URL if available)
- n8n Documentation - Creating Custom Nodes