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 capabilities, messages, subscriptions, and other account-related actions. Specifically, the "Disable Capability" operation disables a particular capability for a given user by their User ID and the capability's ID.
This node is beneficial in scenarios where automated management of user permissions or features is required within the Aigency platform. For example, disabling a capability could be used to restrict access to certain functionalities dynamically based on business logic or user status changes.
Practical example:
- Automatically disable a premium feature (capability) for a user when their subscription expires.
- Disable development mode capabilities during production deployments.
Properties
| Name | Meaning |
|---|---|
| User ID | The numeric identifier of the user for whom the capability will be disabled. |
| ID | The string identifier of the capability to disable. |
Output
The node outputs JSON data containing the result of the API call. The structure typically includes a result field with the response from the Aigency API. If an error occurs, the output JSON contains an error field describing the issue.
Example output JSON structure:
{
"result": {
// API-specific response details about the disabled capability
}
}
If the node encounters an error and is set to continue on failure, it outputs:
{
"error": "Error message describing what went wrong"
}
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 credentials 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 Aigency 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 (e.g., invalid user ID or capability ID), the node will throw an error unless "Continue On Fail" is enabled, in which case the error is returned in the output JSON.
- Network Issues: Connection failures to the API endpoint will cause errors; verify network connectivity and API URL correctness.
- Invalid Parameters: Providing incorrect types or missing required parameters (
userId,id) will cause the node to fail.
Links and References
- Aigency API Documentation (Assumed, as no direct link provided in code)
- n8n Documentation - Creating Custom Nodes