First of all I’m new and I want to say thank you for the system that you offer
Here is my problem:
I want to import under certain conditions a message on discord when an email is received, I use the imap protocol for as a trigger and a switch to split the results and send them by discord.
The problem is that the end of the subject of the email changes depending on the order number:
Not 100% sure what the problem is as there is no image or workflow included in your post.
But If you have this subject and want to extract the order number You can simply user a replace in an expression. so something like {{$json[“subject”].replace(“New order “,””}} to remove the prefix from the subject.
If this is not what you are looking for, please give us a bit more information on what you want to do. For example, giving an input and expected output would be very helpful.
Yes, I’m sorry but if I don’t explain it, it won’t work ^^
So when a mail is received in my mailbox it points to a switch, I would like this switch to choose the right branch, the 1 on the subject “Nouvelle commande n°”
Knowing that there is a number after “n°” and that it is different for each order.
This number prevents it from sorting and goes to branch 0 and therefore in error, I am looking for a solution that could either stop the search for the switch after “n°” or delete the number
(I admit that I am new and so I did not know where to put your request “{{$json[“subject”].replace(“New order “,””}}”
Thanks, that makes it a lot easier.
You only need to add the set node Can also do it in the switch node, but the setnode might be easier to understand.
With this example you would add a field where the number is removed and then use that field in your switch. With this you can easily add more things in that set node if needed.