Gmail Get and Get Many Not returning the payload

Describe the problem/error/question

I’ve tried Get and GetMany, when I attempt to process the payload in a code node all I get is the followng:
“payload”:
{
“mimeType”:
“multipart/alternative”
}

I’ve even logged to console and that’s all the data that is there.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        160
      ],
      "id": "b33ea886-91bd-4050-a636-ff76bcb73ced",
      "name": "When clicking ‘Test workflow’"
    },
    {
      "parameters": {
        "operation": "getAll",
        "limit": 10,
        "filters": {
          "readStatus": "unread"
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        220,
        160
      ],
      "id": "102bd732-f61a-40a6-83c1-d47bfd781aeb",
      "name": "Gmail",
      "webhookId": "371bf002-d879-41c3-9b42-f7426d3e1d81",
      "alwaysOutputData": false,
      "credentials": {
        "gmailOAuth2": {
          "id": "ZSQQIBWKl18e1xhC",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "batchSize": 10,
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        440,
        160
      ],
      "id": "bc2969ed-fe0b-4ea5-9772-fbe57504feac",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "operation": "markAsRead",
        "messageId": "={{ $json.id }}"
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        680,
        180
      ],
      "id": "37897831-de69-4cb1-941a-eec86929d069",
      "name": "Gmail1",
      "webhookId": "c898cd4d-cd33-4db9-bc9b-a62025cb513c",
      "credentials": {
        "gmailOAuth2": {
          "id": "ZSQQIBWKl18e1xhC",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=\n\nYou are an email assistant helping to classify emails into Ads, Politics or Review\n\nAnything that is considering marketing to a non-specific audience is an Ad\nAnything pertaining to political content is Politics\nEverything else is Review",
        "hasOutputParser": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        880,
        135
      ],
      "id": "96a8dca7-acea-44df-86b4-9f71b9810864",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "options": {
          "temperature": 1
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        800,
        360
      ],
      "id": "e3a807e7-8321-40dc-887a-b2e62cb86581",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "id": "OZ6bF34Z5LCE9Esy",
          "name": "Google Gemini(PaLM) Api account"
        }
      }
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"label\": \"string\",\n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.2,
      "position": [
        1028,
        355
      ],
      "id": "d1680ef3-f74d-4e03-9730-f1b5cf66fc5b",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "operation": "get",
        "messageId": "={{ $json.id }}"
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1040,
        160
      ],
      "id": "d38dccbd-9ac7-48a5-ba38-8308655c4c45",
      "name": "Gmail2",
      "webhookId": "76b2effa-1788-4361-b143-170d19c9d992",
      "credentials": {
        "gmailOAuth2": {
          "id": "ZSQQIBWKl18e1xhC",
          "name": "Gmail account"
        }
      }
    }
  ],
  "connections": {
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gmail2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Gmail1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail1": {
      "main": [
        []
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "a2f466beda750d854aca38ce8e6617621995d49aaf3bfa1d1f7886adf8fac876"
  }
}

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi,

Can you please post your workflow correctly.

Insert your workflow by clicking ‘</>’ and pasting in the workflow’s code

Thanks
J.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.