Actions8
Overview
This custom node provides multiple text and data manipulation operations under a single "Custom" resource. Specifically, the Generate OTP Code operation creates a one-time password (OTP) string based on user-defined parameters such as type and length. This is useful in scenarios requiring secure verification codes for authentication, password resets, or transaction confirmations.
Practical examples include:
- Generating numeric OTPs for SMS verification.
- Creating alphanumeric OTPs for email-based two-factor authentication.
- Producing text-only OTPs for systems that require non-numeric codes.
Properties
| Name | Meaning |
|---|---|
| CJ Token | Your API token from sifuim.com used to authenticate requests. |
| OTP Type | Type of OTP to generate. Options: Number Only, Text Only, Combine (Number + Text). |
| Character Length | Number of characters for the OTP code (e.g., 6 means the OTP will be 6 characters long). |
Output
The output JSON object contains:
otpType: The selected OTP type ("number", "text", or "combine").characterLength: The length of the generated OTP.generatedOtp: The actual generated OTP string matching the specified type and length.
Example output JSON:
{
"otpType": "number",
"characterLength": 6,
"generatedOtp": "492837"
}
No binary data output is produced by this operation.
Dependencies
- Requires a valid API token credential ("CJ Token") from sifuim.com for authentication.
- The node internally calls a helper function to generate the OTP and deduct credit via the API.
- No additional external services are explicitly required beyond the API token and network access to sifuim.com.
Troubleshooting
- Invalid or missing API token: The node validates the provided token before execution. Ensure the CJ Token is correct and active.
- Unsupported OTP type or invalid character length: The node expects predefined OTP types and a positive integer length. Providing unsupported values may cause errors.
- API credit deduction failure: If the API call to deduct credit fails, the node attempts to continue but may log an error. Verify your account has sufficient credits.
- Unhandled operation or resource: Errors occur if the resource or operation name is incorrect or not implemented.
Links and References
- sifuim.com — For obtaining the API token and understanding service usage.
- n8n Documentation — For general guidance on creating and using custom nodes.