Israeli Phone icon

Israeli Phone

Formats Israeli phone numbers into all possible variants

Israeli Phone

AI-generated

Overview

This node formats Israeli phone numbers into multiple standardized variants. It takes an input phone number and outputs various common representations, such as local format, international format with country code, and different separator styles (dashes, spaces, dots). This is useful for data normalization, validation, or preparing phone numbers for display or integration with other systems.

Practical examples include:

  • Converting user-entered phone numbers into consistent formats for CRM or marketing tools.
  • Preparing phone numbers for SMS gateways that require specific formatting.
  • Validating and cleaning phone number inputs in workflows dealing with Israeli contacts.

Properties

Name Meaning
Phone Number The Israeli phone number to format. Must be a valid Israeli mobile number starting with "05".

Output

The output JSON contains the original input data merged with the following fields representing different formatted variants of the phone number:

  • original: The original input phone number string.
  • cleanedDigits: The phone number digits only, with all non-digit characters removed.
  • local: The phone number in local Israeli format starting with "0".
  • withPlus972: International format prefixed with "+972" and without the leading zero.
  • with972: International format prefixed with "972" (no plus) and without the leading zero.
  • dashed: Local format separated by dashes, e.g., "050-123-4567".
  • spaced: Local format separated by spaces, e.g., "050 123 4567".
  • dotted: Local format separated by dots, e.g., "050.123.4567".
  • internationalDashed: International format with dashes, e.g., "+972-50-123-4567".
  • internationalSpaced: International format with spaces, e.g., "+972 50 123 4567".

If the input phone number is invalid or does not match the expected pattern, the output will be an empty object {}.

Dependencies

  • No external API or service dependencies are required.
  • The node relies on internal n8n workflow utilities for error handling and input/output management.

Troubleshooting

  • Invalid phone number input: If the phone number does not start with "05" or does not have the correct length, the node returns an empty object for that item. Ensure the input matches the Israeli mobile phone format.
  • Error handling: If an error occurs during execution and "Continue On Fail" is disabled, the node will throw an error indicating which item caused the failure. Enable "Continue On Fail" to process remaining items despite errors.
  • Formatting issues: Non-numeric characters are stripped before formatting, but malformed inputs may still result in empty outputs.

Links and References

Discussion