activities
latest
false
UiPath logo, featuring letters U and I in white

Productivity activities

Last updated Mar 13, 2026

GetNewestEmail

Retrieves the most recent email from the label folder that matches the criteria defined in the filter that belongs to the label folder.

Namespace: UiPath.Gsuite.Activities.API

Assembly: UiPath.Gsuite.Activities.API (in UiPath.Gsuite.Activities.API.dll)

Syntax

public IMail GetNewestEmail(
	IMailLabel folder = null,
	MailFilter filter = null,
	bool markAsRead = false
)
public IMail GetNewestEmail(
	IMailLabel folder = null,
	MailFilter filter = null,
	bool markAsRead = false
)

Parameters

folder IMailLabel (Optional) : The label folder from which to retrieve the email from. Optional, default value is All Mail.

filter MailFilter (Optional) : The mail filter criteria that should be matched for the retrieved email. Optional, default value is null.

markAsRead Boolean (Optional) : Specifies if the retrieved email should be marked as read. Optional, default value is false.

Return value

IMail - The matched email.

  • Syntax
  • Parameters
  • Return value

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated