Hello Every one I want to extract data from below text
“30-12-2022 Dear Abhay Daga, Thank you for using your Card no. XX06598 for INR 10000 at GOOGLESERVI on 30-12-22 00:03:37. The total credit limit on your card is INR 108000, while the available limit is”
I want to extract amount in inr "10000 "
merchant like "GOOGLESERVI "
date “30-12-22 00:03:37”
Hey, @Spinefit I usually use the split() method in a Code Node for this type of tasks.
The problem would be the reproducibility of the code, if the layout or template of the email changes, the code would break.
Here is an example
var text = item.json.text;
item.json.amount = text.split("INR").split("at")
Email parsing is totally dependent on format changes.
I use split (as you did), match, replace, trim functions in my parsing but always one step away from the email sender to decide to change things up !
I start with converting HTML to text and then getting rid of all the header and footer text.
Then use these functions to extract text and clean it up.