Actions22
- Tool Actions
- Other Tool Actions
- Date Operation Actions
- Text & Formatting Actions
Text & Formatting → Format Numbers
AI-generatedOverview
The node provides a variety of utility functions for data processing and text manipulation. Specifically, the "Format Numbers" operation under the "Text & Formatting" resource formats numeric values according to Israeli locale conventions. It supports formatting numbers as currency (Israeli Shekel), plain numbers, or percentages.
This operation is useful when you need to display numbers in a user-friendly format localized for Israel, such as showing prices in ILS currency, formatting percentages with two decimal places, or simply formatting numbers with appropriate digit grouping.
Practical examples:
- Formatting a sales amount as Israeli Shekels currency for invoices.
- Displaying a discount rate as a percentage with two decimals.
- Showing large numbers with proper thousands separators according to Hebrew locale.
Properties
| Name | Meaning |
|---|---|
| Number | The numeric value to be formatted. |
| Format Type | The style of formatting to apply. Options: Currency (ILS currency), Number, Percent |
Output
The output JSON object contains the following fields:
originalNumber: The original input number.formattedNumber: The number formatted as per the selected format type and Hebrew locale.formatType: The chosen format type (currency,number, orpercent).locale: Always"he-IL"indicating Hebrew (Israel) locale formatting.
If the format type is:
- Currency: The number is formatted as Israeli Shekel currency (e.g., ₪1,234.56).
- Percent: The number is treated as a percentage and formatted with two decimal places (input number is divided by 100 internally).
- Number: The number is formatted with digit grouping but no currency or percent symbols.
No binary data output is produced by this operation.
Dependencies
- Uses JavaScript's built-in
Intl.NumberFormatAPI for locale-aware number formatting. - No external services or API keys are required.
- No special n8n environment variables or credentials needed.
Troubleshooting
- Invalid input number: If the input is not a valid number, the node may throw an error or produce unexpected results. Ensure the "Number" property is a valid numeric value.
- Unsupported format type: The node only supports
currency,number, andpercent. Selecting an unsupported option (if modified externally) will default to plain number formatting. - Locale issues: The formatting relies on the runtime environment supporting the
"he-IL"locale. If running in an environment without this locale, formatting might fall back to defaults or behave unexpectedly.