I’m trying to get a summary of all my unread, labelled emails in Gmail, run them through Gemini and then get the summary sent to my Telegram bot. Got all the credentials and the workflow set up.
When running the workflow, the gmail node seems to pull in the data fine (text item in the schema), but the Agent node cannot get the text from all the unread emails and most of the messages I get to my bot are “I’m still receiving an empty value for the text field”. This is although 2 of the unread emails got summarised and came through to the bot correctly. After running the workflow again, I did not get any more summaries, and instead keep getting the following telegram message: “I am unable to process your request to extract the text from your emails. The tool Gmail1 can only be used to retrieve messages from the Gmail API, but it does not have the functionality to parse JSON or extract specific fields like “text”.”
No error message on the workflow, just seemingly missing something crucial. Bear in mind, the workflow does not seem to use the tool node “Gmail1” attached to the AI Agent, as I could not get the workflow to work without the Gmail node after the schedule trigger…
Would also be great to just receive 1 Telegram message, instead of the amount of emails it parses and sending a separate one… Also quite new here, so just learning! Would appreciate any help
Here is the Agent node code:
Share the output returned by the last node
[
{
"ok": true,
"result": {
"message_id": 212,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615893,
"text": "I am unable to fulfill your request to extract the text content from your emails. The Gmail1 tool can only retrieve messages from the Gmail API. It does not have the ability to parse JSON or extract specific fields like \"text\".\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 86,
"length": 6,
"type": "code"
},
{
"offset": 230,
"length": 41,
"type": "italic"
},
{
"offset": 271,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 213,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615893,
"text": "I am unable to extract the text content from your emails. The Gmail1 tool can only retrieve messages from the Gmail API, but it cannot parse JSON or extract specific fields like \"text\".\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 62,
"length": 6,
"type": "code"
},
{
"offset": 188,
"length": 41,
"type": "italic"
},
{
"offset": 229,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 214,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615893,
"text": "Unfortunately, I am unable to process your request. The Gmail1 tool is designed to retrieve messages from the Gmail API, but it lacks the functionality to parse JSON or extract specific fields such as \"text\".\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 56,
"length": 6,
"type": "code"
},
{
"offset": 211,
"length": 41,
"type": "italic"
},
{
"offset": 252,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 215,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I am unable to fulfill your request to extract the text from your emails using the available tools. The Gmail1 tool can only retrieve messages from the Gmail API, but it does not have the functionality to parse JSON or extract specific fields like \"text\".\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 104,
"length": 6,
"type": "code"
},
{
"offset": 258,
"length": 41,
"type": "italic"
},
{
"offset": 299,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 216,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I am sorry, I cannot fulfill this request. The available tool Gmail1 is designed to retrieve messages from the Gmail API. It does not have the capacity to parse JSON structures or extract text content from emails.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 62,
"length": 6,
"type": "code"
},
{
"offset": 216,
"length": 41,
"type": "italic"
},
{
"offset": 257,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 217,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I apologize, but I am unable to complete your request. The Gmail1 tool can only retrieve messages from the Gmail API. It does not have the ability to parse JSON or extract specific fields like \"text\".\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 59,
"length": 6,
"type": "code"
},
{
"offset": 203,
"length": 41,
"type": "italic"
},
{
"offset": 244,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 218,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I am unable to access the content of your emails, as the available tool Gmail1 can only retrieve messages from the Gmail API, but it cannot parse JSON or extract specific fields like \"text\". Therefore, I cannot summarize your unread emails or provide financial advice based on their content.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 72,
"length": 6,
"type": "code"
},
{
"offset": 294,
"length": 41,
"type": "italic"
},
{
"offset": 335,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 219,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I'm sorry, but I am unable to complete your request. The Gmail1 tool can only retrieve messages from the Gmail API. It does not have the ability to parse JSON or extract specific fields like \"text\".\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 57,
"length": 6,
"type": "code"
},
{
"offset": 201,
"length": 41,
"type": "italic"
},
{
"offset": 242,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 220,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I am unable to fulfill your request because the Gmail1 tool can only retrieve messages from the Gmail API. It lacks the functionality to parse JSON or extract specific fields such as \"text.\" Therefore, I cannot summarize your emails or provide financial advice based on their content.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 48,
"length": 6,
"type": "code"
},
{
"offset": 287,
"length": 41,
"type": "italic"
},
{
"offset": 328,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 221,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I am unable to fulfill this request. The available tool Gmail1 is designed to retrieve messages from the Gmail API, but it does not have the capacity to parse JSON structures or extract text content from emails. Therefore, I cannot summarize your emails or provide financial advice based on their content.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 56,
"length": 6,
"type": "code"
},
{
"offset": 308,
"length": 41,
"type": "italic"
},
{
"offset": 349,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 222,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I am unable to complete that request. The Gmail1 tool can only retrieve messages from the Gmail API, but it cannot parse JSON or extract specific fields like \"text\".\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 42,
"length": 6,
"type": "code"
},
{
"offset": 168,
"length": 41,
"type": "italic"
},
{
"offset": 209,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 223,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I cannot fulfill this request. The tool Gmail1 can only retrieve messages from the Gmail API, but it can't parse JSON or extract text.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 40,
"length": 6,
"type": "code"
},
{
"offset": 137,
"length": 41,
"type": "italic"
},
{
"offset": 178,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 224,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I am unable to process this request. The Gmail1 tool is designed to retrieve messages from the Gmail API, but it lacks the functionality to parse JSON or extract specific fields like \"text\". Therefore, I cannot summarize your emails or provide financial advice based on their content.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 41,
"length": 6,
"type": "code"
},
{
"offset": 287,
"length": 41,
"type": "italic"
},
{
"offset": 328,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 225,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I am sorry, I cannot fulfill this request. The available tool Gmail1 can only retrieve messages from the Gmail API. It does not have the ability to parse JSON or extract text content.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 62,
"length": 6,
"type": "code"
},
{
"offset": 186,
"length": 41,
"type": "italic"
},
{
"offset": 227,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 226,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I'm sorry, but I am unable to complete your request. The Gmail1 tool can only retrieve messages from the Gmail API. It does not have the functionality to parse JSON or extract the text content from the messages.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 57,
"length": 6,
"type": "code"
},
{
"offset": 214,
"length": 41,
"type": "italic"
},
{
"offset": 255,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 227,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I am unable to provide a response to your request. The available tool Gmail1 can only retrieve messages from the Gmail API, but it cannot parse JSON or extract specific fields like \"text\".\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 70,
"length": 6,
"type": "code"
},
{
"offset": 191,
"length": 41,
"type": "italic"
},
{
"offset": 232,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 228,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I apologize, I am unable to fulfill this request. The Gmail1 tool is designed to retrieve messages from the Gmail API, but it does not have the capacity to parse JSON or extract text content.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 54,
"length": 6,
"type": "code"
},
{
"offset": 194,
"length": 41,
"type": "italic"
},
{
"offset": 235,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
},
{
"ok": true,
"result": {
"message_id": 229,
"from": {
"id": 7823671008,
"is_bot": true,
"first_name": "Gmail",
"username": "Akh_Gemini_Bot"
},
"chat": {
"id": 436761695,
"first_name": "B",
"username": "Robis74",
"type": "private"
},
"date": 1745615894,
"text": "I'm sorry, I can't process your request. The Gmail1 tool is limited to retrieving messages from the Gmail API and doesn't have the functionality to parse JSON or extract text content.\n\n\nThis message was sent automatically with n8n",
"entities": [
{
"offset": 45,
"length": 6,
"type": "code"
},
{
"offset": 186,
"length": 41,
"type": "italic"
},
{
"offset": 227,
"length": 3,
"type": "text_link",
"url": "https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.telegram_9d593e1bfc8e736af9d6c0252a2d24b7f2550466563ed29fbda840b87d0b069d"
}
],
"link_preview_options": {
"is_disabled": true
}
}
}
]
Information on your n8n setup
-# Debug info
core
- n8nVersion: 1.88.0
- platform: docker (cloud)
- nodeJsVersion: 20.19.0
- database: sqlite
- executionMode: regular
- concurrency: 5
- license: community
- consumerId: 00000000-0000-0000-0000-000000000000
storage
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: filesystem
pruning
- enabled: true
- maxAge: 168 hours
- maxCount: 2500 executions
client
- userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/135.0.0.0 safari/537.36 edg/135.0.0.0
- isTouchDevice: false