- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2023 03:05 AM
Hi all,
I've seen posts from the past, but maybe something changed in the meantime: Are there any new solutions for parsing name:value pairs in inbound mail bodies which are supposed to be handled by an inbound mail triggered Flow instead of a classic Inbound Action?
Best regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 12:39 AM
Thanks a lot for helpful answers. Eventually, I solved it using a custom action which can parse any input dynamically.
Snippet:
var reg = inputs.bodyText.split(/\r\n|\r|\n/); // reg becomes an array.
var parsedObj = {};//split into 2d array
for(var i=0;i<reg.length;i++){
reg[i] = reg[i].split(":");
parsedObj[reg[i][0]]=reg[i][1];
}
It returns an object where I can access any of the parameters with a simple dot walking because the key is also the name of the parameter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 12:39 AM
Thanks a lot for helpful answers. Eventually, I solved it using a custom action which can parse any input dynamically.
Snippet:
var reg = inputs.bodyText.split(/\r\n|\r|\n/); // reg becomes an array.
var parsedObj = {};//split into 2d array
for(var i=0;i<reg.length;i++){
reg[i] = reg[i].split(":");
parsedObj[reg[i][0]]=reg[i][1];
}
It returns an object where I can access any of the parameters with a simple dot walking because the key is also the name of the parameter.