My contact form will be forwarded via my info@xxx. The router separates the normal emails. The structure of the emails from the contact form is always the same. I would like to separate the content of the individual rows into one Excel file per column. Marked in yellow here.
Hi Joachim,
you should be able to use the split() function on that output to turn it in to array → then iterate on it to populate individual excel file rows.
Or if the output is always the same → use separate parsing for each item.
Many thanks for your support! Which module should be used for the split() function? And which module is used for parsing?
This is how the text parser is set.
You can use the iterator module directly. As input map the output of the text parser module inside the split function.
Hello @Joachim_M_Vis,
You may consider using Text Parser Match Elements for this instead of Match Pattern.
Since all of your data is so uniform and separated by colon the module should just work.
Hello Donald,
Thank you for the advice, but I guess I did something wrong with the special characters in the pattern. Am I right and how to fix it?
Pattern should be Pair of key:value
Delimiter should be colon :
Only first pair per line should be Yes.
Special characters in the pattern should be blank.
It helped, but the text (yellow) is not passed on and how do I get the individual details (green) into one row?
Currently all data is in the first column and 6 rows. I have tried it with iterator and aggregator, but I can’t assign the individual bundles to the columns either
Are you able to provide the output from the Watch Emails module of one of the output bundles?
Not a screenshot, but if you download the bundle’s JSON and upload it here?
Please load this blueprint into a new scenario to see how Match Elements is supposed to work. Seems like there’s something going on with your text from Email.
TestParserMatchElements.json (7.2 KB)
Also, since Match Elements outputs multiple bundles, you can use Array Aggregator after Match Elements to put all the matches into an array then use map() function to extract only specific pieces of information. That’s also demonstrated.
I have customized my form on the website and now I also get the message and with the map function also in the file. BUT only the first line of the message is transferred and not the entire content. Do you have a solution for this?
That’s a good point, hadn’t considered a multi-line value.
One option is moving back to the Regular Expression or you can try splitting the content of your message body by “Message:”, dropping the first element of the resulting array then using the rest of the array as the message body (this covers cases where the message itself may include “Message:” for some reason.
MatchElements-Newlines in message.json (10.0 KB)
This assumes everything after Message: is the message, which may be a bad assumption.
By any chance can you post the email module’s bundle output in JSON format?
Again, mask any private information.
That would help get some quicker and more accurate results and answers here.
Thanks!
Thank you Donald! It worked!!! How do I split the bundle into JSON?
Date issue fixed it in the Excel modul in make and in the Excel file!