How to get subject from mail in uipath
In UiPath, you can extract the subject from an email using the Get Email Subject
activity. Here's a step-by-step guide:
Prerequisites:
- You have an email account set up in your UiPath project.
- You have an email activity (e.g.,
Get Email
) that retrieves the email you want to extract the subject from.
Steps:
- Drag and drop the
Get Email Subject
activity from theActivities
panel to your workflow. - Connect the
Get Email Subject
activity to theGet Email
activity that retrieves the email. - Configure the
Get Email Subject
activity:- In the
Get Email Subject
activity, click on theProperties
button. - In the
Properties
window, select theEmail
property from theGet Email
activity that you connected earlier. - In the
Subject
field, enter the name of the subject you want to extract (e.g.,Subject
).
- In the
- Run the workflow.
The Get Email Subject
activity will extract the subject from the email and store it in a variable. You can then use this variable in your workflow as needed.
Example:
Suppose you have an email with the subject "Hello from John". Your workflow would look like this:
Get Email
activity retrieves the email.Get Email Subject
activity extracts the subject from the email and stores it in a variable namedsubject
.- You can then use the
subject
variable in your workflow, for example, to display the subject in a message box:MessageBox.Show(subject)
This would display the subject "Hello from John" in a message box.