> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Google Gmail connector

- Connector: `appmixer.google.gmail`
- Version: 3.1.5
- Components: 20 (4 triggers, 16 actions)

Gmail is a free advertising-supported email service provided by Google. Users can access it on the web and through mobile apps, as well as through third-party programs. It's one of the most popular email services in the world.

- Connector page: <https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5>
- Source code: <https://github.com/clientIO/appmixer-connectors/tree/dev/src/appmixer/google/gmail>
- Download package: <https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/download>

## Authentication

**Type:** OAuth 2

This connector is globally authenticated and verified by Appmixer (Authentication Hub) and is ready to use without registering your own OAuth application with the provider. You can still use your own OAuth credentials (clientId and clientSecret) - see the Connector Configuration section of the documentation. The Authentication Hub is enabled for all hosted Appmixer tenants; on self-managed installations it has to be explicitly set.

**Scopes:**

- `profile`
- `email`

## Triggers (4)

- [New Attachment](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.NewAttachment.md) (`appmixer.google.gmail.NewAttachment`): This trigger activates whenever a new attachment is received in your Gmail inbox. Additional scopes: `https://www.googleapis.com/auth/gmail.readonly`.
- [New Email](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.NewEmail.md) (`appmixer.google.gmail.NewEmail`): Triggers whenever a new email is received or created in your Gmail account. This includes emails across all labels or specific labels as configured. Additional scopes: `https://www.googleapis.com/auth/gmail.readonly`.
- [New Label](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.NewLabel.md) (`appmixer.google.gmail.NewLabel`): This trigger fires every time any new label is added in your inbox. Additional scopes: `https://www.googleapis.com/auth/gmail.readonly`.
- [New Starred Email](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.NewStarredEmail.md) (`appmixer.google.gmail.NewStarredEmail`): This trigger fires every time any new starred email arrives in your inbox. Additional scopes: `https://www.googleapis.com/auth/gmail.readonly`.

## Actions (16)

- [Create Draft](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.CreateDraft.md) (`appmixer.google.gmail.CreateDraft`): Create new draft. Additional scopes: `https://www.googleapis.com/auth/gmail.modify`.
- [Add Labels To Email](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.AddLabelsToEmail.md) (`appmixer.google.gmail.AddLabelsToEmail`): Adds a label(s) to emails. Additional scopes: `https://www.googleapis.com/auth/gmail.modify`.
- [Delete Email](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.DeleteEmail.md) (`appmixer.google.gmail.DeleteEmail`): Delete email from your gmail. Additional scopes: `https://mail.google.com/`.
- [Create Label](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.CreateLabel.md) (`appmixer.google.gmail.CreateLabel`): Create new label. Additional scopes: `https://www.googleapis.com/auth/gmail.labels`.
- [Delete Label](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.DeleteLabel.md) (`appmixer.google.gmail.DeleteLabel`): Delete label. Additional scopes: `https://www.googleapis.com/auth/gmail.labels`.
- [Download Attachment](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.DownloadAttachment.md) (`appmixer.google.gmail.DownloadAttachment`): Download an email attachment. Additional scopes: `https://www.googleapis.com/auth/gmail.readonly`.
- [Find Emails](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.FindEmails.md) (`appmixer.google.gmail.FindEmails`): Finds emails in Gmail based on a search query. You can retrieve emails as a single item, multiple items, or save them directly to a file. Each message resource contains only the Email ID and Thread ID. To get detailed information about specific emails, use the Get Email component. For guidance on search queries, refer to the [Gmail Search Documentation](https://support.google.com/mail/answer/7190?hl=en). This component will return a maximum of 500 records. Additional scopes: `https://www.googleapis.com/auth/gmail.readonly`.
- [Find Or Create Label](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.FindOrCreateLabel.md) (`appmixer.google.gmail.FindOrCreateLabel`): Searches for a Gmail label by name and returns the Label ID if found. If the label is not found, you can choose to automatically create a new label instead of returning a 'Not Found' response. This component offers flexibility in managing your Gmail labels by either retrieving existing labels or seamlessly creating new ones when needed. Additional scopes: `https://www.googleapis.com/auth/gmail.labels`.
- [Get Email](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.GetEmail.md) (`appmixer.google.gmail.GetEmail`): Retrieves an email from your Gmail. Additional scopes: `https://www.googleapis.com/auth/gmail.readonly`.
- [Make Api Call](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.MakeApiCall.md) (`appmixer.google.gmail.MakeApiCall`): Generic method for making API calls to a 3rd party service. Additional scopes: `https://mail.google.com`.
- [Mark Email As Read](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.MarkEmailAsRead.md) (`appmixer.google.gmail.MarkEmailAsRead`): Marks an email or draft as read. Additional scopes: `https://www.googleapis.com/auth/gmail.modify`.
- [Mark Email As Unread](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.MarkEmailAsUnread.md) (`appmixer.google.gmail.MarkEmailAsUnread`): Marks an email or draft as unread. Additional scopes: `https://www.googleapis.com/auth/gmail.modify`.
- [Move Email](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.MoveEmail.md) (`appmixer.google.gmail.MoveEmail`): Moves an email to another folder. Additional scopes: `https://www.googleapis.com/auth/gmail.modify`.
- [Remove Label From Email](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.RemoveLabelFromEmail.md) (`appmixer.google.gmail.RemoveLabelFromEmail`): Remove labels from existing email Additional scopes: `https://www.googleapis.com/auth/gmail.modify`.
- [Reply To Email](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.ReplyToEmail.md) (`appmixer.google.gmail.ReplyToEmail`): Send a reply to an existing email Additional scopes: `https://www.googleapis.com/auth/gmail.modify`.
- [Send Email](https://connectors.appmixer.com/connector/appmixer.google.gmail/3.1.5/component/appmixer.google.gmail.SendEmail.md) (`appmixer.google.gmail.SendEmail`): Send a new email. Additional scopes: `https://www.googleapis.com/auth/gmail.modify`.

## Changelog

### 3.1.5

- MakeApiCall: Request Headers and Query Parameters set in the Designer are now sent. They were silently dropped: the key-value field stores its rows as a JSON object string, which the component did not parse.

### 3.1.4

- Output examples for DeleteEmail, DeleteLabel and FindOrCreateLabel.

### 3.1.3

- SendEmail now stops with a clear error when To is missing; removed the unused icon.svg files from NewEmail and SendEmail (the icons come from component.json); added output examples.

### 3.1.2

- AddLabelsToEmail, CreateDraft, CreateLabel, DownloadAttachment, GetEmail, RemoveLabelFromEmail and ReplyToEmail now stop with a clear error when a required input is missing instead of calling the API; added output examples.

### 3.1.1

- Added missing output examples to the NewAttachment, NewLabel and NewStarredEmail triggers.

### 3.1.0

- Added test() (Flow Test Mode) to all triggers: NewEmail, NewAttachment, NewLabel, NewStarredEmail — emit one realistic item via a read-only call, reusing the same lib helpers as tick().

### 3.0.0

- (breaking change) MakeApiCall: headers and parameters changed to key-value array inputs (body remains textarea/JSON to support nested structures) per standard #1459 — existing flows that used the old string/textarea headers or parameters must be updated

### 2.0.9

- Added output examples to component schemas.

### 2.0.8

- Added conditional debug logging to trigger components - debug messages are now disabled by default and can be enabled via DEBUG configuration.

### 2.0.7

- NewEmail Trigger - Added output port label for Sender's email address and name

### 2.0.6

- NewEmail Trigger - Added support for input of labels
- NewAttachment Trigger - Added support for labels input, filter Emails based on selected filters and fetch their attachments
- AddLabelsToEmail Action
- DeleteEmail Action
- DeleteLabel Action - Input of list of user defined labels added
- ListSignatures Action - List default signature from Gmail
- SendEmail Action - Added input support for CC, BCC, Labels, Signature
- CreateDraft Action - Added input support for CC, BCC, Labels, Attachments, Signature
- RemoveLabelFromEmail - new action
- GetAttachment - Added support for inputting email ID and then selecting which attachment to download from that email
- ReplyEmail - new action
- ListAttachments - new action
- FindEmails - new action
- Breaking change - removal of account from `connected accounts` and re-authentication of Gmail account will be required
- DeleteEmail - Breaking Change: Ultimate Scope of mail.google.com added. Will require removal of account from `connected accounts` and re-authentication of Gmail account
- CreateDraft - Breaking Change: New Scope of email.modify added. Will require removal of account from `connected accounts` and re-authentication of Gmail account
- Breaking change - updating the auth service to appmixer:google:gmail. Will require re authentication
- FindOrCreateLabel - NewAction
- Moving auth.js from googleapis to httpRequest, improving tooltips and marking fields required
- Adding index and total messages count in the output port options of FindEmails
- Renamed GetAttachment to DownloadAttachment

### 1.2.0

- Added attachments in outPorts of GetEmail and NewEmail.
- Added 'GetAttachment' component.

### 1.1.5

- GetEmail: update tooltip.

### 1.1.4

- Fixed quota issues.

### 1.1.3

- Added new components.

### 1.1.2

- Scope for all components reviewed and minimized.

### 1.1.1

- NewEmail component does not need https://mail.google.com/ scope

### 1.1.0

- Add Google branded sign-in button.

### 1.0.0

- Initial version
