How do I access "origemail" in Inbound email action flow?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 07:55 AM
I am trying to use Inbound email flow instead of Inbound email actions. To be honest I am really struggling with finding right information.
I need to use email.origemail in my flow but can't find it. For example, I tried:
fd_data.trigger.inbound_email.origemail
but no luck. I also tried to look into the headers, again no luck from the flow.
Any idea? Thanks
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 02:14 AM
Hi @Shahid4
Use the below script to fetch original email from email body
var emailBody = fd_data.trigger.body_text;
var regex = /From:\s(.*)/; // Example regex to find the "From:" header
var match = emailBody.match(regex);
if (match && match[1]) {
var originalSender = match[1].trim();
var finalAddress = originalSender.match(/<([^>]+)>/);
return finalAddress[1];
}