Describe the problem/error/question
Can I extract all email addresses and names from labelled emails (in headings and body of email) from Gmail? When I filter emails using the Gmail trigger, the email body does not show all emails (from previous replies etc.).
What is the error message (if any)?
None
Please share your workflow
{
“nodes”: [
{
“parameters”: {
“pollTimes”: {
“item”: [
{
“mode”: “everyX”,
“value”: 30,
“unit”: “minutes”
}
]
},
“simple”: false,
“filters”: {
“labelIds”: [
“Label_5053468288142571036”
]
},
“options”: {
“downloadAttachments”: true
}
},
“type”: “n8n-nodes-base.gmailTrigger”,
“typeVersion”: 1.2,
“position”: [
0,
0
],
“id”: “77d2efed-7f1e-45eb-98f6-a2408ed88e77”,
“name”: “Check email label”,
“credentials”: {
“gmailOAuth2”: {
“id”: “ZNhLFKO0YvO5NMjk”,
“name”: “Gmail account”
}
}
},
{
“parameters”: {
“text”: “={{ $json.headers[‘delivered-to’] }}{{ $json.headers.received }}{{ $json.headers[‘in-reply-to’] }}{{ $json.headers.from }}{{ $json.headers.subject }}{{ $json.headers.to }}{{ $json.headers.subject }}”,
“attributes”: {
“attributes”: [
{
“name”: “email address”,
“description”: “@”,
“required”: true
}
]
},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.informationExtractor”,
“typeVersion”: 1,
“position”: [
220,
0
],
“id”: “5e7e4d2f-c56a-4b09-81a4-5e91785aad6e”,
“name”: “Information Extractor”
},
{
“parameters”: {
“modelName”: “models/gemini-1.5-flash”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“typeVersion”: 1,
“position”: [
320,
220
],
“id”: “f4bd2ec8-d39b-452d-a4d0-00288939f3b7”,
“name”: “Google Gemini Chat Model”,
“credentials”: {
“googlePalmApi”: {
“id”: “yhFMxuqUdC12IXA1”,
“name”: “Google Gemini(PaLM) Api account”
}
}
}
],
“connections”: {
“Check email label”: {
“main”: [
[
{
“node”: “Information Extractor”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Gemini Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “Information Extractor”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “211b05274c55832a4a5cceeb61357ff52da410829fe6433a269469cb2b7e19e8”
}
}
(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.)
Share the output returned by the last node
Only a single email is extracted from an email with multiple email addresses.
Information on your n8n setup
- n8n version: 1.81.4
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud in MS Edge
- Operating system: Windows 11