AutomationFlowsEmail & Gmail › Gmail Label Manager: Remove & Add Labels

Gmail Label Manager: Remove & Add Labels

Original n8n title: Get Messages with a Certain Label, Remove the Label, and Add a New One

Get messages with a certain label, remove the label, and add a new one. Uses manualTrigger, gmail. Event-driven trigger; 4 nodes.

Event trigger★★☆☆☆ complexity4 nodesGmail
Email & Gmail Trigger: Event Nodes: 4 Complexity: ★★☆☆☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "175",
  "name": "Get messages with a certain label, remove the label, and add a new one",
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        250,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        450,
        300
      ],
      "parameters": {
        "resource": "message",
        "operation": "getAll",
        "additionalFields": {
          "format": "full",
          "labelIds": [
            "Label_103811885290186237"
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "Gmail1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        650,
        300
      ],
      "parameters": {
        "labelIds": [
          "Label_103811885290186237"
        ],
        "resource": "messageLabel",
        "messageId": "={{$node[\"Gmail\"].json[\"id\"]}}",
        "operation": "remove"
      },
      "credentials": {
        "gmailOAuth2": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "Gmail2",
      "type": "n8n-nodes-base.gmail",
      "position": [
        850,
        300
      ],
      "parameters": {
        "labelIds": [
          "Label_140673791182006844"
        ],
        "resource": "messageLabel",
        "messageId": "={{$node[\"Gmail\"].json[\"id\"]}}"
      },
      "credentials": {
        "gmailOAuth2": "<your credential>"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {},
  "connections": {
    "Gmail": {
      "main": [
        [
          {
            "node": "Gmail1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail1": {
      "main": [
        [
          {
            "node": "Gmail2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Get messages with a certain label, remove the label, and add a new one. Uses manualTrigger, gmail. Event-driven trigger; 4 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

Email Automation Suite. Uses gmailTrigger, supabase, gmail. Event-driven trigger; 12 nodes.

Gmail Trigger, Supabase, Gmail
Email & Gmail

[](https://www.youtube.com/watch?v=jxT6XO4eUwI)

Google Sheets, Gmail, Gmail Trigger
Email & Gmail

This workflow automatically scans food delivery platforms and restaurant websites to find the best deals and discounts. It helps you save money on meals by aggregating special offers and promotions in

HTTP Request, Gmail
Email & Gmail

This workflow sends an alert to the channel of your choice when an execution fails. Connect the tool where you want alerts to be sent (eg. Gmail, Slack, Teams, etc.) Save the workflow Turn on error no

Error Trigger, Gmail, Slack
Email & Gmail

🧠 5分鐘搞定n8n + Google OAuth. Uses googleDocs, googleDrive, googleSheets, googleCalendar. Event-driven trigger; 8 nodes.

Google Docs, Google Drive, Google Sheets +2