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:

  1. You have an email account set up in your UiPath project.
  2. You have an email activity (e.g., Get Email) that retrieves the email you want to extract the subject from.

Steps:

  1. Drag and drop the Get Email Subject activity from the Activities panel to your workflow.
  2. Connect the Get Email Subject activity to the Get Email activity that retrieves the email.
  3. Configure the Get Email Subject activity:
    • In the Get Email Subject activity, click on the Properties button.
    • In the Properties window, select the Email property from the Get Email activity that you connected earlier.
    • In the Subject field, enter the name of the subject you want to extract (e.g., Subject).
  4. 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:

  1. Get Email activity retrieves the email.
  2. Get Email Subject activity extracts the subject from the email and stores it in a variable named subject.
  3. 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.