Actions132
- AI Actions
- Extract Text From Document
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Extract Entities
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate JavaScript Code
- Generate Python Code
- Detect Language
- Detect Mood
- Extract Text From PDF
- Recognize Objects in Image
- Extract Text From Image
- Redact Sensitive Information From PDF
- Remove Background Image
- Summarize Text
- Transcribe
- Translate Text
- Image Actions
- Business Actions
- Convert Actions
- Generate Actions
- Crypto Actions
- Operator Actions
- Storage Actions
- Scheduler Actions
- Text Actions
- Chart Actions
- Code Actions
- Calculate Actions
- Date and Time Actions
- PDF Actions
- Compress PDF File
- Count PDF Pages
- Create Empty PDF
- Decrypt PDF
- Convert DOCX to PDF
- Draw Image on PDF
- Draw Text on PDF
- Encrypt PDF
- Convert HTML to PDF
- Convert Markdown to PDF
- Manage PDF Metadata
- Merge PDF Files
- Add PDF Pages
- Remove PDF Pages
- Resize PDF Pages
- Rotate PDF Pages
- Convert PDF to Base64
- Convert PDF to Image
- Split PDF File
- Add Image Watermark to PDF
- Add Text Watermark to PDF
- Shortened URL Actions
Operator → Traffic Light Rate Limiting
AI-generatedOverview
The "Traffic Light Rate Limiting" operation under the "Operator" resource provides a mechanism to enforce rate limits on actions or API calls identified by a unique identifier. This node helps control the number of requests or operations performed within a specified time window, preventing overuse or abuse of resources.
Typical use cases include:
- Throttling API requests per user or client to avoid hitting service limits.
- Controlling access frequency to certain features in an application.
- Implementing custom rate limiting logic in workflows to ensure fair usage.
For example, you can limit an API user identified as "api-user-123" to 50 requests every 60 seconds, ensuring that the system does not get overwhelmed by too many requests from the same user.
Properties
| Name | Meaning |
|---|---|
| Rate Limit Identifier | Unique string to identify the entity (e.g., user or client) for which rate limiting applies. Example: "api-user-123". |
| Request Limit | Maximum number of allowed requests or operations within the defined time window. Default is 50. |
| Time Window (Seconds) | Duration in seconds during which the request limit applies. Default is 60 seconds. |
Output
The node outputs JSON data representing the result of the rate limit check. Typically, this will include information such as whether the current request is allowed or blocked based on the rate limit, and possibly metadata like remaining quota or reset time.
If the node supports binary output, it would relate to any additional data returned by the rate limiting service, but based on the provided code and properties, the primary output is JSON indicating rate limit status.
Dependencies
- Requires an API key credential to authenticate requests against the external "0CodeKit" service at
https://prod.0codekit.com. - The node sends a POST request to the
/operator/trafficlightendpoint with the parametersidentifier,limit, andtimeWindow. - Proper configuration of the API key credential in n8n is necessary for successful execution.
Troubleshooting
Common issues:
- Invalid or missing API key credential will cause authentication failures.
- Providing an empty or invalid
Rate Limit Identifiermay lead to errors or unexpected behavior. - Setting a
Request Limitless than 1 is invalid and should be avoided. - Network connectivity issues to the external API endpoint can cause request failures.
Error messages:
- Authentication errors typically indicate problems with the API key; verify the credential setup.
- Validation errors may occur if required parameters are missing or out of range; ensure all inputs meet the expected criteria.
- Rate limit exceeded responses mean the allowed number of requests has been surpassed; wait for the time window to reset or increase the limit if appropriate.
Links and References
- 0CodeKit API Documentation (for detailed API usage and rate limiting behavior)
- n8n documentation on Using Credentials
- General concepts on Rate Limiting