yaml
type: "io.kestra.plugin.googleworkspace.mail.List"
yaml
id: list_messages
namespace: company.team

tasks:
  - id: list_messages
    type: io.kestra.plugin.googleworkspace.mail.List
    clientId: "{{ secret('GMAIL_CLIENT_ID') }}"
    clientSecret: "{{ secret('GMAIL_CLIENT_SECRET') }}"
    refreshToken: "{{ secret('GMAIL_REFRESH_TOKEN') }}"
    maxResults: 10

yaml
id: list_unread_messages
namespace: company.team

tasks:
  - id: list_unread
    type: io.kestra.plugin.googleworkspace.mail.List
    clientId: "{{ secret('GMAIL_CLIENT_ID') }}"
    clientSecret: "{{ secret('GMAIL_CLIENT_SECRET') }}"
    refreshToken: "{{ secret('GMAIL_REFRESH_TOKEN') }}"
    query: is:unread
    labelIds:
      - INBOX
    maxResults: 50
    fetchType: STORE

yaml
id: get_first_message
namespace: company.team

tasks:
  - id: get_first
    type: io.kestra.plugin.googleworkspace.mail.List
    clientId: "{{ secret('GMAIL_CLIENT_ID') }}"
    clientSecret: "{{ secret('GMAIL_CLIENT_SECRET') }}"
    refreshToken: "{{ secret('GMAIL_REFRESH_TOKEN') }}"
    fetchType: FETCH_ONE
    maxResults: 1
Properties
DefaultFETCH
Possible Values
STOREFETCHFETCH_ONENONE
Defaultfalse
SubTypestring
Default100
Default120
SubTypestring
Default["https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.send"]
Definitions
attachmentsarray
attachmentIdstring
datastring
filenamestring
mimeTypestring
sizeinteger
bccarray
SubTypestring
ccarray
SubTypestring
fromstring
headersobject
SubTypestring
historyIdstring
idstring
internalDatestring
Formatdate-time
labelIdsarray
SubTypestring
rawstring
sizeEstimateinteger
snippetstring
subjectstring
textHtmlstring
textPlainstring
threadIdstring
toarray
SubTypestring
Definitions
attachmentsarray
attachmentIdstring
datastring
filenamestring
mimeTypestring
sizeinteger
bccarray
SubTypestring
ccarray
SubTypestring
fromstring
headersobject
SubTypestring
historyIdstring
idstring
internalDatestring
Formatdate-time
labelIdsarray
SubTypestring
rawstring
sizeEstimateinteger
snippetstring
subjectstring
textHtmlstring
textPlainstring
threadIdstring
toarray
SubTypestring
Formaturi