Gmail

Gmail é um dos serviços de e-mail mais populares do mundo, confiado por indivíduos e organizações para enviar, receber e gerenciar mensagens com segurança.

Com a integração do Gmail no Zoen, você pode:

  • Enviar e-mails: Compose e envie e-mails com suporte a destinatários, CC, BCC, assunto, corpo e anexos
  • Criar rascunhos: Salve rascunhos de e-mail para revisão e envio posteriores
  • Ler e-mails: Recupere mensagens de e-mail por ID com conteúdo completo e metadados
  • Pesquisar e-mails: Encontre e-mails usando a poderosa sintaxe de consulta de pesquisa do Gmail
  • Mover e-mails: Mova mensagens entre pastas ou labels
  • Gerenciar status de leitura: Marque e-mails como lidos ou não lidos
  • Arquivar e desarquivar: Arquive mensagens para limpar sua caixa de entrada ou restaure-as
  • Excluir e-mails: Remova mensagens da sua caixa de correio
  • Gerenciar labels: Adicione ou remova labels dos e-mails para organização

No Zoen, a integração com o Gmail permite que seus agentes interajam com sua caixa de entrada de forma programática como parte de workflows automatizados. Os agentes podem enviar notificações, pesquisar e-mails específicos, organizar mensagens e disparar ações com base no conteúdo do e-mail — habilitando automação inteligente de e-mail e workflows de comunicação.

Usage Instructions

Integrate Gmail into the workflow. Can send, read, search, and move emails. Can be used in trigger mode to trigger a workflow when a new email is received.

Actions

gmail_send

Send emails using Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
tostringYesRecipient email address
subjectstringNoEmail subject
bodystringYesEmail body content
contentTypestringNoContent type for the email body (text or html)
threadIdstringNoThread ID to reply to (for threading)
replyToMessageIdstringNoGmail message ID to reply to - use the "id" field from Gmail Read results (not the RFC "messageId")
ccstringNoCC recipients (comma-separated)
bccstringNoBCC recipients (comma-separated)
attachmentsfile[]NoFiles to attach to the email

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayEmail labels

gmail_draft

Draft emails using Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
tostringYesRecipient email address
subjectstringNoEmail subject
bodystringYesEmail body content
contentTypestringNoContent type for the email body (text or html)
threadIdstringNoThread ID to reply to (for threading)
replyToMessageIdstringNoGmail message ID to reply to - use the "id" field from Gmail Read results (not the RFC "messageId")
ccstringNoCC recipients (comma-separated)
bccstringNoBCC recipients (comma-separated)
attachmentsfile[]NoFiles to attach to the email draft

Output

ParameterTypeDescription
draftIdstringDraft ID
messageIdstringGmail message ID for the draft
threadIdstringGmail thread ID
labelIdsarrayEmail labels

gmail_edit_draft

Update an existing Gmail draft in place without deleting and recreating it.

Input

ParameterTypeRequiredDescription
draftIdstringYesID of the draft to update (from Gmail List Drafts or Gmail Get Draft)
tostringYesRecipient email address
subjectstringNoEmail subject
bodystringYesEmail body content
contentTypestringNoContent type for the email body (text or html)
threadIdstringNoThread ID to associate the draft with (for threading)
replyToMessageIdstringNoGmail message ID to reply to - use the "id" field from Gmail Read results (not the RFC "messageId")
ccstringNoCC recipients (comma-separated)
bccstringNoBCC recipients (comma-separated)
attachmentsfile[]NoFiles to attach to the email draft

Output

ParameterTypeDescription
draftIdstringDraft ID
messageIdstringGmail message ID for the draft
threadIdstringGmail thread ID
labelIdsarrayEmail labels

gmail_read

Read emails from Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringNoGmail message ID to read (e.g., 18f1a2b3c4d5e6f7)
folderstringNoFolder/label to read emails from (e.g., INBOX, SENT, DRAFT, TRASH, SPAM, or custom label name)
unreadOnlybooleanNoSet to true to only retrieve unread messages
maxResultsnumberNoMaximum number of messages to retrieve (default: 1, max: 10)
includeAttachmentsbooleanNoSet to true to download and include email attachments

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayEmail labels
fromstringSender email address
tostringRecipient email address
subjectstringEmail subject
datestringEmail date
bodystringEmail body text (best-effort plain text)
hasAttachmentsbooleanWhether the email has attachments
attachmentCountnumberNumber of attachments
attachmentsfile[]Downloaded attachments (if enabled)
resultsjsonSummary results when reading multiple messages

Search emails in Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
querystringYesSearch query for emails
maxResultsnumberNoMaximum number of results to return (e.g., 10, 25, 50)

Output

ParameterTypeDescription
resultsjsonArray of search results

gmail_move

Move emails between labels/folders in Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to move
addLabelIdsstringYesComma-separated label IDs to add (e.g., INBOX, Label_123)
removeLabelIdsstringNoComma-separated label IDs to remove (e.g., INBOX, SPAM)

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayEmail labels

gmail_mark_read

Mark a Gmail message as read. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to mark as read

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_mark_unread

Mark a Gmail message as unread. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to mark as unread

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_archive

Archive a Gmail message (remove from inbox). Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to archive

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_unarchive

Unarchive a Gmail message (move back to inbox). Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to unarchive

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_delete

Delete a Gmail message (move to trash). Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to delete

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_add_label

Add label(s) to a Gmail message. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to add labels to
labelIdsstringYesComma-separated label IDs to add (e.g., INBOX, Label_123)

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_remove_label

Remove label(s) from a Gmail message. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to remove labels from
labelIdsstringYesComma-separated label IDs to remove (e.g., INBOX, Label_123)

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

Triggers

A Trigger is a block that starts a workflow when an event happens in this service.

These run on a schedule (polling-based) — they check for new data rather than receiving push notifications.

Gmail Email Trigger

Triggers when new emails are received in Gmail (requires Gmail credentials)

Configuration

ParameterTypeRequiredDescription
triggerCredentialsstringYesThis trigger requires google email credentials to access your account.
labelIdsstringNoChoose which Gmail labels to monitor. Leave empty to monitor all emails.
labelFilterBehaviorstringYesInclude only emails with selected labels, or exclude emails with selected labels
searchQuerystringNoOptional Gmail search query to filter emails. Use the same format as Gmail search box (e.g.,
markAsReadbooleanNoAutomatically mark emails as read after processing
includeAttachmentsbooleanNoDownload and include email attachments in the trigger payload

Output

ParameterTypeDescription
emailobjectemail output from the tool
idstringGmail message ID
threadIdstringGmail thread ID
subjectstringEmail subject line
fromstringSender email address
tostringRecipient email address
ccstringCC recipients
datestringEmail date in ISO format
bodyTextstringPlain text email body
bodyHtmlstringHTML email body
labelsarrayEmail labels array
hasAttachmentsbooleanWhether email has attachments
attachmentsfile[]Array of email attachments as files (if includeAttachments is enabled)
timestampstringEvent timestamp

On this page