Aqui o fluxo do n8n que criei com o Groq no lugar do Open AI
{
"name": "n8n-Exerc1",
"nodes": [
{
"parameters": {
"pollTimes": {
"item": [
{}
]
},
"output": "fields",
"fields": [
"body",
"createdDateTime",
"from",
"subject",
"toRecipients"
],
"filters": {},
"options": {}
},
"type": "n8n-nodes-base.microsoftOutlookTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"id": "2b397bb8-7d21-4826-89bd-dea61a9fcbc4",
"name": "Microsoft Outlook Trigger",
"credentials": {
"microsoftOutlookOAuth2Api": {
"id": "Pqq9LxVl22YFfW7R",
"name": "Microsoft Outlook OAuth2 API"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.body.content.replace(/<[^>]*>/g, ' ').replace(/\\s+/g, ' ').trim() }}",
"messages": {
"messageValues": [
{
"message": "Você é um assistente que resume e-mails longos em português do Brasil. Gere até 5 bullets curtos e claros, seguidos de uma frase executiva. Não invente nada que não esteja no e-mail. Responda sempre em HTML válido. Use <ul> e <li> para listas, <p> para parágrafos, <strong> para negrito. Não inclua <html>, <head> ou <body> — apenas o conteúdo interno."
}
]
},
"batching": {}
},
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.9,
"position": [
224,
-80
],
"id": "f57e1c7f-cca3-4a92-8d9f-f0dd533afbec",
"name": "Basic LLM Chain"
},
{
"parameters": {
"model": "llama-3.3-70b-versatile",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"typeVersion": 1,
"position": [
224,
128
],
"id": "83e4247a-3f82-4c1d-9224-ad58df03f134",
"name": "Groq Chat Model",
"credentials": {
"groqApi": {
"id": "wHTCyh9Ulbuf6d8d",
"name": "Groq account"
}
}
},
{
"parameters": {
"sendTo": "xxxxxx@gmail.com",
"subject": "=Resumo automático: {{$node[\"Microsoft Outlook Trigger\"].json.subject}}",
"message": "=Olá, Antonio! Assunto original: {{$node[\"Microsoft Outlook Trigger\"].json.subject}} De: {{$node[\"Microsoft Outlook Trigger\"].json.from.emailAddress.name}} Quando: {{$node[\"Microsoft Outlook Trigger\"].json.createdDateTime}} ---- RESUMO --- {{ $json.text }}- ",
"options": {}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
672,
-112
],
"id": "9e5fbafd-1f7c-4a4d-a313-8be853cab09c",
"name": "Send a message",
"webhookId": "42cca7d9-6832-4fc2-bd7c-56ee2a1689b4",
"credentials": {
"gmailOAuth2": {
"id": "2j3ELfhFSOy5J78f",
"name": "Gmail OAuth2 API"
}
}
}
],
"pinData": {},
"connections": {
"Groq Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Microsoft Outlook Trigger": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1",
"binaryMode": "separate"
},
"versionId": "03012f4b-67e1-437b-8eda-277e8f45d563",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "fd328c543d5f4c953fd81b0baf45232dd289e5d3555a420ac1ac65731dc480d7"
},
"id": "v69HDzWLgo1jxBhh",
"tags": []
}