Actions108
- AI Actions
- Transcribe
- Detect Brand
- Extract Contact Information
- Mood Detection
- Detect Adult Content
- Enitity Detection
- Language Detection
- Too Long To Read
- Check Content Policy
- Detect Faces
- Generate Python Code
- Picture Text Recognition
- Detect Color
- Generate Image
- PDF OCR
- Translation
- Detect Email Type
- Generate Javascript Code
- Picture Object Recognition
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
Overview
The node provides a versatile text extraction utility within a broader toolbox of no-code utilities. Specifically, the "Text" resource with the "Extractor" operation allows users to extract a substring from a given base string by specifying start and end delimiter strings. It supports options such as greedy matching to control whether the first or last match is extracted.
This node is beneficial in scenarios where you need to parse or isolate specific parts of text data, such as extracting values between known markers, pulling out substrings from logs, or isolating content from structured text blocks.
Practical example:
Extracting a username from a log line where the username is always between "User: " and ", logged in". By setting "Start String" to "User: " and "End String" to ", logged in", the node will return the username portion.
Properties
| Name | Meaning |
|---|---|
| Code Variables | A collection of code variables defined in an external code editor environment. Each variable has a name/ID and a value. |
| Start String | The string that marks the beginning of the text segment to extract. |
| End String | The string that marks the end of the text segment to extract. |
| Base String | The full string from which the extraction will be performed. |
| Greedy | Boolean flag indicating whether to extract the last match (true) or the first match (false). |
| Text | (Optional) The text to be evaluated for extraction. |
| Expression | (Optional) A regular expression to evaluate against the text (not directly used in Extractor operation). |
Output
The output is a JSON array where each item corresponds to an input item processed. Each output item contains the extracted substring(s) based on the specified start and end delimiters.
- The
jsonfield includes the extracted text segment(s). - If multiple matches are found and greedy is false, the first match is returned; if greedy is true, the last match is returned.
- The node does not output binary data for this operation.
Dependencies
- Requires an API key credential for authentication with the external service powering the node's operations.
- The node makes HTTP POST requests to an external API endpoint corresponding to the resource and operation (e.g.,
text/extractor). - No additional environment variables are explicitly required beyond the API key credential.
Troubleshooting
Common issues:
- Incorrect or missing start/end strings may result in empty or unexpected extraction results.
- If the base string is empty or undefined, the extraction will fail or return no results.
- Using expressions or variables incorrectly in the "Code Variables" property might cause errors or unexpected behavior.
Error messages:
- Errors from the external API (e.g., invalid parameters) will be thrown and can be caught if "Continue On Fail" is enabled.
- Parsing errors when loading code variables if the referenced row key or variable names do not exist.
Resolutions:
- Verify that the start and end strings exactly match the intended delimiters in the base string.
- Ensure the base string is correctly provided and non-empty.
- Confirm that any code variables used are properly defined and accessible.
Links and References
- n8n Expressions Documentation — for using expressions in variable definitions.
- No direct external documentation links for the underlying API were found in the source code.