Closed Man-Bot closed 1 week ago
Hey @Man-Bot,
We have created an internal ticket to look into this which we will be tracking as "GHC-227"
I'm not able to reproduce this. Here is the workflow I tried:
{
"meta": {
"instanceId": "5d752e7ecaa02c72bd0177be6c8afab6f138672c45b28a102debad8299471df9"
},
"nodes": [
{
"parameters": {},
"id": "59071366-f3ab-40eb-8e5b-58e7d64698f0",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
820,
420
],
"typeVersion": 1
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "ae74a1f1-b229-4415-ab95-1367a6bb1471",
"name": "name",
"value": "={{ $json.name.toLowerCase().replaceAll(\" \", \".\") }}@company.com",
"type": "string"
}
]
},
"options": {}
},
"id": "9f3d44a8-88cd-4958-9d95-253d2240ce46",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1040,
420
]
}
],
"connections": {
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {
"When clicking ‘Test workflow’": [
{
"name": "Bruce Wayne"
}
]
}
}
How can I help you to reproduce this?
can you share the output of the expression $json["Manager/Lead"].split('')
?
Sure!
THnx for this example!!! There is OUR side problem:
...will use trim () for all this names... and I will sacrifice the Okta admins for the glory of the Emperor!
Bug Description
n8n runs in Docker We use replaceAll (" ", ".") to create email from Name and FamilyName and receive unexpected behavior from replaceAll () with doubling anything putted in replacement part.
To Reproduce
Employee name: Bruce Wayne https://company.okta.com/api/v1/users/{{ $json["Manager/Lead"].toLowerCase().replaceAll(" ", ".") }}@company.com Return: bruce..wayne@company.com
Expected behavior
Employee name: Bruce Wayne https://company.okta.com/api/v1/users/{{ $json["Manager/Lead"].toLowerCase().replaceAll(" ", ".") }}@company.com Should Return: bruce.wayne@company.com
Operating System
Ubuntu 24.04 LTS (GNU/Linux 6.8.0-1011-aws x86_64)
n8n Version
1.58.1
Node.js Version
v20.15.0
Database
SQLite (default)
Execution mode
main (default)