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
Text → Compare Strings
AI-generatedOverview
The node provides a utility to compare two text strings using a specified algorithm. It is useful in scenarios where you need to determine the similarity or difference between two pieces of text, such as validating user input against a reference string, detecting duplicates, or performing fuzzy matching in data processing workflows.
For example, you might use this node to:
- Check if two product descriptions are similar.
- Compare user-submitted answers with correct answers allowing for minor differences.
- Detect near-duplicate entries in a dataset.
Properties
| Name | Meaning |
|---|---|
| First String | The first string to compare. |
| Second String | The second string to compare. |
| Algorithm | The algorithm used to compare the strings. This could be various string comparison methods (e.g., Levenshtein distance, Jaro-Winkler), depending on what the underlying service supports. |
Output
The output contains a JSON object with the result of the string comparison. Typically, this will include a similarity score or a boolean indicating whether the strings match according to the chosen algorithm. The exact structure depends on the external API response but generally includes fields representing the comparison metric.
No binary data output is expected from this operation.
Dependencies
- Requires an API key credential for authentication with the external "0CodeKit" service.
- The node sends a POST request to the endpoint
/text/comparestringon the base URLhttps://prod.0codekit.com. - Proper configuration of the API key credential in n8n is necessary for successful execution.
Troubleshooting
Common issues:
- Missing or invalid API key credential will cause authentication errors.
- Providing empty strings for either input may lead to unexpected results or errors.
- Using an unsupported or misspelled algorithm name might cause the API to reject the request.
Error messages:
- Authentication failures typically indicate problems with the API key setup.
- Validation errors may occur if required properties are missing or empty.
- API errors related to the algorithm parameter suggest checking the allowed values and spelling.
To resolve these issues, ensure that:
- The API key credential is correctly configured and active.
- Both strings are provided and non-empty.
- The algorithm parameter matches one of the supported algorithms by the external service.
Links and References
- 0CodeKit API Documentation (for detailed info on supported algorithms and response formats)
- n8n documentation on API credentials