How to extract only Sender Name (without email) and use it in merged PDF file name in Process Studio?

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:

  1. Trim/remove the email part (<``aetrainings@automationedge.com``>)

  2. Keep only the sender display nameAutomationEdge Training

  3. 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:

  • Remove the email part

  • Keep only AutomationEdge Training

  • Convert it to AutomationEdge_Training.pdf


Option 2: Using Split Field Step

  1. Add Split Field step.

  2. Field to split: sender_field

  3. Delimiter: <

  4. This will create two output fields.

  5. Use the first output field.

  6. Apply Trim (if required).

  7. Replace space with underscore using Modified JS or Replace in String.

  8. Append .pdf.