gmail_label
Apply or remove labels on selected Gmail conversations by index, search query, folder, or subject match to organize messages and update label assignments.
Instructions
Apply and/or remove labels on conversations ('Label as' dialog; 'Inbox' is a label too).
The result lists the labels offered by the dialog ('labels').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | Label names to apply (case-insensitive). | |
| all | No | Act on EVERY conversation of the query/folder list (Gmail's 'Select all' after loading the whole list; repeated until the list is empty for actions that remove conversations from it). Needs query or folder; no index/indexes/match. | |
| index | No | Row index from gmail.list / gmail.search (0 = first row). | |
| match | No | Select every row whose subject contains this text (case-insensitive). | |
| query | No | Run this Gmail search first and take the rows from its results. | |
| folder | No | Open this folder/label first and take the rows from it. | |
| remove | No | Label names to remove. | |
| indexes | No | Several row indexes (multi-selection). | |
| max_rows | No | With match, look at most at this many rows from the top. |