⚡ Only 300 spots remaining • Closes in 2d 14h 32m

Back to Workflow Library
Utilities

Get messages with a certain label, remove the label, and add a new one

This comprehensive workflow automation helps you streamline Get messages with a certain label, remove the label, and add a new one processes. By using this blueprint, you can eliminate manual data entry and ensure seamless integration between your favorite platforms.

#messages
#with
#certain
#label
#remove

Automation Logic

n8n JSON Blueprint

This workflow is pre-configured and ready for deployment. Simply import the JSON template into your n8n instance and configure your credentials.

This is an exclusive blueprint. Copy the JSON below to use it.

QUICK DEPLOY

  • 1
    Download the .json file
  • 2
    Open n8n & click "Import"
  • 3
    Configure your API keys

PRO TIP

Always test your workflow in a development environment before pushing to production.

JSON BLUEPRINT

n8n-workflow.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": "Gmail"
      },
      "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": "Gmail"
      },
      "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": "Gmail"
      },
      "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
          }
        ]
      ]
    }
  }
}

To use this, copy the JSON above and paste it directly onto your n8n canvas.

IMPLEMENTATION GUIDE

Required Nodes

  • messages Node
  • with Node
  • certain Node
  • label Node
  • remove Node
  • Cron / Webhook Trigger

Core Benefits

  • 100% Automated Execution
  • Reduces Manual Data Entry
  • Infinite Scalability

Need Help Building Your Private Cloud?

Join the elite marketers who have offloaded their entire backend to n8n. Get direct support and custom builds in our private forum.

user