Save all attachments
Save the attachments of every Gmail message that matches a search or the filters, optionally marking them as read.
Command in the Google Workspace toolkit · id ooa.google/gmail_save_all_attachments · 14 inputs (2 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Access token | Credential | Yes | Google OAuth access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token. | |
| Target folder | File | Yes | Folder to save into. | |
| Name pattern | String | No | * | Only names matching this pattern, e.g. *.pdf. |
| Query | String | No | Gmail search selecting the messages; all messages with attachments when empty. | |
| From contains | String | No | Sender contains this text; separate several with ; to match any of them. | |
| Subject contains | String | No | Subject contains these words; separate several with ; to match any of them. | |
| Since | DateTime | No | Received on or after this time (UTC). | |
| Before | DateTime | No | Received before this time (UTC). | |
| Status | String | No | any | Only unread or only read messages. |
| Label | String | No | Only messages with this label, e.g. INBOX or Invoices; several separated by ; (G5). | |
| Overwrite | Boolean | No | false | Replace files of the same name instead of adding a number such as (2). |
| Mark read | Boolean | No | false | Mark each matching message as read afterwards. |
| Maximum messages | Number | No | 100 | Upper limit of messages handled in one run; 0 for no limit (G5). |
| Endpoint address | String | No | Replaces https://*.googleapis.com for testing or a proxy; leave empty normally. |
Outputs
| Output | Type | What it is |
|---|---|---|
| files | List | Saved file paths. |
| message_count | Number | Number of messages that matched. |