Hello everyone,
I'm currently developing my AI Email Agent using callin.io cloud. I'm trying to understand why my OpenAI chat model isn't working with a standard Chat Trigger input.
Here's the error message I'm encountering:
json
{ "status": 400, "headers": { "access-control-expose-headers": "X-Request-ID", "alt-svc": "h3=":443"; ma=86400", "cf-cache-status": "DYNAMIC", "cf-ray": "93c9b72adbf19b80-FRA", "connection": "keep-alive", "content-length": "187", "content-type": "application/json", "date": "Thu, 08 May 2025 14:41:00 GMT", "openai-organization": "_____", "openai-processing-ms": "30", "openai-version": "2020-10-01", "server": "cloudflare", "set-cookie": "__cf_bm=tMNFRYF1T1yIcHSYor.UVgECVtal1TCtKY.tYkVuxak-1746715260-1.0.1.1-JwElmaMguV.t_vDCEc_dntDCqiIOd_tVuOPz2Y18N.7bhWrKYpQMMOBrnSjBYjRJGzO0h_qkQO3pjMGmHvy9xoCZlCnUmHruauP.E.libt8; path=/; expires=Thu, 08-May-25 15:11:00 GMT; <a href="http://domain=.api.openai.com" rel="noopener nofollow ugc">domain=.api.openai.com</a>; HttpOnly; Secure; SameSite=None, _cfuvid=.WcSCx6UY5qaB4lHSYVr5e5HzXmjnyGtACe9Q6lNCOo-1746715260898-0.0.1.1-604800000; path=/; <a href="http://domain=.api.openai.com" rel="noopener nofollow ugc">domain=.api.openai.com</a>; HttpOnly; Secure; SameSite=None", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", "x-envoy-upstream-service-time": "33", "x-ratelimit-limit-requests": "10000", "x-ratelimit-limit-tokens": "200000", "x-ratelimit-remaining-requests": "9999", "x-ratelimit-remaining-tokens": "199325", "x-ratelimit-reset-requests": "8.64s", "x-ratelimit-reset-tokens": "202ms", "x-request-id": "req_34980dcb4f9ef71e85e8553a62df8074" }, "request_id": "req_34980dcb4f9ef71e85e8553a62df8074", "error": { "message": "Invalid value for ‘content’: expected a string, got null.", "type": "invalid_request_error", "param": "messages.[3].content", "code": null }, "code": null, "param": "messages.[3].content", "type": "invalid_request_error", "attemptNumber": 1, "retriesLeft": 2 }
The workflow is illustrated in the attached screenshot.
Thanks in advance,
Lucas
Hi there!
Could you please share your workflow by copying and pasting it into a code block right here in the chat? This will help us identify any issues with it.
Best regards,
Robert
{
“name”: “Email Agent”,
“nodes”: [
{
“parameters”: {
“model”: “gpt-4.1-mini”,
“options”: {
“maxTokens”: 32768
}
},
“id”: “-“,
“name”: “OpenAI Chat Model”,
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1,
“position”: [
340,
660
],
“credentials”: {
“openAiApi”: {
“id”: “-“,
“name”: “OpenAi”
}
}
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “-“,
“name”: “response”,
“value”: “Unable to perform task. Please try again.”,
“type”: “string”
}
]
},
“options”: {}
},
“id”: “-“,
“name”: “Try Again”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
1260,
620
]
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “-“,
“name”: “=response”,
“value”: “={{$json.output}}”,
“type”: “string”
}
]
},
“options”: {}
},
“id”: “-“,
“name”: “Success”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
1400,
340
]
},
{
“parameters”: {},
“type”: “@n8n/n8n-nodes-langchain.toolCalculator”,
“typeVersion”: 1,
“position”: [
840,
640
],
“id”: “-“,
“name”: “Calculator”
},
{
“parameters”: {
“sessionIdType”: “customKey”,
“sessionKey”: “={{ $(‘When chat message received’).item.json.sessionId }}”,
“contextWindowLength”: 20
},
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.3,
“position”: [
500,
660
],
“id”: “-“,
“name”: “Simple Memory”
},
{
“parameters”: {},
“type”: “n8n-nodes-base.errorTrigger”,
“typeVersion”: 1,
“position”: [
-960,
1140
],
“id”: “-“,
“name”: “Error Trigger”
},
{
“parameters”: {
“method”: “POST”,
“url”: “ https://blckalpaca.app.n8n.cloud/webhook/monitoring ”,
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: “={n "workflowId": "{{$workflow.id}}"n "nodeName": "{{$error.node.name}}"n "errorMessage": "{{$error.node.name}}"n "errorType": "MAINWORKFLOWERROR"n "severity": "{{$json["errorSeverity"]}}"n "timestamp": "{{$now.isoString}}"n "context": {n "source": "Main Workflow"n }n}n”,
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
-520,
1020
],
“id”: “-“,
“name”: “Monitoring Agent”
},
{
“parameters”: {
“operation”: “insert”,
“collection”: “errorlogs”,
“fields”: “errorCode,errorName,errorMessage,timestamp,operation,collection,documentId,userId,additionalInfo”,
“options”: {
“dateFields”: “={{ $json }}
”
}
},
“type”: “n8n-nodes-base.mongoDb”,
“typeVersion”: 1.1,
“position”: [
-720,
1020
],
“id”: “-“,
“name”: “Insert Error”,
“credentials”: {
“mongoDb”: {
“id”: “FK96gqZYTxH4RPIw”,
“name”: “MongoDB Database”
}
}
},
{
“parameters”: {
“collection”: “errorlogs”,
“options”: {}
},
“type”: “n8n-nodes-base.mongoDb”,
“typeVersion”: 1.1,
“position”: [
-720,
1240
],
“id”: “-“,
“name”: “Find Error”,
“credentials”: {
“mongoDb”: {
“id”: “-“,
“name”: “MongoDB Database”
}
}
},
{
“parameters”: {
“jsCode”: “return [{
json: {
memory: items.map(item => {
const e = item.json;
return 🛑 ${e.errorType} – ${e.message} (${e.timestamp})
;
}).join("nn") // doppelte Backslashes für Zeilenumbruch
}
}]
}
},
“type”: “n8n-nodes-base.code”,
“typeVersion”: 2,
“position”: [
-520,
1240
],
“id”: “-“,
“name”: “Error History”
},
{
“parameters”: {
“workflowId”: {
“__rl”: true,
“value”: “6CRi91UvNa3gzwjZ”,
“mode”: “list”,
“cachedResultName”: “IPEC — (Standalone) Audit Logging”
},
“workflowInputs”: {
“mappingMode”: “defineBelow”,
“value”: {},
“matchingColumns”: ,
“schema”: ,
“attemptToConvertTypes”: false,
“convertFieldsToString”: true
},
“options”: {
“waitForSubWorkflow”: true
}
},
“type”: “n8n-nodes-base.executeWorkflow”,
“typeVersion”: 1.2,
“position”: [
1120,
380
],
“id”: “-“,
“name”: “Logging”,
“disabled”: true
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “Greife auf das Postfach zu und lese neue E-Mails aus, um sie für den KI-Agenten zugänglich zu machen. “,
“operation”: “getAll”,
“returnAll”: true,
“filtersUI”: {
“values”: {
“filters”: {
“foldersToInclude”: [
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEMAAA=”,
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEMAAA=“,
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEMAAA=”,
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEMAAA=”
]
}
}
},
“options”: {}
},
“type”: “n8n-nodes-base.microsoftOutlookTool”,
“typeVersion”: 2,
“position”: [
80,
1300
],
“id”: “-“,
“name”: “Read”,
“webhookId”: “405868b9-1e32-479c-8c52-200f9152d381”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “-“,
“name”: “Microsoft Outlook”
}
}
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “Versieh E-Mails mit passenden Labels oder Tags, um sie übersichtlich zu kategorisieren.
”,
“operation”: “update”,
“messageId”: {
“rl”: true,
“value”: “={{ $json["emailId"] }}
”,
“mode”: “id”
},
“updateFields”: {}
},
“type”: “n8n-nodes-base.microsoftOutlookTool”,
“typeVersion”: 2,
“position”: [
240,
1300
],
“id”: “-“,
“name”: “Taggen”,
“webhookId”: “13de0496-9ba5-492a-bb54-aa310864fe7c”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “-“,
“name”: “Microsoft Outlook”
}
}
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “Lösche gezielt ausgewählte E-Mails aus dem Postfach.”,
“operation”: “delete”,
“messageId”: {
“rl”: true,
“value”: “={{ $json["emailId"] }}
”,
“mode”: “id”
}
},
“type”: “n8n-nodes-base.microsoftOutlookTool”,
“typeVersion”: 2,
“position”: [
400,
1300
],
“id”: “-“,
“name”: “Delete”,
“webhookId”: “62bc4060-e483-4060-8723-31e11aac52d4”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “-“,
“name”: “Microsoft Outlook”
}
}
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “Verfasse eine kontextgerechte Antwort auf die vorliegende E-Mail und speichere sie im Namen des Nutzers als Entwurf.
Erstelle selbstständig einen vollständigen Antwort-Entwurf auf die gegebene E-Mail. Fehlen Betreff oder Inhalt, generiere bis zu drei passende Betreffzeilen und jeweils einen E-Mail-Text, füge automatisch die IPEC-GROUP-Signatur an und verzichte auf Rückfragen.”,
“operation”: “reply”,
“messageId”: {
“__rl”: true,
“value”: “={{ $json["emailId"] }}
”,
“mode”: “id”
},
“message”: “=”,
“options”: {
“saveAsDraft”: true
}
},
“type”: “n8n-nodes-base.microsoftOutlookTool”,
“typeVersion”: 2,
“position”: [
560,
1300
],
“id”: “-“,
“name”: “Reply”,
“webhookId”: “62bc4060-e483-4060-8723-31e11aac52d4”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “-“,
“name”: “Microsoft Outlook”
}
}
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “Versende neue E-Mails mit den angegebenen Empfängern, Betreff und Inhalt.
{
"tool": "Send Draft",
"parameters": {
"draftId": "{{draftId}}"
}
}
Verfasse eigenständig neue E-Mail-Entwürfe. Sind Betreff oder Nachrichtentext nicht vorgegeben, biete bis zu drei Betreff- und Text-Varianten an, ergänze automatisch Signatur und ggf. Cc/Bcc-Vorschläge – ganz ohne Nachfragen.
Proaktive Entwurfserstellung: Bei E-Mail-Entwurfsanfrage mit wenig/keinem Input: Plausiblen Kontext/Zweck (aus Historie, Empfänger, Annahmen) erschließen. Passenden, generischen Entwurf für Betreff/Text erstellen. Kennzeichnung: ‘Vorschlag Betreff:’, ‘Vorschlag E-Mail-Text:’”,
“toRecipients”: “={{ $fromAI(‘To’,
‘string’) }}”,
“subject”: “={{ $fromAI(‘Subject’,
‘string’) }}”,
“bodyContent”: “={{ $fromAI(‘Message’,
‘string’) }}”,
“additionalFields”: {
“bodyContentType”: “html”
}
},
“type”: “n8n-nodes-base.microsoftOutlookTool”,
“typeVersion”: 2,
“position”: [
720,
1300
],
“id”: “-“,
“name”: “Send”,
“webhookId”: “62bc4060-e483-4060-8723-31e11aac52d4”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “-“,
“name”: “Microsoft Outlook”
}
}
},
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.chatTrigger”,
“typeVersion”: 1.1,
“position”: [
-960,
440
],
“id”: “-“,
“name”: “When chat message received”,
“webhookId”: “20f05e1a-111a-4226-ab3e-bbe974a329e8”
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “=Erstelle einen Entwurf IMMER mit Betreff & Text ausschließlich in HTML und gebe sie diesen zur Freigabe weiter.
{
"tool": "Create Draft",
"parameters": {
"subject": "{{$node["AI Agent"].json.output.match(/Betreff:s(.+)/)[1]}}"”,
“html”: “={{$node["AI Agent"].json.output.match(/Nachricht:s([sS]*)/)[1]}}”,
“toRecipients”: [
{
“emailAddress”: {
“address”: “empfaenger@domain.tld”
}
}
]
}
}
”,
“resource”: “draft”,
“subject”: “={{ $(‘Format Output’).item.json.output.subject }}”,
“bodyContent”: “={{ $(‘Format Output’).item.json.output.message }}”,
“additionalFields”: {
“bodyContentType”: “html”
}
},
“type”: “n8n-nodes-base.microsoftOutlookTool”,
“typeVersion”: 2,
“position”: [
860,
1300
],
“id”: “-“,
“name”: “Create Draft”,
“webhookId”: “c551c79c-8e1c-4a68-8dc9-61afcec06c18”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “-“,
“name”: “Microsoft Outlook”
}
}
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “Sendet einen mit "Ja" freigegebenen Entwurf.”,
“resource”: “draft”,
“operation”: “send”,
“draftId”: {
“rl”: true,
“value”: “=”,
“mode”: “id”
}
},
“type”: “n8n-nodes-base.microsoftOutlookTool”,
“typeVersion”: 2,
“position”: [
1000,
1300
],
“id”: “-“,
“name”: “Send Draft”,
“webhookId”: “63e2c2ee-a960-4a63-8493-6fdb3a7ff93d”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “-“,
“name”: “Microsoft Outlook”
}
}
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “{
"tool": "Update Draft",
"parameters": {
"draftId": "{{draftId}}"”,
“subject”: “={{ $node["Get Draft"].json["id"] }}”,
“html”: “={{ $node["Get Draft"].json["id"] }}”
}
}
”,
“resource”: “draft”,
“operation”: “update”,
“draftId”: {
“rl”: true,
“value”: “={{$node["Get Draft"].json["id"]}}”,
“mode”: “id”
},
“updateFields”: {
“bodyContentType”: “html”
}
},
“type”: “n8n-nodes-base.microsoftOutlookTool”,
“typeVersion”: 2,
“position”: [
1160,
1300
],
“id”: “-“,
“name”: “Update Draft”,
“webhookId”: “dbbd3281-a208-4ac0-a9fa-122f4453b882”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “-“,
“name”: “Microsoft Outlook”
}
}
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “Gib sämtliche Drafts inklusive deren draftID als JSON zurück bevor der Draft versendet wird.”,
“operation”: “getAll”,
“returnAll”: true,
“filtersUI”: {
“values”: {
“filters”: {
“foldersToExclude”: [
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEUAAA=”,
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEVAAA=”,
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEKAAA=”,
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEMAAA=”,
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAETAAA=”,
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAELAAA=”,
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEJAAA=”
],
“foldersToInclude”: [
“AAMkADQ1MGU3MzY5LWMwMTEtNDlhZS1iNDFiLTYxOWJjZmVhNzQxMQAuAAAAAAAmAyzhb98KTIGdD0L20oi1AQDvbm7trNfuTKFlghu2xNKoAAAAAAEPAAA=”
]
}
}
},
“options”: {}
},
“type”: “n8n-nodes-base.microsoftOutlookTool”,
“typeVersion”: 2,
“position”: [
1300,
1300
],
“id”: “-“,
“name”: “Get Draft”,
“webhookId”: “eaa42508-38f4-4baf-9aaa-97e0335b396a”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “-“,
“name”: “Microsoft Outlook”
}
}
},
{
“parameters”: {
“sessionIdType”: “customKey”,
“sessionKey”: “={{ $(‘When chat message received’).item.json.sessionId }}”,
“contextWindowLength”: 20
},
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.3,
“position”: [
-400,
680
],
“id”: “-“,
“name”: “Simple Memory1”
},
{
“parameters”: {
“jsonSchemaExample”: “{
"subject": "",
"message": ""
}”
},
“type”: “@n8n/n8n-nodes-langchain.outputParserStructured”,
“typeVersion”: 1.2,
“position”: [
-220,
680
],
“id”: “-“,
“name”: “Structured Output Parser”
},
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json.chatInput }}”,
“hasOutputParser”: true,
“options”: {
“systemMessage”: “Du bist ein KI-basierter E-Mail-Management-Assistent für IPEC-GROUP, der dafür verantwortlich ist, den Benutzerinput zu formatieren und zu strukturieren, damit der E-Mail-Agent die E-Mails korrekt erstellen und versenden kann.
Deine Aufgaben
User Input formatieren:
- Überprüfe den User Input auf Vollständigkeit und Richtigkeit.
- Extrahiere die relevanten Informationen, die für den E-Mail-Versand benötigt werden:
- Empfänger: Wenn keine Empfänger angegeben sind, frage nach den E-Mail-Adressen.
- Betreff: Falls der Betreff fehlt, generiere einen passenden Betreff basierend auf dem Inhalt.
- Nachricht: Wenn die Nachricht unklar oder leer ist, fordere den User auf, mehr Informationen bereitzustellen oder generiere eine Standardnachricht basierend auf den vorhandenen Angaben.
- E-Mail-Format: Stelle sicher, dass die Nachricht im HTML-Format erstellt wird, falls nicht anders angegeben.
- Signatur: Füge immer die korrekte IPEC-GROUP-Signatur hinzu:
Kiki Carnogursky
marketing@ipec-group.at
RoľnÃcka 9081/116, 831 07 Vajnory
Slowakei
Vorbereitung der Daten für den E-Mail-Agenten:
- Verwende das Parser Tool, um den User Input in ein strukturiertes Format zu überführen.
- Erstelle einen strukturierten Output mit den folgenden Feldern:
subject: Der Betreff der E-Mail.
message: Der Nachrichtentext im HTML-Format.
toRecipients: Die Empfänger-E-Mail-Adressen.
draftId: Die Draft ID
Stelle sicher, dass alle Felder vollständig und korrekt ausgefüllt sind, bevor du die Daten an den E-Mail-Agenten weitergibst.
Fehlerbehandlung:
- Falls der User Input unvollständig oder fehlerhaft ist, gib eine klare Rückmeldung und fordere den Benutzer auf, fehlende Informationen zu ergänzen.
- Falls der Input korrekt formatiert ist, gib alle Daten in einem strukturierten Format zurück, das vom E-Mail-Agenten verarbeitet werden kann.”
},
“id”: “-“,
“name”: “Format Output”,
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 1.6,
“position”: [
-440,
440
],
“retryOnFail”: false,
“maxTries”: 5,
“onError”: “continueRegularOutput”
},
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json.output }}”,
“options”: {
“systemMessage”: “=## Rolle & Hauptaufgaben
Du bist ein professioneller E-Mail-Management-Assistent für IPEC-GROUP. Deine Hauptaufgaben umfassen das Verfassen, Senden, Beantworten, Löschen und Verwalten von E-Mails sowie das Erstellen von Entwürfen. Du erhältst den spezifischen Task (z.B. "sendemail", "replyemail") als Input.
Proaktive Entwurfserstellung & Freigabeprozess
- Für Reply Email und Send Email erstellst du immer selbstständig Betreff und Nachrichtentext.
- Jeder E-Mail-Entwurf wird zunächst automatisch als reiner Text per Telegram-Nachricht an den Nutzer (Owner) geschickt.
- Nur nach ausdrücklicher Freigabe durch eine Antwort „Ja“ sendest du die E-Mail an die echten Empfänger.
- Sende niemals eigenständig E-Mails ohne diese Freigabe.
Details zu Reply/Send
- Reply/Send Email:
- Generiere eine Variante für Betreff und Nachricht, wenn Betreff/Text fehlen.
- Füge stets die IPEC-GROUP-Signatur von Kiki Carnogursky an.
- Keine Rückfragen an den Nutzer.
Tool Integration
- Create Draft:
-Wenn eine E-Mail zu senden ist, erstellst du einen Entwurf (Draft) mit Subject und Message im HTML-Format. Die IPEC-GROUP Signatur wird immer korrekt eingefügt. - Entwurf zur Freigabe senden: Der Entwurf wird als reiner Text über Telegram an den Nutzer geschickt. Der Nutzer muss mit „Ja“ bestätigen, um den Entwurf zu senden.
- Erst nach Freigabe senden: Sobald der Nutzer mit „Ja“ bestätigt, holst du den Entwurf über die gespeicherte Draft-ID und sendest ihn an die angegebenen Empfänger.
- Update Draft: Falls nötig, kannst du den Entwurf über die Draft-ID aktualisieren, indem du den HTML-Body anpasst.
E-Mail-Format & Ton
- Format: Professionelles HTML.
- Ton: Formell, freundlich, klar, präzise, kundenorientiert.
- Signatur: Immer korrekt basierend auf Absenderadresse.
Empfänger-Handling
- Extrahiere alle „An“, „Cc“ und „Bcc“ aus der Nutzeranfrage.
- Fehlen Empfängerangaben, liefere den Entwurf per Telegram und bitte um „Ja“, statt automatisch nachzufragen.
Unternehmens-/Absenderdetails für Signatur
- Unternehmen: IPEC-GROUP
- Absender: Kiki Carnogursky
- E-Mail: marketing@ipec-group.at
- Adresse: RoľnÃcka 9081/116, 831 07 Vajnory, Slowakei
Ablaufbeispiel
- Nutzer:
send_email an lucas.luci@live.at – Text: …
- Agent erstellt Entwurf (HTML) mit Signatur.
- Agent schickt per Telegram:
- Nutzer antwortet „Ja“.
- Agent sendet die E-Mail.
Kontext
- Aktuelles Datum/Uhrzeit: {{ $now }}
”
},
“id”: “-“,
“name”: “AI Agent”,
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 1.6,
“position”: [
520,
440
],
“retryOnFail”: true,
“maxTries”: 5,
“onError”: “continueErrorOutput”
},
{
“parameters”: {
“model”: {
“_rl”: true,
“mode”: “list”,
“value”: “gpt-4o-mini”
},
“options”: {
“responseFormat”: “jsonobject”
}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.2,
“position”: [
-560,
680
],
“id”: “-“,
“name”: “OpenAI Chat Model1”,
“credentials”: {
“openAiApi”: {
“id”: “-“,
“name”: “OpenAi”
}
}
}
],
“pinData”: {},
“connections”: {
“OpenAI Chat Model”: {
“ailanguageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ailanguageModel”,
“index”: 0
}
]
]
},
“Calculator”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“Simple Memory”: {
“aimemory”: [
[
{
“node”: “AI Agent”,
“type”: “aimemory”,
“index”: 0
}
]
]
},
“Try Again”: {
“main”: [
]
},
“Error Trigger”: {
“main”: [
[
{
“node”: “Insert Error”,
“type”: “main”,
“index”: 0
},
{
“node”: “Find Error”,
“type”: “main”,
“index”: 0
}
]
]
},
“Insert Error”: {
“main”: [
[
{
“node”: “Monitoring Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Find Error”: {
“main”: [
[
{
“node”: “Error History”,
“type”: “main”,
“index”: 0
}
]
]
},
“Logging”: {
“main”: [
[
{
“node”: “Success”,
“type”: “main”,
“index”: 0
}
]
]
},
“Read”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“Taggen”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“Delete”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“Reply”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“Send”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“When chat message received”: {
“main”: [
[
{
“node”: “Format Output”,
“type”: “main”,
“index”: 0
}
]
]
},
“Create Draft”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“Send Draft”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“Update Draft”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“Get Draft”: {
“aitool”: [
[
{
“node”: “AI Agent”,
“type”: “aitool”,
“index”: 0
}
]
]
},
“Simple Memory1”: {
“aimemory”: [
[
{
“node”: “Format Output”,
“type”: “aimemory”,
“index”: 0
}
]
]
},
“Structured Output Parser”: {
“aioutputParser”: [
[
{
“node”: “Format Output”,
“type”: “aioutputParser”,
“index”: 0
}
]
]
},
“Format Output”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“AI Agent”: {
“main”: [
[
{
“node”: “Logging”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “Try Again”,
“type”: “main”,
“index”: 0
}
]
]
},
“OpenAI Chat Model1”: {
“ailanguageModel”: [
[
{
“node”: “Format Output”,
“type”: “ailanguageModel”,
“index”: 0
}
]
]
}
},
“active”: true,
“settings”: {
“executionOrder”: “v1”,
“callerPolicy”: “workflowsFromSameOwner”
},
“versionId”: “-“,
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “-”
},
“id”: “-“,
“tags”: [
{
“createdAt”: “2025-05-02T17:30:41.619Z”,
“updatedAt”: “2025-05-02T17:30:41.619Z”,
“id”: “-“,
“name”: “e-mail”
}
]
}
Following. I’m encountering a similar issue when attempting to integrate simple memory.
If I link the OpenAI Chat Model to the AI Agent, it functions correctly. However, when I connect the simple memory, the memory operates, but the Chat model returns the following error:
json
{
"nodes": [
{
"parameters": {
"promptType": "define",
"text": "={{ $json.message.text }}",
"options": {}
},
"type": "callin.io/n8n-nodes-langchain.agent",
"typeVersion": 1.9,
"position": [
-380,
-100
],
"id": "131042f8-030f-4d4f-beb9-e14b6ba2f210",
"name": "AI Agent"
}
],
"connections": {
"AI Agent": {
"main": [
"<span class="chcklst-box fa fa-square-o fa-fw"></span>"
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "aa95d60ce93447a03a5861f524d89e9ad8567e4274d8648f5860f706cd4e4191"
}
}
Could you please provide assistance?
Hey,
Could you please attach the workflow like this:
Might have to borrow that gif
quite handy, maybe callin.io can add somehow when creating tickets too
that’d be cool
It's yours now
Use it wisely
Excellent suggestion to share a video demonstrating how to connect workflows. I plan to adopt this practice too.