Skip to docs navigation

Gmail integration guide

Verified

How to connect Gmail to WEXTL and use its 1 trigger and 20 actions in your workflows. About Gmail: Email service from Google to send, read, organize and search messages, threads and drafts.

  • 1 trigger
  • 6 searches
  • 14 actions
  • Polling
  • Auth: OAuth

AI-assisted documentation8 min read

This documentation is compiled from our integration source code, internal specs for Gmail, its official API documentation and anonymized requests logs we collect from our support team[2].

Open Gmail on WEXTL →
  • Gmail

You’ll be redirected to sign in and approve access. Your password is never shared with WEXTL.

  • Client IDtext

    Optional. Your own OAuth Client ID from Google Cloud Console (enable the API, then Credentials → OAuth client). Leave empty to use the platform app.[1]

  • Client Secretpassword

    Optional. Client Secret for the same OAuth client. Leave empty to use the platform app.[1]

  • Additional Scopesarray

    Optional. Extra Google OAuth scopes to request on top of the default ones, one full scope URL per item (for example https://www.googleapis.com/auth/drive). Duplicates of the default scopes are ignored. Use this with your own Client ID, and enable the same scopes on its OAuth consent screen.[1]

Integration requests 1 permission:

  • https://mail.google.com/
  1. Log in to your WEXTL account, add the Gmail node module to your workflow, and click Create new credential.
  2. Optional: In the Credential name field, enter a name for the credential.
  3. Enter the authentication credentials you copied from your Gmail account, or follow the on-screen instructions to create the credential.
  4. If prompted, authenticate your account and confirm access.
  5. If you want to make changes to your credential in the future, follow the steps in Manage credentials →
New Gmail credential form open next to the Gmail node in the WEXTL workflow builder
Video slide demonstrates how to integrate Gmail in the WEXTL visual workflow builder.[4]

Watch Email Messages

TriggerPolls your mailbox and emits each new email message.
Output fields[3]
FieldType
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Part IDtext
Mime typetext
Filenametext
Headersarray
Bodyobject
Partsarray
Size estimatenumber
Rawtext
Classification label valuesarray
Subjecttext
Fromtext
Totext
Cctext
Bcctext
Reply-Totext
Date headertext
Text contenttext
HTML contenttext
Attachmentsarray

List Draft Emails

SearchDraft emails narrowed with a Gmail-style search query.
Input fields[3]
FieldType
Querytext
Include Spam and Trashboolean
Limitnumber
Output fields[3]
FieldType
IDtext
Messageobject
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Size estimatenumber
Rawtext
Classification label valuesarray

List Messages

SearchMailbox messages filtered by a search query or labels.
Input fields[3]
FieldType
Querytext
Label IDschoice
Include Spam and Trashboolean
Limitnumber
Output fields[3]
FieldType
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Part IDtext
Mime typetext
Filenametext
Headersarray
Bodyobject
Partsarray
Size estimatenumber
Rawtext
Classification label valuesarray

List Threads

SearchThreads with a snippet and the messages inside each.
Input fields[3]
FieldType
Querytext
Label IDschoice
Include Spam and Trashboolean
Limitnumber
Output fields[3]
FieldType
IDtext
Snippettext
History IDtext
Messagesarray

Retrieve a Draft Email

ActionDraft email returned in your chosen format.
Input fields[3]
FieldType
IDRequired
choice
FormatRequired
choice
Output fields[3]
FieldType
IDtext
Messageobject
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Size estimatenumber
Rawtext
Classification label valuesarray

Retrieve a Thread

ActionConversation thread that lists its snippet and messages.
Input fields[3]
FieldType
IDRequired
choice
FormatRequired
choice
Output fields[3]
FieldType
IDtext
Snippettext
History IDtext
Messagesarray

Retrieve an Email Message

ActionThe headers, body text and attachments of a message in one record.
Input fields[3]
FieldType
IDRequired
choice
Output fields[3]
FieldType
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Part IDtext
Mime typetext
Filenametext
Headersarray
Bodyobject
Partsarray
Size estimatenumber
Rawtext
Classification label valuesarray
Subjecttext
Fromtext
Totext
Cctext
Bcctext
Reply-Totext
Date headertext
Text contenttext
HTML contenttext
Attachmentsarray

Batch Delete Email Messages

ActionRemoves several email messages by ID in one request.
Input fields[3]
FieldType
Message IDsRequired
choice

Create a Draft Email

ActionSaves an email draft and returns its ID and message.
Input fields[3]
FieldType
Email ContentRequired
text
Recipient EmailRequired
email
Sender EmailRequired
email
Email SubjectRequired
text
Output fields[3]
FieldType
IDtext
Messageobject
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Size estimatenumber
Rawtext
Classification label valuesarray

Delete a Draft Email

ActionRemoves a single draft email from your mailbox.
Input fields[3]
FieldType
IDRequired
choice

Delete a Thread

ActionRemoves a conversation from your mailbox.
Input fields[3]
FieldType
IDRequired
choice

Delete an Email Message

ActionRemoves one message from your mailbox by its ID.
Input fields[3]
FieldType
IDRequired
choice

Make an API Call

universalCustom Gmail REST API request.
Input fields[3]
FieldType
URLRequired
text
MethodRequired
choice
Headersarray
Headerobject
Query Stringarray
Parameterobject
Bodytext
Output fields[3]
FieldType
Bodytext
Headersobject
Status codenumber

Send a Draft Email

ActionSends a saved draft and returns the message it created.
Input fields[3]
FieldType
IDRequired
choice
Output fields[3]
FieldType
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Part IDtext
Mime typetext
Filenametext
Headersarray
Bodyobject
Partsarray
Size estimatenumber
Rawtext
Classification label valuesarray

Send an Email Message

ActionComposes a new email and sends it right away.
Input fields[3]
FieldType
ToRequired
email
FromRequired
email
SubjectRequired
text
Email ContentRequired
text
Output fields[3]
FieldType
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Part IDtext
Mime typetext
Filenametext
Headersarray
Bodyobject
Partsarray
Size estimatenumber
Rawtext
Classification label valuesarray

Trash a Message

ActionPuts an email message into the trash.
Input fields[3]
FieldType
IDRequired
choice
Output fields[3]
FieldType
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Part IDtext
Mime typetext
Filenametext
Headersarray
Bodyobject
Partsarray
Size estimatenumber
Rawtext
Classification label valuesarray

Trash a Thread

ActionMoves an entire thread to the trash in one step.
Input fields[3]
FieldType
IDRequired
choice
Output fields[3]
FieldType
IDtext
Snippettext
History IDtext
Messagesarray

Untrash a Message

ActionReverses a trash action on one email message.
Input fields[3]
FieldType
IDRequired
choice
Output fields[3]
FieldType
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Part IDtext
Mime typetext
Filenametext
Headersarray
Bodyobject
Partsarray
Size estimatenumber
Rawtext
Classification label valuesarray

Untrash a Thread

ActionClears one conversation from the trash.
Input fields[3]
FieldType
IDRequired
choice
Output fields[3]
FieldType
IDtext
Snippettext
History IDtext
Messagesarray

Update a Draft Email

ActionRewrites an existing draft email using new address, subject and body values.
Input fields[3]
FieldType
IDRequired
choice
Raw Messagetext
Recipient EmailRequired
email
Sender EmailRequired
email
Email SubjectRequired
text
Email ContentRequired
text
Output fields[3]
FieldType
IDtext
Messageobject
IDtext
Thread IDtext
Label idsarray
Snippettext
History IDtext
Internal datedate
Payloadobject
Size estimatenumber
Rawtext
Classification label valuesarray

Update the Labels of a Thread

ActionChanges the label set on one thread.
Input fields[3]
FieldType
IDRequired
choice
Add Label IDsarray
Label IDtext
Remove Label IDsarray
Label IDtext
Output fields[3]
FieldType
IDtext
Snippettext
History IDtext
Messagesarray

Look for Gmail templates in the WEXTL template library.

Browse templates →
  1. WEXTL® Gmail Source Code connector implementation.
  2. Our users use cases and automations.
  3. Official API Documentation for Gmail.
  4. WEXTL® visual workflow builder data.

Last updated: Nov 29, 2026 17:02

How we write our apps documentation

How we compile these docs: sources, the role of AI, and how we verify.