Describe the problem/error/question
Hello, I have an AI workflow that extracts numbers from an email on a daily basis and puts them in to an airtable base. It works really well, apart from one issue.
For the gmail node I have to re-forward the email to myself to get the textashtml. Without re-forwarding I just get html that doesn’t include email body.
Without me forwarding the email to myself I only get HTML as a variable. This doesn’t contain the email body.
After forwarding to myself I get htmlasText that can be used in the Ai node.
How can I get the gmail node to get textasHTML without me having to re-forward each day.
Please share your workflow
{
“nodes”: [
{
“parameters”: {
“rule”: {
“interval”: [
{
“triggerAtHour”: 10
}
]
}
},
“type”: “n8n-nodes-base.scheduleTrigger”,
“typeVersion”: 1.2,
“position”: [
-624,
432
],
“id”: “c19c334b-77fa-4a20-bf06-c79380f20c15”,
“name”: “Schedule Trigger”
},
{
“parameters”: {
“operation”: “getAll”,
“limit”: 1,
“simple”: false,
“filters”: {
“labelIds”: [
“Label_7548288498897665131”
],
“readStatus”: “unread”
},
“options”: {}
},
“type”: “n8n-nodes-base.gmail”,
“typeVersion”: 2.1,
“position”: [
-272,
432
],
“id”: “ef09ed72-bf8d-4d76-a534-b22ac52ce5d9”,
“name”: “Get many messages”,
“webhookId”: “28aa610d-b05c-4051-9281-2a82f39bb560”,
“credentials”: {
“gmailOAuth2”: {
“id”: “342WqGXoDgujaTAn”,
“name”: “Gmail account”
}
}
},
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json.textAsHtml }}. Please read this HMTL text. Please extract data from the paragraphs “P&P Yesterday’s Task Summary <” and “P&P Yesterday’s Task Summary - London”.\n\nEach paragraph will have breaks that include 9 integers. These integers need to be mapped in order according to the titles below:\n\n"DROPPED_BY" as an email or null, \n1.“Bonus Swap” as an Integer, \n2.“Battery Swap” as an integer, \n3.“Rescue” as an Integer, \n4"Rebalance" as an Integer,\n5.“Deploy” as an Integer, \n6.“Rebalance&/…” as an integer, \n7.“IFQC” as an integer, \n8.“IFR” as an integer,\n9.“Repark” as an integer. \n\nPlease complete each text break individually\n\nPlease assign Oxford as the city for any data from the paragraph titled “P&P Yesterday’s Task Summary <” and London for any data from paragraph “P&P Yesterday’s Task Summary - London”. The date (the date will be one day previous to the date of the email and must be in ISO 8601 format).”,
“hasOutputParser”: true,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 2.1,
“position”: [
-64,
432
],
“id”: “e392d7f4-44a4-404b-97b6-9a768cb81e9f”,
“name”: “Tasks Agent”,
“retryOnFail”: true,
“onError”: “continueRegularOutput”
}
],
“connections”: {
“Schedule Trigger”: {
“main”: [
[
{
“node”: “Get many messages”,
“type”: “main”,
“index”: 0
}
]
]
},
“Get many messages”: {
“main”: [
[
{
“node”: “Tasks Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Tasks Agent”: {
“main”: [
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “038dbcdf23f69cd7b392e56d74dd34415b051665c2f28de5bb4b4107fb4aeee8”
}
}
Share the output returned by the last node
Information on your n8n setup
- n8n version: up to date
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main): own
- Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
- Operating system: Mac