Issue using Gmail API using MCP

Hello all,

I’m experiencing some issues when trying to retrieve a Message-ID from a Gmail email. When I use the custom API call feature manually in ActivePieces, I can successfully retrieve the Message-ID using this configuration:

{
  "url": "https://gmail.googleapis.com/gmail/v1/users/me/messages/1967d3fb480ba002",
  "method": "GET",
  "headers": {},
  "queryParams": {
    "format": "metadata",
    "metadataHeaders": "Message-ID"
  }
}

However, when attempting the same operation through Claude, the request fails with “Invalid URL” errors. I’ve also tried using the standard Gmail message and thread reading functions, but the Message-ID header isn’t included in the responses.

Any guidance would be greatly appreciated!

Thanks!

Claude:

Claudes first try:

Request

{
  `headers`: {},
  `queryParams`: {
    `format`: `metadata`,
    `metadataHeaders`: `Message-ID`
  }
}

Response

✅ Successfully executed Custom API Call

Make a custom API call to a specific endpoint

```json
{
  "success": false,
  "input": {
    "headers": {},
    "queryParams": {
      "format": "metadata",
      "metadataHeaders": "Message-ID"
    },
    "auth": "**REDACTED**"
  },
  "output": "Method is null or undefined"
}

Second try:

Request

{
  `url`: `https://gmail.googleapis.com/gmail/v1/users/me/messages/1967d3fb480ba002`,
  `method`: `GET`,
  `headers`: {},
  `queryParams`: {
    `format`: `metadata`,
    `metadataHeaders`: `Message-ID`
  }
}

Response

✅ Successfully executed Custom API Call

Make a custom API call to a specific endpoint

```json
{
  "success": false,
  "input": {
    "url": "https://gmail.googleapis.com/gmail/v1/users/me/messages/1967d3fb480ba002",
    "method": "GET",
    "headers": {},
    "queryParams": {
      "format": "metadata",
      "metadataHeaders": "Message-ID"
    },
    "auth": "**REDACTED**"
  },
  "output": "Invalid URL"
}

AP Cloud works fine: