Olá, eu usei outra LLM para fazer mas gostaria de ter usado a do chat gpt. abaixo o código do meu fluxo, meu primeiro fluxo kkk
"name": "My workflow",
"nodes": [
{
"parameters": {
"pollTimes": {
"item": [
{}
]
},
"filters": {},
"options": {}
},
"type": "n8n-nodes-base.microsoftOutlookTrigger",
"typeVersion": 1,
"position": [
-320,
-16
],
"id": "6f743140-ea29-470c-86a9-4cf9e7b08d24",
"name": "Microsoft Outlook Trigger",
"credentials": {
"microsoftOutlookOAuth2Api": {
"id": "88WyptF9aW7lNjzV",
"name": "Microsoft Outlook account"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.emailText }}\n",
"messages": {
"messageValues": [
{
"message": "Você é um assistente que resume e-mails longos em português do Brasil. Gere até 5 bullets curtos e claros e depois uma frase executiva final. Não invente nada que não esteja no texto."
},
{
"type": "HumanMessagePromptTemplate",
"message": "=Aqui está o e-mail que você deve resumir: {{ $json.emailText }}"
}
]
},
"batching": {}
},
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.7,
"position": [
128,
-16
],
"id": "d6478303-3e62-4385-b82f-989546bafac4",
"name": "Basic LLM Chain",
"executeOnce": false
},
{
"parameters": {
"options": {
"maxTokens": 2000
}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
304,
224
],
"id": "700a1005-01d1-4c90-b3ae-4d0e76b7a6f4",
"name": "OpenRouter Chat Model",
"credentials": {
"openRouterApi": {
"id": "EwQiUeB5MSd6FzTV",
"name": "OpenRouter account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "25c8490e-d268-406f-a64d-7a34427b7b8e",
"name": "emailText",
"value": "={{ $json.bodyPreview.substring(0, 2000) }}",
"type": "string"
},
{
"id": "8052e30b-7a4b-40f2-9778-e02ccb1b00fb",
"name": "",
"value": "",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-112,
-16
],
"id": "f5163f74-8ac7-4e63-934a-d97f9b3234aa",
"name": "Edit Fields"
},
{
"parameters": {
"toRecipients": "jheimysbb@gmail.com",
"subject": "={{ $('Microsoft Outlook Trigger').item.json.subject }}",
"bodyContent": "={{ $json.text }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.microsoftOutlook",
"typeVersion": 2,
"position": [
448,
0
],
"id": "e7e08826-e773-4b26-81d9-f14c8ea551b4",
"name": "Send a message",
"webhookId": "c9be2aa4-b570-4a5d-94bc-c3022443722c",
"credentials": {
"microsoftOutlookOAuth2Api": {
"id": "88WyptF9aW7lNjzV",
"name": "Microsoft Outlook account"
}
}
}
],
"pinData": {},
"connections": {
"Microsoft Outlook Trigger": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Edit Fields": {
"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"
},
"versionId": "22b33980-3cd3-4c62-8b6d-952ffc90a02d",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "c57d3afe132fbf1e24b9f05b574d0072196cd4a8ce508b92b315b15b525f2ff6"
},
"id": "hljfU2vvZP3fuycz",
"tags": []
}