I am using Email Messages Input and Merge Multiple PDFs plugin in AutomationEdge Process Studio.
The sender value I am getting is like:
AutomationEdge Training <aetrainings@automationedge.com>
I want to:
-
Trim/remove the email part (<``aetrainings@automationedge.com``>)
-
Keep only the sender display name → AutomationEdge Training
-
Use this sender name dynamically as the output merged PDF file name (e.g., AutomationEdge_Training.pdf)
What is the best way to do this using Modified Java Script Value or any built-in step in Process Studio?
You can achieve this using either Modified Java Script Value or the Split Field step.
Option 1: Using Modified Java Script Value (Recommended)
Since the sender format is:
AutomationEdge Training <aetrainings@automationedge.com>
You can split using < and take the first part.
var name = sender_field.split(“<”)[0].trim()
This will:
Option 2: Using Split Field Step
-
Add Split Field step.
-
Field to split: sender_field
-
Delimiter: <
-
This will create two output fields.
-
Use the first output field.
-
Apply Trim (if required).
-
Replace space with underscore using Modified JS or Replace in String.
-
Append .pdf.