Actions13
- AI/ML Actions
- ChatGPT Actions
- Communication Actions
- Data Processing Actions
- E-Commerce Actions
- Printing Actions
- Utility Actions
Overview
The node provides a custom data processing operation to extract phone numbers from a given text input. Specifically, the "Extract Number" operation scans the provided text for phone numbers and optionally adds a country code prefix to each extracted number.
This node is useful in scenarios where you need to parse unstructured text containing phone numbers—such as customer messages, documents, or logs—and convert them into structured phone number data for further processing, validation, or integration with communication systems.
Example use cases:
- Extracting phone numbers from customer support chat transcripts.
- Parsing contact details from emails or documents.
- Preparing phone numbers for automated SMS campaigns by ensuring they have the correct country code prefix.
Properties
| Name | Meaning |
|---|---|
| Text | The input text containing phone numbers to extract. Example: 011-54 2727 30 |
| Add Prefix | Boolean option to specify whether to add a country code prefix to the extracted numbers. |
Output
The output is a JSON array containing the response from the external API that performs the extraction. Each item in the output corresponds to the processed result of the input text, typically including the extracted phone numbers and possibly their formatted versions depending on the API response.
No binary data output is produced by this operation.
Dependencies
- This node relies on an external API endpoint at
https://api.customje.com/extract.phpto perform the actual phone number extraction. - It requires an HTTP POST request with the input parameters (
textandadd_prefix) sent as JSON. - No explicit API key or authentication is required for this specific operation based on the provided code, but the node supports credentials generally (not used here).
- The node uses an internal helper function to make the API request.
Troubleshooting
Common issues:
- If the input text does not contain any recognizable phone numbers, the output may be empty or contain no extracted numbers.
- Network connectivity problems can cause the API request to fail.
- Unexpected API responses or changes in the external service could lead to errors or incomplete extraction.
Error messages:
"The operation "extract-number" is not implemented yet!"— This would occur if the operation name is misspelled or changed in the node configuration."The resource "actions" is not known!"— This error indicates the resource parameter is incorrect; for this node, the resource should be"data-processing"(note: the code snippet shows"actions"which might be an inconsistency or legacy naming; ensure the resource is set correctly).- Network or HTTP errors will propagate from the API call; check your internet connection and API availability.
To resolve errors:
- Verify the resource and operation names are correctly set to
"data-processing"and"extract-number". - Ensure the input text is properly formatted and contains valid phone numbers.
- Check network access to
https://api.customje.com. - Enable "Continue On Fail" in the node settings to handle errors gracefully during batch processing.
- Verify the resource and operation names are correctly set to
Links and References
- CustomJE API Documentation (assumed base URL for the external API)
- n8n Documentation on Creating Custom Nodes
- General information on phone number parsing libraries and standards (e.g., E.164 format) for context on phone number normalization.