UiPath Documentation
activities
latest
false
Productivity activities

Options

Forward email request builder.

ForwardEmailRequest​

Forward email request builder.

Namespace: UiPath.Gsuite.Activities.API

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

Syntax​

public class ForwardEmailRequest : BasicEmailRequestBuilder<ForwardEmailRequest>
public class ForwardEmailRequest : BasicEmailRequestBuilder<ForwardEmailRequest>

Properties​

  • Attachments - The attachments of the email.
  • Bcc - The hidden recipients of the email.
  • Body - The content of the email.
  • Cc - The secondary recipients of the email.
  • IsBodyHtml - If the email body is HTML format.
  • IsDraft - True if the email should be a draft.
  • NewSubject - The new subject of the email.
  • To - The primary recipients of the email.

Supported methods​

  • AsDraft - Specifies if the email should be sent as a draft.
  • WithAttachment (IResource) - Adds an email attachment.
  • WithAttachment (String) - Attaches the specified local file to the email.
  • WithBcc - Adds a hidden email recipient.
  • WithBody - Specifies the email content.
  • WithCc - Adds a secondary email recipient.
  • WithHtmlBody - Specifies if the email body should be HTML format.
  • WithNewSubject - Specifies a new email subject.
  • WithTo - Adds a primary email recipient.

IMailLabel​

Mail label object interface.

Namespace: UiPath.Gsuite.Activities.API

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

Syntax​

public interface IMailLabel
public interface IMailLabel

Methods​

NameDecription
ApplyToAdds the label to the specified mail.
GetEmailsRetrieves a list of emails from the label folder that match the criteria defined in the filter.
GetNewestEmailRetrieves the most recent email from the label folder that matches the criteria defined in the filter.
RemoveFromRemoves the label from the specified mail.

ApplyTo​

Adds the label to the specified mail.

void ApplyTo(
	IMail mail
)
void ApplyTo(
	IMail mail
)

mail IMail : The mail to attach the label to.

GetEmails​

Retrieves a list of emails from the label folder that match the criteria defined in the filter.

IReadOnlyCollection<IMail> GetEmails(
	MailFilter filter = null,
	bool includeSubfolders = true,
	bool markAsRead = false,
	int? maxResults = null
)
IReadOnlyCollection<IMail> GetEmails(
	MailFilter filter = null,
	bool includeSubfolders = true,
	bool markAsRead = false,
	int? maxResults = null
)

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

includeSubfolders Boolean (Optional) : Specifies if subfolders should be included in the search results. Optional, default value is true.

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

maxResults Nullable<Int32> (Optional) : Maximum count of retrieved results. Values lower than 0 will be interpreted as unlimited. Optional, default value is unlimited.

GetNewestEmail​

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

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

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.

RemoveFrom​

Removes the label from the specified mail.

void RemoveFrom(
	IMail mail
)
void RemoveFrom(
	IMail mail
)

mail IMail : The mail to remove the label from.

MailFilter​

Email filter.

Namespace: UiPath.Gsuite.Activities.API

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

Syntax​

public class MailFilter : IFilterExpressionBuilder<MailFilter>
public class MailFilter : IFilterExpressionBuilder<MailFilter>

Constructors​

NameConstructor
MailFilterDefault constructor

Methods​

NameDescription
AndAdds "AND" as logical condition between the filters (all conditions are met).
ByAdds a filter for collection fields.
ByBccFilter for the hidden recipients of the email.
ByBodyFilter for the content of the email.
ByCategoriesFilter for the category of the email.
ByCcFilter for the secondary recipients of the email.
ByDateAndTimeFilter for the received date and time of the email.
ByExpressionAdds an expression to the filters.
ByFilenameFilter for the attachment name of the email.
ByFromFilter for the sender of the email.
ByImportantFilter for important emails.
ByLabelsFilter for the labels associated with the email.
ByStarredFilter for starred emails.
BySubExpressionAdds a subfilter to the filters.
BySubjectFilter for the subject of the email.
ByToFilter for the primary recipients of the email.
ByUnreadFilter for unread emails.
OrAdds "OR" as logical condition between the filters (any condition is met).
WithAttachmentsFilter for emails with attachments.

Adds "AND" as logical condition between the filters (all conditions are met).

public MailFilter And()
public MailFilter And()

Adds a filter.

Overloads​
OverloadDescription
By(MailFilterField, FilterCollectionOperator, String[])Adds a filter for collection fields.
By(MailFilterField, FilterDateOperator, DateTime)Adds a filter for date fields.
By(MailFilterField, FilterStringOperator, String)Adds a filter condition for string fields.
By(MailFilterField, FilterCollectionOperator, String[])​
public MailFilter By(
	MailFilterField field,
	FilterCollectionOperator collectionOperator,
	string[] value
)
public MailFilter By(
	MailFilterField field,
	FilterCollectionOperator collectionOperator,
	string[] value
)

Adds a filter for collection fields.

field MailFilterField : The field to filter by.

collectionOperator FilterCollectionOperator : The collection operator to use for filtering.

value String[] : The value to filter by.

By(MailFilterField, FilterDateOperator, DateTime)​
public MailFilter By(
	MailFilterField field,
	FilterDateOperator dateOperator,
	DateTime value
)
public MailFilter By(
	MailFilterField field,
	FilterDateOperator dateOperator,
	DateTime value
)

field MailFilterField : The field to filter by.

dateOperator : The date operator to use for filtering.

value DateTime : The value to filter by.

By(MailFilterField, FilterStringOperator, String)​

Adds a filter condition for string fields.

public MailFilter By(
	MailFilterField field,
	FilterStringOperator stringOperator,
	string value
)
public MailFilter By(
	MailFilterField field,
	FilterStringOperator stringOperator,
	string value
)

field MailFilterField : The field to filter by.

stringOperator : The string operator to use for filtering.

value String : The value to filter by.

MailFilterField​

All available mail filter conditions.

Syntax​
public enum MailFilterField
public enum MailFilterField
Options​
OptionValue
From0
To1
DateAndTime2
Cc3
Bcc4
Subject5
Body6
Categories7
Filename8
Labels9

ByBcc​

Filter for the hidden recipients of the email.

public MailFilter ByBcc(
	FilterStringOperator stringOperator,
	string value
)
public MailFilter ByBcc(
	FilterStringOperator stringOperator,
	string value
)

stringOperator : The string operator to use for filtering.

value String : The value to filter by.

ByBody​

Filter for the content of the email.

public MailFilter ByBody(
	FilterStringOperator stringOperator,
	string value
)
public MailFilter ByBody(
	FilterStringOperator stringOperator,
	string value
)

stringOperator : The string operator to use for filtering.

value String : The value to filter by.

ByCategories​

Filter for the category of the email.

public MailFilter ByCategories(
	FilterStringOperator stringOperator,
	string value
)
public MailFilter ByCategories(
	FilterStringOperator stringOperator,
	string value
)

stringOperator : The string operator to use for filtering.

value String : The value to filter by.

Filter for the secondary recipients of the email.

public MailFilter ByCc(
	FilterStringOperator stringOperator,
	string value
)
public MailFilter ByCc(
	FilterStringOperator stringOperator,
	string value
)

stringOperator : The string operator to use for filtering.

value String : The value to filter by.

ByDateAndTime​

Filter for the received date and time of the email.

public MailFilter ByDateAndTime(
	FilterDateOperator dateOperator,
	DateTime value
)
public MailFilter ByDateAndTime(
	FilterDateOperator dateOperator,
	DateTime value
)

dateOperator : The date operator to use for filtering.

value DateTime : The value to filter by.

ByExpression​

Adds an expression to the filters.

publicMailFilterByExpression(
	stringexpression
)
publicMailFilterByExpression(
	stringexpression
)

expression String : The expression to be used for filtering.

ByFilename​

Filter for the attachment name of the email.

public MailFilter ByFilename(
	FilterStringOperator stringOperator,
	string value
)
public MailFilter ByFilename(
	FilterStringOperator stringOperator,
	string value
)

stringOperator : The string operator to use for filtering.

value String : The value to filter by.

ByFrom​

Filter for the sender of the email.

public MailFilter ByFrom(
	FilterStringOperator stringOperator,
	string value
)
public MailFilter ByFrom(
	FilterStringOperator stringOperator,
	string value
)

stringOperator : The string operator to use for filtering.

value String : The value to filter by.

ByImportant​

Filter for important emails.

public MailFilter ByImportant(
	bool value
)
public MailFilter ByImportant(
	bool value
)

value Boolean : Negates the query if false.

ByLabels​

Filter for the labels associated with the email.

public MailFilter ByLabels(
	FilterCollectionOperator collectionOperator,
	string[] value
)
public MailFilter ByLabels(
	FilterCollectionOperator collectionOperator,
	string[] value
)

collectionOperator FilterCollectionOperator : The collection operator to use for filtering.

value String[] : The value to filter by.

ByStarred​

Filter for starred emails.

public MailFilter ByStarred(
	bool value
)
public MailFilter ByStarred(
	bool value
)

value Boolean : Negates the query if false.

BySubExpression​

Adds a subfilter to the filters.

public MailFilter BySubExpression(
	MailFilter expressionBuilder
)
public MailFilter BySubExpression(
	MailFilter expressionBuilder
)

expressionBuilder MailFilter : The subfilter to be added.

BySubject​

Filter for the subject of the email.

public MailFilter BySubject(
	FilterStringOperator stringOperator,
	string value
)
public MailFilter BySubject(
	FilterStringOperator stringOperator,
	string value
)

stringOperator : The string operator to use for filtering.

value String : The value to filter by.

Filter for the primary recipients of the email.

public MailFilter ByTo(
	FilterStringOperator stringOperator,
	string value
)
public MailFilter ByTo(
	FilterStringOperator stringOperator,
	string value
)

stringOperator : The string operator to use for filtering.

value String : The value to filter by.

ByUnread​

Filter for unread emails.

public MailFilter ByUnread(
	bool value
)
public MailFilter ByUnread(
	bool value
)

value Boolean : Negates the query if false.

Adds "OR" as logical condition between the filters (any condition is met).

public MailFilter Or()
public MailFilter Or()

WithAttachments​

Filter for emails with attachments.

public MailFilter WithAttachments(
	bool value
)
public MailFilter WithAttachments(
	bool value
)

value Boolean : Negates the query if false.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated