From 0eb4bddfbbf8d3b6cc11a7e50fd1690b5936c351 Mon Sep 17 00:00:00 2001 From: Carst Paul Alexandru Date: Tue, 9 Dec 2025 00:56:44 +0200 Subject: [PATCH 1/2] feat: Adaug proiectul meu n8n sub folderul Talent_Manager --- n8n/README.md | 21 +- n8n/Talent_Manager/Talent Manager.json | 484 +++++++++++++++++++++++++ 2 files changed, 504 insertions(+), 1 deletion(-) create mode 100644 n8n/Talent_Manager/Talent Manager.json diff --git a/n8n/README.md b/n8n/README.md index fc10fcdf..d30f9e5e 100644 --- a/n8n/README.md +++ b/n8n/README.md @@ -1,3 +1,22 @@ # Showcase n8n -A space where we can play around with n8n +**Structura proiectului:** + + 1. Detectare Cerere: Sistemul n8n monitorizează o adresă de email dedicată și se activează la primirea unei noi cereri. + + 2. Extragere Date: Un LLM analizează conținutul emailului pentru a extrage automat datele cheie: Artistul dorit, Data și Detaliile Clientului/Evenimentului. + + 3. Verificare Disponibilitate: Sistemul interoghează Google Calendar-ul artistului pentru a verifica dacă data este liberă sau ocupată. + 4. Un LLM analizeaza daca clientul a mentionat ce artist doreste si verifica daca acest artist este unul din cei pe care ii reprezentam(prezenti in googlesheet ul cu terifele artistilor). + Daca nu reprezentam artistu, trimitem un mail standardizat care mentioneaza ca nu reprezentam acel artist. + Daca a mentionat ce artist doreste 5. Verificam daca artistul respectiv este liber in data respectiva. + Daca nu a mentionat ce artist doreste, 6. Cream un task cu detaliile necesare, stagiul la care ne aflam si datele clientului. + + 7. Trimitem un mail catre Artist cu detaliile despre eveniment si astemtam un mesaj de confirmare. + + 8. Primim mesaj(folosim telegram) de la artist. + 9. Un LLM incadreaza raspunsul in una din 2 categori: pozitiv; negativ. + Daca raspunsul este "pozitiv": 10. Trimitem mail standardizat cu tarifele si conditiile artistului. + Daca raspunsul este "negativ": Ne intoarcem la pasul 6. + + 11. Daca primim un mail(din nou continutul va fi analizat de un LLM si va fi incadrat in una din 2 categori: pozitiv; negativ.) si eate pozitiv atunci actualizam calendarul si generam o factura. \ No newline at end of file diff --git a/n8n/Talent_Manager/Talent Manager.json b/n8n/Talent_Manager/Talent Manager.json new file mode 100644 index 00000000..c682d28a --- /dev/null +++ b/n8n/Talent_Manager/Talent Manager.json @@ -0,0 +1,484 @@ +{ + "name": "Talent Manager", + "nodes": [ + { + "parameters": { + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", + "typeVersion": 1, + "position": [ + 640, + 256 + ], + "id": "abac7e1d-0caa-42e4-939b-ed24dc79818b", + "name": "Google Gemini Chat Model", + "credentials": { + "googlePalmApi": { + "id": "vha89y89vUPBuS9l", + "name": "Google Gemini(PaLM) Api account" + } + } + }, + { + "parameters": { + "pollTimes": { + "item": [ + { + "mode": "everyMinute" + } + ] + }, + "simple": false, + "filters": {}, + "options": {} + }, + "type": "n8n-nodes-base.gmailTrigger", + "typeVersion": 1.3, + "position": [ + 416, + 32 + ], + "id": "90570878-c3f7-4e89-9b6c-07f15aa26a42", + "name": "Pending Email", + "credentials": { + "gmailOAuth2": { + "id": "ECaQsJ0xhhmN0yNX", + "name": "Email proiecte" + } + } + }, + { + "parameters": { + "operation": "append", + "documentId": { + "__rl": true, + "value": "1N2hQ6e0q7siS-m61DjeLjwJSWoL9kmifUA4YD4zMqxg", + "mode": "list", + "cachedResultName": "Pending Emails", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1N2hQ6e0q7siS-m61DjeLjwJSWoL9kmifUA4YD4zMqxg/edit?usp=drivesdk" + }, + "sheetName": { + "__rl": true, + "value": "gid=0", + "mode": "list", + "cachedResultName": "2025", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1N2hQ6e0q7siS-m61DjeLjwJSWoL9kmifUA4YD4zMqxg/edit#gid=0" + }, + "columns": { + "mappingMode": "defineBelow", + "value": { + "ID": "={{ $json.id }}", + "Contact": "={{ $json.Contact }}", + "Email": "={{ $json['Email link'] }}", + "Scurt rezumat": "={{ $('AI Report').item.json.output[0]['Scurt rezumat'] }}", + "Oferta(RON)": "={{ $('AI Report').item.json.output[0]['Oferta(RON)'] }}", + "Tip eveniment": "={{ $('AI Report').item.json.output[0]['Tip eveniment'] }}", + "Artist": "={{ $('AI Report').item.json.output[0].Artist }}", + "Data propusa": "={{ $('AI Report').item.json.output[0]['Data propusa'] }}" + }, + "matchingColumns": [ + "ID" + ], + "schema": [ + { + "id": "ID", + "displayName": "ID", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": false + }, + { + "id": "Data propusa", + "displayName": "Data propusa", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Artist", + "displayName": "Artist", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Contact", + "displayName": "Contact", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Tip eveniment", + "displayName": "Tip eveniment", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Oferta(RON)", + "displayName": "Oferta(RON)", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Email", + "displayName": "Email", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Scurt rezumat", + "displayName": "Scurt rezumat", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": false + } + ], + "attemptToConvertTypes": false, + "convertFieldsToString": false + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 1504, + -176 + ], + "id": "dac6783d-da4f-462b-8c22-09a0351ca40d", + "name": "List", + "credentials": { + "googleSheetsOAuth2Api": { + "id": "oaXiKW5NGItRgJCy", + "name": "Google Sheets account 2" + } + } + }, + { + "parameters": { + "promptType": "define", + "text": "=Ești un analist de date specializat în extragerea informațiilor de propuneri de evenimente din emailuri.\n\nScopul tău este să analizezi textul primit și să extragi informațiile necesare pentru a popula o foaie de calcul.\n\n**Textul de analizat {{ $json.text }}:**\n\n**Reguli de Extracție:**\n1. **Data propusa:** Extrage data exactă a evenimentului propus (Ex: 20.06.2026).\n2. **Artist:** Extrage numele artistului/trupului propus.\n3. **Tip eveniment:** Identifică tipul evenimentului (Ex: Podcast, Concert, Festival).\n4. **Oferta(RON):** Extrage doar valoarea numerică a onorariului propus, convertită în RON (dacă este în altă valută) sau direct valoarea, fără valută sau formatare. Dacă nu există o sumă, folosește \"Neprecizat\".\n5. **Scurt rezumat:** Creează un rezumat concis de maxim 10 cuvinte care să descrie propunerea.", + "hasOutputParser": true, + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.agent", + "typeVersion": 3, + "position": [ + 672, + 32 + ], + "id": "e283e3f3-f5d3-48a8-ae92-5741977aa427", + "name": "AI Report" + }, + { + "parameters": { + "jsonSchemaExample": "[\n {\n \"Data propusa\": \"date/text\",\n \"Artist\": \"text\",\n \"Tip eveniment\": \"text\",\n \"Oferta(RON)\": \"number\",\n \"Scurt rezumat\": \"text\"\n }\n]", + "autoFix": true + }, + "type": "@n8n/n8n-nodes-langchain.outputParserStructured", + "typeVersion": 1.3, + "position": [ + 768, + 256 + ], + "id": "f0858287-9751-46bd-9b1c-30d5eabb72be", + "name": "Structured Output Parser" + }, + { + "parameters": { + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", + "typeVersion": 1, + "position": [ + 848, + 464 + ], + "id": "9da4d860-8a07-4e8a-829f-25a417df9450", + "name": "Google Gemini Chat Model1", + "credentials": { + "googlePalmApi": { + "id": "vha89y89vUPBuS9l", + "name": "Google Gemini(PaLM) Api account" + } + } + }, + { + "parameters": { + "assignments": { + "assignments": [ + { + "id": "c84272eb-872c-4132-b78d-32d999294269", + "name": "id", + "value": "={{ $('Pending Email').item.json.id }}", + "type": "string" + }, + { + "id": "14386d2c-18b7-4bb3-a4b9-06874de0241d", + "name": "Contact", + "value": "={{ $('Pending Email').item.json.from.text }}", + "type": "string" + }, + { + "id": "546ac632-8514-4922-8c8f-596834ee3e91", + "name": "Email link", + "value": "=https://mail.google.com/mail/u/1/#all/{{ $node[\"Pending Email\"].json[\"threadId\"] }}", + "type": "string" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.set", + "typeVersion": 3.4, + "position": [ + 1136, + 32 + ], + "id": "1c23a305-6cec-4a13-8eec-ef05054e4ad2", + "name": "Extracting Info" + }, + { + "parameters": { + "sendTo": "={{ $('Extracting Info').item.json.Contact }}", + "subject": "Tarifele artistului.", + "message": "mesJ", + "options": {} + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.1, + "position": [ + 1856, + 224 + ], + "id": "69fa9d2b-6419-469d-8cb3-a337d3b1e34f", + "name": "Send a message", + "webhookId": "52efa3bf-d10e-4b58-bea9-33bcbd091206", + "credentials": { + "gmailOAuth2": { + "id": "4PqkdLjI1iHVLNli", + "name": "Gmail account 3" + } + } + }, + { + "parameters": { + "promptType": "define", + "text": "tu vei primi un artist si trebuie sa cauri intr-un google sheet ce tarif relevant are. De asemenea va trebui sa mentionezi si daca mai are alte cerinte.\n\nDe exemplu: Daca intreb cat cere delia pentru 2 zile de concert si ea cere 5000 euro per zi de concert si 3000 de euro pentru aparitii la televizor, tu vei raspunde ca Delia cere 10000 pentru 2 zile de concert", + "hasOutputParser": true, + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.agent", + "typeVersion": 3, + "position": [ + 1392, + 224 + ], + "id": "d78e6705-da96-4f86-a140-89beb75cd167", + "name": "AI Agent" + }, + { + "parameters": { + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", + "typeVersion": 1, + "position": [ + 1360, + 448 + ], + "id": "7dc074e9-2b99-4c78-b71d-fd86cfb66aab", + "name": "Google Gemini Chat Model2", + "credentials": { + "googlePalmApi": { + "id": "vha89y89vUPBuS9l", + "name": "Google Gemini(PaLM) Api account" + } + } + }, + { + "parameters": { + "jsonSchemaExample": "{\n\t\"Tarif\": \"number\",\n \"Altele\": \"text\"\n}", + "autoFix": true + }, + "type": "@n8n/n8n-nodes-langchain.outputParserStructured", + "typeVersion": 1.3, + "position": [ + 1488, + 448 + ], + "id": "29d1e2aa-2b89-45e5-8999-4366c4958c4e", + "name": "Structured Output Parser1" + }, + { + "parameters": { + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", + "typeVersion": 1, + "position": [ + 1568, + 656 + ], + "id": "8dd61a62-91ef-4276-a6aa-2468a57d98f7", + "name": "Google Gemini Chat Model3", + "credentials": { + "googlePalmApi": { + "id": "vha89y89vUPBuS9l", + "name": "Google Gemini(PaLM) Api account" + } + } + } + ], + "pinData": {}, + "connections": { + "Google Gemini Chat Model": { + "ai_languageModel": [ + [ + { + "node": "AI Report", + "type": "ai_languageModel", + "index": 0 + } + ] + ] + }, + "Pending Email": { + "main": [ + [ + { + "node": "AI Report", + "type": "main", + "index": 0 + } + ] + ] + }, + "AI Report": { + "main": [ + [ + { + "node": "Extracting Info", + "type": "main", + "index": 0 + } + ] + ] + }, + "Structured Output Parser": { + "ai_outputParser": [ + [ + { + "node": "AI Report", + "type": "ai_outputParser", + "index": 0 + } + ] + ] + }, + "Google Gemini Chat Model1": { + "ai_languageModel": [ + [ + { + "node": "Structured Output Parser", + "type": "ai_languageModel", + "index": 0 + } + ] + ] + }, + "Extracting Info": { + "main": [ + [ + { + "node": "List", + "type": "main", + "index": 0 + }, + { + "node": "AI Agent", + "type": "main", + "index": 0 + } + ] + ] + }, + "AI Agent": { + "main": [ + [ + { + "node": "Send a message", + "type": "main", + "index": 0 + } + ] + ] + }, + "Google Gemini Chat Model2": { + "ai_languageModel": [ + [ + { + "node": "AI Agent", + "type": "ai_languageModel", + "index": 0 + } + ] + ] + }, + "Structured Output Parser1": { + "ai_outputParser": [ + [ + { + "node": "AI Agent", + "type": "ai_outputParser", + "index": 0 + } + ] + ] + }, + "Google Gemini Chat Model3": { + "ai_languageModel": [ + [ + { + "node": "Structured Output Parser1", + "type": "ai_languageModel", + "index": 0 + } + ] + ] + } + }, + "active": false, + "settings": { + "executionOrder": "v1" + }, + "versionId": "8ebbe25f-41c0-40c8-8ac9-50f11cac01df", + "meta": { + "templateCredsSetupCompleted": true, + "instanceId": "07c22fe7453b3c10e88283d88620eb7e4495f0364d2e96ce30162c5c13887b6f" + }, + "id": "w8uUdoTGpLD8cJo9", + "tags": [] +} \ No newline at end of file From f2a17dc377a2d6841e662a781efe9a4d26972d0d Mon Sep 17 00:00:00 2001 From: Carst Paul Alexandru Date: Thu, 11 Dec 2025 23:32:40 +0200 Subject: [PATCH 2/2] Versiunea finala proiect: Talent_Manager --- n8n/Talent_Manager/Talent Manager.json | 484 ---------- n8n/Talent_Manager/Talent_Manager.json | 1178 ++++++++++++++++++++++++ 2 files changed, 1178 insertions(+), 484 deletions(-) delete mode 100644 n8n/Talent_Manager/Talent Manager.json create mode 100644 n8n/Talent_Manager/Talent_Manager.json diff --git a/n8n/Talent_Manager/Talent Manager.json b/n8n/Talent_Manager/Talent Manager.json deleted file mode 100644 index c682d28a..00000000 --- a/n8n/Talent_Manager/Talent Manager.json +++ /dev/null @@ -1,484 +0,0 @@ -{ - "name": "Talent Manager", - "nodes": [ - { - "parameters": { - "options": {} - }, - "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", - "typeVersion": 1, - "position": [ - 640, - 256 - ], - "id": "abac7e1d-0caa-42e4-939b-ed24dc79818b", - "name": "Google Gemini Chat Model", - "credentials": { - "googlePalmApi": { - "id": "vha89y89vUPBuS9l", - "name": "Google Gemini(PaLM) Api account" - } - } - }, - { - "parameters": { - "pollTimes": { - "item": [ - { - "mode": "everyMinute" - } - ] - }, - "simple": false, - "filters": {}, - "options": {} - }, - "type": "n8n-nodes-base.gmailTrigger", - "typeVersion": 1.3, - "position": [ - 416, - 32 - ], - "id": "90570878-c3f7-4e89-9b6c-07f15aa26a42", - "name": "Pending Email", - "credentials": { - "gmailOAuth2": { - "id": "ECaQsJ0xhhmN0yNX", - "name": "Email proiecte" - } - } - }, - { - "parameters": { - "operation": "append", - "documentId": { - "__rl": true, - "value": "1N2hQ6e0q7siS-m61DjeLjwJSWoL9kmifUA4YD4zMqxg", - "mode": "list", - "cachedResultName": "Pending Emails", - "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1N2hQ6e0q7siS-m61DjeLjwJSWoL9kmifUA4YD4zMqxg/edit?usp=drivesdk" - }, - "sheetName": { - "__rl": true, - "value": "gid=0", - "mode": "list", - "cachedResultName": "2025", - "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1N2hQ6e0q7siS-m61DjeLjwJSWoL9kmifUA4YD4zMqxg/edit#gid=0" - }, - "columns": { - "mappingMode": "defineBelow", - "value": { - "ID": "={{ $json.id }}", - "Contact": "={{ $json.Contact }}", - "Email": "={{ $json['Email link'] }}", - "Scurt rezumat": "={{ $('AI Report').item.json.output[0]['Scurt rezumat'] }}", - "Oferta(RON)": "={{ $('AI Report').item.json.output[0]['Oferta(RON)'] }}", - "Tip eveniment": "={{ $('AI Report').item.json.output[0]['Tip eveniment'] }}", - "Artist": "={{ $('AI Report').item.json.output[0].Artist }}", - "Data propusa": "={{ $('AI Report').item.json.output[0]['Data propusa'] }}" - }, - "matchingColumns": [ - "ID" - ], - "schema": [ - { - "id": "ID", - "displayName": "ID", - "required": false, - "defaultMatch": false, - "display": true, - "type": "string", - "canBeUsedToMatch": true, - "removed": false - }, - { - "id": "Data propusa", - "displayName": "Data propusa", - "required": false, - "defaultMatch": false, - "display": true, - "type": "string", - "canBeUsedToMatch": true - }, - { - "id": "Artist", - "displayName": "Artist", - "required": false, - "defaultMatch": false, - "display": true, - "type": "string", - "canBeUsedToMatch": true - }, - { - "id": "Contact", - "displayName": "Contact", - "required": false, - "defaultMatch": false, - "display": true, - "type": "string", - "canBeUsedToMatch": true - }, - { - "id": "Tip eveniment", - "displayName": "Tip eveniment", - "required": false, - "defaultMatch": false, - "display": true, - "type": "string", - "canBeUsedToMatch": true - }, - { - "id": "Oferta(RON)", - "displayName": "Oferta(RON)", - "required": false, - "defaultMatch": false, - "display": true, - "type": "string", - "canBeUsedToMatch": true - }, - { - "id": "Email", - "displayName": "Email", - "required": false, - "defaultMatch": false, - "display": true, - "type": "string", - "canBeUsedToMatch": true - }, - { - "id": "Scurt rezumat", - "displayName": "Scurt rezumat", - "required": false, - "defaultMatch": false, - "display": true, - "type": "string", - "canBeUsedToMatch": true, - "removed": false - } - ], - "attemptToConvertTypes": false, - "convertFieldsToString": false - }, - "options": {} - }, - "type": "n8n-nodes-base.googleSheets", - "typeVersion": 4.7, - "position": [ - 1504, - -176 - ], - "id": "dac6783d-da4f-462b-8c22-09a0351ca40d", - "name": "List", - "credentials": { - "googleSheetsOAuth2Api": { - "id": "oaXiKW5NGItRgJCy", - "name": "Google Sheets account 2" - } - } - }, - { - "parameters": { - "promptType": "define", - "text": "=Ești un analist de date specializat în extragerea informațiilor de propuneri de evenimente din emailuri.\n\nScopul tău este să analizezi textul primit și să extragi informațiile necesare pentru a popula o foaie de calcul.\n\n**Textul de analizat {{ $json.text }}:**\n\n**Reguli de Extracție:**\n1. **Data propusa:** Extrage data exactă a evenimentului propus (Ex: 20.06.2026).\n2. **Artist:** Extrage numele artistului/trupului propus.\n3. **Tip eveniment:** Identifică tipul evenimentului (Ex: Podcast, Concert, Festival).\n4. **Oferta(RON):** Extrage doar valoarea numerică a onorariului propus, convertită în RON (dacă este în altă valută) sau direct valoarea, fără valută sau formatare. Dacă nu există o sumă, folosește \"Neprecizat\".\n5. **Scurt rezumat:** Creează un rezumat concis de maxim 10 cuvinte care să descrie propunerea.", - "hasOutputParser": true, - "options": {} - }, - "type": "@n8n/n8n-nodes-langchain.agent", - "typeVersion": 3, - "position": [ - 672, - 32 - ], - "id": "e283e3f3-f5d3-48a8-ae92-5741977aa427", - "name": "AI Report" - }, - { - "parameters": { - "jsonSchemaExample": "[\n {\n \"Data propusa\": \"date/text\",\n \"Artist\": \"text\",\n \"Tip eveniment\": \"text\",\n \"Oferta(RON)\": \"number\",\n \"Scurt rezumat\": \"text\"\n }\n]", - "autoFix": true - }, - "type": "@n8n/n8n-nodes-langchain.outputParserStructured", - "typeVersion": 1.3, - "position": [ - 768, - 256 - ], - "id": "f0858287-9751-46bd-9b1c-30d5eabb72be", - "name": "Structured Output Parser" - }, - { - "parameters": { - "options": {} - }, - "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", - "typeVersion": 1, - "position": [ - 848, - 464 - ], - "id": "9da4d860-8a07-4e8a-829f-25a417df9450", - "name": "Google Gemini Chat Model1", - "credentials": { - "googlePalmApi": { - "id": "vha89y89vUPBuS9l", - "name": "Google Gemini(PaLM) Api account" - } - } - }, - { - "parameters": { - "assignments": { - "assignments": [ - { - "id": "c84272eb-872c-4132-b78d-32d999294269", - "name": "id", - "value": "={{ $('Pending Email').item.json.id }}", - "type": "string" - }, - { - "id": "14386d2c-18b7-4bb3-a4b9-06874de0241d", - "name": "Contact", - "value": "={{ $('Pending Email').item.json.from.text }}", - "type": "string" - }, - { - "id": "546ac632-8514-4922-8c8f-596834ee3e91", - "name": "Email link", - "value": "=https://mail.google.com/mail/u/1/#all/{{ $node[\"Pending Email\"].json[\"threadId\"] }}", - "type": "string" - } - ] - }, - "options": {} - }, - "type": "n8n-nodes-base.set", - "typeVersion": 3.4, - "position": [ - 1136, - 32 - ], - "id": "1c23a305-6cec-4a13-8eec-ef05054e4ad2", - "name": "Extracting Info" - }, - { - "parameters": { - "sendTo": "={{ $('Extracting Info').item.json.Contact }}", - "subject": "Tarifele artistului.", - "message": "mesJ", - "options": {} - }, - "type": "n8n-nodes-base.gmail", - "typeVersion": 2.1, - "position": [ - 1856, - 224 - ], - "id": "69fa9d2b-6419-469d-8cb3-a337d3b1e34f", - "name": "Send a message", - "webhookId": "52efa3bf-d10e-4b58-bea9-33bcbd091206", - "credentials": { - "gmailOAuth2": { - "id": "4PqkdLjI1iHVLNli", - "name": "Gmail account 3" - } - } - }, - { - "parameters": { - "promptType": "define", - "text": "tu vei primi un artist si trebuie sa cauri intr-un google sheet ce tarif relevant are. De asemenea va trebui sa mentionezi si daca mai are alte cerinte.\n\nDe exemplu: Daca intreb cat cere delia pentru 2 zile de concert si ea cere 5000 euro per zi de concert si 3000 de euro pentru aparitii la televizor, tu vei raspunde ca Delia cere 10000 pentru 2 zile de concert", - "hasOutputParser": true, - "options": {} - }, - "type": "@n8n/n8n-nodes-langchain.agent", - "typeVersion": 3, - "position": [ - 1392, - 224 - ], - "id": "d78e6705-da96-4f86-a140-89beb75cd167", - "name": "AI Agent" - }, - { - "parameters": { - "options": {} - }, - "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", - "typeVersion": 1, - "position": [ - 1360, - 448 - ], - "id": "7dc074e9-2b99-4c78-b71d-fd86cfb66aab", - "name": "Google Gemini Chat Model2", - "credentials": { - "googlePalmApi": { - "id": "vha89y89vUPBuS9l", - "name": "Google Gemini(PaLM) Api account" - } - } - }, - { - "parameters": { - "jsonSchemaExample": "{\n\t\"Tarif\": \"number\",\n \"Altele\": \"text\"\n}", - "autoFix": true - }, - "type": "@n8n/n8n-nodes-langchain.outputParserStructured", - "typeVersion": 1.3, - "position": [ - 1488, - 448 - ], - "id": "29d1e2aa-2b89-45e5-8999-4366c4958c4e", - "name": "Structured Output Parser1" - }, - { - "parameters": { - "options": {} - }, - "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", - "typeVersion": 1, - "position": [ - 1568, - 656 - ], - "id": "8dd61a62-91ef-4276-a6aa-2468a57d98f7", - "name": "Google Gemini Chat Model3", - "credentials": { - "googlePalmApi": { - "id": "vha89y89vUPBuS9l", - "name": "Google Gemini(PaLM) Api account" - } - } - } - ], - "pinData": {}, - "connections": { - "Google Gemini Chat Model": { - "ai_languageModel": [ - [ - { - "node": "AI Report", - "type": "ai_languageModel", - "index": 0 - } - ] - ] - }, - "Pending Email": { - "main": [ - [ - { - "node": "AI Report", - "type": "main", - "index": 0 - } - ] - ] - }, - "AI Report": { - "main": [ - [ - { - "node": "Extracting Info", - "type": "main", - "index": 0 - } - ] - ] - }, - "Structured Output Parser": { - "ai_outputParser": [ - [ - { - "node": "AI Report", - "type": "ai_outputParser", - "index": 0 - } - ] - ] - }, - "Google Gemini Chat Model1": { - "ai_languageModel": [ - [ - { - "node": "Structured Output Parser", - "type": "ai_languageModel", - "index": 0 - } - ] - ] - }, - "Extracting Info": { - "main": [ - [ - { - "node": "List", - "type": "main", - "index": 0 - }, - { - "node": "AI Agent", - "type": "main", - "index": 0 - } - ] - ] - }, - "AI Agent": { - "main": [ - [ - { - "node": "Send a message", - "type": "main", - "index": 0 - } - ] - ] - }, - "Google Gemini Chat Model2": { - "ai_languageModel": [ - [ - { - "node": "AI Agent", - "type": "ai_languageModel", - "index": 0 - } - ] - ] - }, - "Structured Output Parser1": { - "ai_outputParser": [ - [ - { - "node": "AI Agent", - "type": "ai_outputParser", - "index": 0 - } - ] - ] - }, - "Google Gemini Chat Model3": { - "ai_languageModel": [ - [ - { - "node": "Structured Output Parser1", - "type": "ai_languageModel", - "index": 0 - } - ] - ] - } - }, - "active": false, - "settings": { - "executionOrder": "v1" - }, - "versionId": "8ebbe25f-41c0-40c8-8ac9-50f11cac01df", - "meta": { - "templateCredsSetupCompleted": true, - "instanceId": "07c22fe7453b3c10e88283d88620eb7e4495f0364d2e96ce30162c5c13887b6f" - }, - "id": "w8uUdoTGpLD8cJo9", - "tags": [] -} \ No newline at end of file diff --git a/n8n/Talent_Manager/Talent_Manager.json b/n8n/Talent_Manager/Talent_Manager.json new file mode 100644 index 00000000..2b0c7d33 --- /dev/null +++ b/n8n/Talent_Manager/Talent_Manager.json @@ -0,0 +1,1178 @@ +{ + "name": "Talent_Manager", + "nodes": [ + { + "parameters": { + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", + "typeVersion": 1, + "position": [ + 192, + 208 + ], + "id": "808d32c5-0d01-41b1-bc21-3e629eb3546a", + "name": "Model", + "credentials": { + "googlePalmApi": { + "id": "LreqivA2y5jHghnC", + "name": "Gemini" + } + } + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "cc96acae-248b-449e-afd8-23707cbc0949", + "leftValue": "={{ $('Extragere date').item.json.output.ARTIST_SOLICITAT }}", + "rightValue": "", + "operator": { + "type": "string", + "operation": "notEmpty", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 560, + 0 + ], + "id": "7a8ff923-5dd5-405b-9e81-ebfde6dabddd", + "name": "Artist mentionat?" + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "03b8fa8b-e9cd-47c0-864e-493a6f07f697", + "leftValue": "={{ $json.row_number }}", + "rightValue": 0, + "operator": { + "type": "number", + "operation": "gt" + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 928, + -96 + ], + "id": "4facb23a-e945-48d8-8b41-0cacef2d5033", + "name": "Artist Reprezentat?" + }, + { + "parameters": { + "sendTo": "={{ $('Verificare mail munca').item.json.From }}", + "subject": "={{ $('Verificare mail munca').item.json.From }}", + "message": "=mesaj standardizat {{ $('Extragere date').item.json.output.ARTIST_SOLICITAT }}", + "options": {} + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.1, + "position": [ + 1104, + 0 + ], + "id": "f9efb93e-8e58-4bdc-b279-fbb6b7c121b0", + "name": "Send a message", + "webhookId": "00b92dea-e87a-450e-ae47-09e5a29adddb", + "credentials": { + "gmailOAuth2": { + "id": "i8BHOWnyRr2100nn", + "name": "Gmail account" + } + } + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "f2529f67-0c5a-43cb-a16b-89b1e28f577f", + "leftValue": "={{ $json.available }}", + "rightValue": true, + "operator": { + "type": "boolean", + "operation": "equals" + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 1424, + -192 + ], + "id": "71f4ecf8-8428-45b9-aea6-ccf12a7290e8", + "name": "If" + }, + { + "parameters": { + "resource": "calendar", + "calendar": { + "__rl": true, + "value": "testeproiecte@gmail.com", + "mode": "list", + "cachedResultName": "Task_Manager" + }, + "timeMin": "={{ $('Extragere date').item.json.output.DATA_EVENIMENT + 'T00:00:00Z'}}", + "timeMax": "={{ $('Extragere date').item.json.output.DATA_EVENIMENT + 'T13:59:59Z'}}", + "options": {} + }, + "type": "n8n-nodes-base.googleCalendar", + "typeVersion": 1.3, + "position": [ + 1264, + -192 + ], + "id": "fcfffd2b-f377-498d-8573-050366ae980c", + "name": "Get availability in a calendar", + "credentials": { + "googleCalendarOAuth2Api": { + "id": "7qnH4dzYBz1RT5yy", + "name": "Google Calendar account" + } + } + }, + { + "parameters": { + "operation": "formatDate", + "date": "={{ $('Extragere date').item.json.output.DATA_EVENIMENT }}", + "format": "custom", + "customFormat": "YYYY-MM-DDTHH:mm:ssZ", + "options": {} + }, + "type": "n8n-nodes-base.dateTime", + "typeVersion": 2, + "position": [ + 1104, + -192 + ], + "id": "ca260ace-166f-49f8-9b55-c6148725f2f2", + "name": "Date & Time" + }, + { + "parameters": { + "sendTo": "paulcarst10@gmail.com", + "subject": "Confirmare eveniment", + "message": "mesaj standardizat", + "options": {} + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.1, + "position": [ + 1744, + -288 + ], + "id": "08565609-08df-40fe-99ab-4507781776f9", + "name": "Confirmare Artist", + "webhookId": "866dad27-e68d-4656-a5a4-d8dbc09b37e5", + "credentials": { + "gmailOAuth2": { + "id": "i8BHOWnyRr2100nn", + "name": "Gmail account" + } + } + }, + { + "parameters": { + "modelName": "models/gemini-2.5-pro", + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", + "typeVersion": 1, + "position": [ + 208, + 496 + ], + "id": "98fbcb9a-a053-4a17-ad53-9b9e94166fff", + "name": "Fallback Model", + "credentials": { + "googlePalmApi": { + "id": "qOgmzFwTnryaOszT", + "name": "test" + } + } + }, + { + "parameters": { + "jsonSchemaExample": "{\n \"ARTIST_SOLICITAT\": \"string\",\n \"DATA_EVENIMENT\": \"string\",\n \"NUME_CLIENT\": \"string\",\n \"DETALII_LOCATIE\": \"string\",\n \"EMAIL_CLIENT\": \"string\"\n}" + }, + "type": "@n8n/n8n-nodes-langchain.outputParserStructured", + "typeVersion": 1.3, + "position": [ + 336, + 496 + ], + "id": "7eeb10e2-58ee-4d59-8f0f-501b80530d27", + "name": "Structur Output" + }, + { + "parameters": { + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing", + "typeVersion": 1, + "position": [ + 256, + 320 + ], + "id": "7feac8e8-8abb-42a0-818e-85b430e1aad3", + "name": "Output Parser" + }, + { + "parameters": { + "task": "RDc5NUZPQ3JHZEdkOTJDcw", + "title": "Call client recomandare artist", + "additionalFields": { + "notes": "={{ $('Extragere date').item.json.output.ARTIST_SOLICITAT }}\n{{ $('Extragere date').item.json.output.DATA_EVENIMENT }}\n{{ $('Extragere date').item.json.output.NUME_CLIENT }}\n{{ $('Extragere date').item.json.output.DETALII_LOCATIE }}\n\n\n", + "status": "needsAction" + } + }, + "type": "n8n-nodes-base.googleTasks", + "typeVersion": 1, + "position": [ + 768, + 96 + ], + "id": "00c91a57-86dd-4dac-8be6-380e81116485", + "name": "Call client1", + "credentials": { + "googleTasksOAuth2Api": { + "id": "ODPnFakt8sIIha6A", + "name": "Google Tasks account" + } + } + }, + { + "parameters": { + "documentId": { + "__rl": true, + "value": "1mr8NRhbn5IwBE5hrM37H6AncbzitwxC9UvV6IiEq6EY", + "mode": "list", + "cachedResultName": "Tarife", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mr8NRhbn5IwBE5hrM37H6AncbzitwxC9UvV6IiEq6EY/edit?usp=drivesdk" + }, + "sheetName": { + "__rl": true, + "value": "gid=0", + "mode": "list", + "cachedResultName": "Sheet1", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mr8NRhbn5IwBE5hrM37H6AncbzitwxC9UvV6IiEq6EY/edit#gid=0" + }, + "filtersUI": { + "values": [ + { + "lookupColumn": "Artisti", + "lookupValue": "={{ $('Extragere date').item.json.output.ARTIST_SOLICITAT }}" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 768, + -96 + ], + "id": "6fe0a0e5-f8dd-4037-85a4-0f68b6b5e583", + "name": "Search in table", + "credentials": { + "googleSheetsOAuth2Api": { + "id": "jtGQKfo5yQlR9yuT", + "name": "Google Sheets account" + } + } + }, + { + "parameters": { + "documentId": { + "__rl": true, + "value": "1mr8NRhbn5IwBE5hrM37H6AncbzitwxC9UvV6IiEq6EY", + "mode": "list", + "cachedResultName": "Tarife", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mr8NRhbn5IwBE5hrM37H6AncbzitwxC9UvV6IiEq6EY/edit?usp=drivesdk" + }, + "sheetName": { + "__rl": true, + "value": "gid=0", + "mode": "list", + "cachedResultName": "tarife", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mr8NRhbn5IwBE5hrM37H6AncbzitwxC9UvV6IiEq6EY/edit#gid=0" + }, + "filtersUI": { + "values": [ + { + "lookupColumn": "Contact", + "lookupValue": "={{ $('Extragere date').item.json.output.ARTIST_SOLICITAT }}" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 1584, + -288 + ], + "id": "e63c2a6b-a743-4d2e-abe0-613b33fbf0a3", + "name": "Contact artist", + "credentials": { + "googleSheetsOAuth2Api": { + "id": "jtGQKfo5yQlR9yuT", + "name": "Google Sheets account" + } + } + }, + { + "parameters": { + "documentId": { + "__rl": true, + "value": "1mr8NRhbn5IwBE5hrM37H6AncbzitwxC9UvV6IiEq6EY", + "mode": "list", + "cachedResultName": "Tarife", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mr8NRhbn5IwBE5hrM37H6AncbzitwxC9UvV6IiEq6EY/edit?usp=drivesdk" + }, + "sheetName": { + "__rl": true, + "value": "gid=0", + "mode": "list", + "cachedResultName": "tarife", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mr8NRhbn5IwBE5hrM37H6AncbzitwxC9UvV6IiEq6EY/edit#gid=0" + }, + "filtersUI": { + "values": [ + { + "lookupColumn": "Contact", + "lookupValue": "={{ $('Verificare mail munca').item.json.From.split('<')[1].replace('>', '').trim() }}" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + -512, + -480 + ], + "id": "362f140c-74b3-4ad9-a949-6253319ce7c5", + "name": "Get row(s) in sheet", + "credentials": { + "googleSheetsOAuth2Api": { + "id": "jtGQKfo5yQlR9yuT", + "name": "Google Sheets account" + } + } + }, + { + "parameters": { + "operation": "append", + "documentId": { + "__rl": true, + "value": "1N2hQ6e0q7siS-m61DjeLjwJSWoL9kmifUA4YD4zMqxg", + "mode": "list", + "cachedResultName": "Pending Emails", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1N2hQ6e0q7siS-m61DjeLjwJSWoL9kmifUA4YD4zMqxg/edit?usp=drivesdk" + }, + "sheetName": { + "__rl": true, + "value": "gid=0", + "mode": "list", + "cachedResultName": "2025", + "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1N2hQ6e0q7siS-m61DjeLjwJSWoL9kmifUA4YD4zMqxg/edit#gid=0" + }, + "columns": { + "mappingMode": "defineBelow", + "value": { + "ID": "={{ $('Verificare mail munca').item.json.id }}", + "Artist": "={{ $json.output.ARTIST_SOLICITAT }}", + "Data propusa": "={{ $json.output.DATA_EVENIMENT }}", + "Contact": "={{ $json.output.EMAIL_CLIENT }}", + "Scurt rezumat": "={{ $json.output.DETALII_LOCATIE }}" + }, + "matchingColumns": [], + "schema": [ + { + "id": "ID", + "displayName": "ID", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Data propusa", + "displayName": "Data propusa", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Artist", + "displayName": "Artist", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Contact", + "displayName": "Contact", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + }, + { + "id": "Tip eveniment", + "displayName": "Tip eveniment", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "Oferta(RON)", + "displayName": "Oferta(RON)", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "Email", + "displayName": "Email", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "Scurt rezumat", + "displayName": "Scurt rezumat", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true + } + ], + "attemptToConvertTypes": false, + "convertFieldsToString": false + }, + "options": {} + }, + "type": "n8n-nodes-base.googleSheets", + "typeVersion": 4.7, + "position": [ + 560, + 208 + ], + "id": "4d0c183a-b062-4349-9530-6ba10c0dd708", + "name": "Append row in sheet", + "credentials": { + "googleSheetsOAuth2Api": { + "id": "jtGQKfo5yQlR9yuT", + "name": "Google Sheets account" + } + } + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "6d65c252-0377-42f6-9321-94c29f85f407", + "leftValue": "={{ $json.row_number }}", + "rightValue": 0, + "operator": { + "type": "number", + "operation": "gt" + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + -352, + -480 + ], + "id": "3f144c0b-ebef-4f68-9985-f6de801bf7ca", + "name": "If1" + }, + { + "parameters": { + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", + "typeVersion": 1, + "position": [ + 176, + -624 + ], + "id": "e25b6912-d30a-466a-9b94-1f8357886aa4", + "name": "Model1", + "credentials": { + "googlePalmApi": { + "id": "LreqivA2y5jHghnC", + "name": "Gemini" + } + } + }, + { + "parameters": { + "modelName": "models/gemini-2.5-pro", + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", + "typeVersion": 1, + "position": [ + 192, + -336 + ], + "id": "1a717fcd-6e46-4d7f-b6cc-e809532ec861", + "name": "Fallback Model1", + "credentials": { + "googlePalmApi": { + "id": "qOgmzFwTnryaOszT", + "name": "test" + } + } + }, + { + "parameters": { + "jsonSchemaExample": "{ \"CLASIFICARE\": \"string\" }" + }, + "type": "@n8n/n8n-nodes-langchain.outputParserStructured", + "typeVersion": 1.3, + "position": [ + 320, + -336 + ], + "id": "8f4f8ddb-e481-47d3-94e4-da39e6f3d71e", + "name": "Structur Output1" + }, + { + "parameters": { + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing", + "typeVersion": 1, + "position": [ + 240, + -512 + ], + "id": "6228ab24-937c-4245-a760-57e128692f6e", + "name": "Output Parser1" + }, + { + "parameters": { + "pollTimes": { + "item": [ + { + "mode": "everyMinute" + } + ] + }, + "filters": {} + }, + "type": "n8n-nodes-base.gmailTrigger", + "typeVersion": 1.3, + "position": [ + -688, + -480 + ], + "id": "03bf2216-307f-4e8f-bc02-08504ed298e6", + "name": "Verificare mail munca", + "credentials": { + "gmailOAuth2": { + "id": "i8BHOWnyRr2100nn", + "name": "Gmail account" + } + } + }, + { + "parameters": { + "promptType": "define", + "text": "=# INPUT: Textul de raspuns primit de la Artist: \n\n{{ $('Verificare mail munca').item.json.snippet }}\n\n# INSTRUCTIUNI:\n# 1. Analizeaza tonul si cuvintele cheie din text.\n# 2. Clasifica raspunsul in una din cele doua categorii.\n# 3. Clasificarea trebuie sa fie \"POZITIV\" doar daca exista un accept ferm (ex: \"ok\", \"confirm\", \"merge\", \"sunt in regula\", \"accept oferta\").\n# 4. Clasificarea trebuie sa fie \"NEGATIV\" daca exista un refuz ferm (ex: \"nu pot\", \"refuz\", \"nu\", \"nu e bine\", \"anulati\").\n\n# SCHEMA DE OUTPUT (JSON OBLIGATORIU):\n# {\n# \"CLASIFICARE\": \"string (Valori posibile: POZITIV sau NEGATIV)\"\n# }\n\n# EXEMPLU DE TEXT INPUT: \"Salut, oferta e ok pentru mine, confirm. Trimite-le actele.\"\n# EXEMPLU DE OUTPUT DORIT (JSON): { \"CLASIFICARE\": \"POZITIV\" }\n\n# EXEMPLU DE TEXT INPUT: \"Nu, din pacate nu pot veni in acea data. Anulati, va rog.\"\n# EXEMPLU DE OUTPUT DORIT (JSON): { \"CLASIFICARE\": \"NEGATIV\" }", + "hasOutputParser": true, + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.agent", + "typeVersion": 3, + "position": [ + 176, + -848 + ], + "id": "313b2144-4004-49b3-a34f-903da8e375fd", + "name": "Clasificare raspuns" + }, + { + "parameters": { + "promptType": "define", + "text": "=# INPUT: Corpul email-ului de cerere primit de la client: {{ $json.snippet }}\n\n# INSTRUCTIUNI:\n# 1. Analizeaza textul si extrage informatiile solicitate in campurile JSON.\n# 2. Campul 'DATA_EVENIMENT' trebuie sa fie convertit in format ISO 8601 (YYYY-MM-DD), daca este mentionata o zi, luna si an. Daca lipseste anul, foloseste anul curent (2025). Daca lipsesc informatii, returneaza \"UNKNOWN\".\n# 3. Campul 'ARTIST_SOLICITAT' trebuie sa fie un singur nume/nume de scena, daca este mentionat.\n# 4. Campul 'NUME_CLIENT' trebuie sa fie numele persoanei care a semnat sau a trimis emailul.\n# 5. Adresas de mail a cientului.\n\n# SCHEMA DE OUTPUT (JSON OBLIGATORIU):\n# {\n# \"ARTIST_SOLICITAT\": \"string\",\n# \"DATA_EVENIMENT\": \"string (YYYY-MM-DD)\",\n# \"NUME_CLIENT\": \"string\",\n# \"DETALII_LOCATIE\": \"string (Descriere scurta a locatiei sau a evenimentului, max 30 de cuvinte)\",\n# \"MAIL_CLIENT\": \"string\"\n# }\n\n# EXEMPLU DE TEXT INPUT:\n# \"Buna ziua,\n# Va scriu pentru o cerere de booking. As vrea sa il rezerv pe DJ Cosmic pentru un eveniment privat in data de 15 Martie 2026. Este o petrecere corporate la Club A din Bucuresti.\n# Multumesc,\n# Ion Popescu\"\n# ionpopescu@gmail.com\n \n# EXEMPLU DE OUTPUT DORIT (JSON):\n# {\n# \"ARTIST_SOLICITAT\": \"DJ Cosmic\",\n# \"DATA_EVENIMENT\": \"2026-03-15\",\n# \"NUME_CLIENT\": \"Ion Popescu\",\n# \"DETALII_LOCATIE\": \"Petrecere corporate la Club A din Bucuresti\"\n# \"EMAIL_CLIENT\": \"ionpopescu@gmail.com\"\n# }", + "hasOutputParser": true, + "options": {} + }, + "type": "@n8n/n8n-nodes-langchain.agent", + "typeVersion": 3, + "position": [ + 192, + -16 + ], + "id": "6d90ebdc-4b4f-414d-98a4-aabf98988f8e", + "name": "Extragere date" + }, + { + "parameters": { + "sendTo": "={{ $('Verificare mail munca').item.json.From }}", + "subject": "Artinst indisponibil", + "message": "mesaj prestabilit", + "options": {} + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.1, + "position": [ + 1744, + -96 + ], + "id": "86df11e0-b724-4a37-86ac-5352bb93b23c", + "name": "Artist indisponibil, negociere", + "webhookId": "ad48ce34-d0f0-4d48-8481-978f067e4fcb", + "credentials": { + "gmailOAuth2": { + "id": "i8BHOWnyRr2100nn", + "name": "Gmail account" + } + } + }, + { + "parameters": { + "task": "RDc5NUZPQ3JHZEdkOTJDcw", + "title": "Negociere client", + "additionalFields": { + "notes": "={{ $('Extragere date').item.json.output.ARTIST_SOLICITAT }}\n{{ $('Extragere date').item.json.output.DATA_EVENIMENT }}\n{{ $('Extragere date').item.json.output.NUME_CLIENT }}\n{{ $('Extragere date').item.json.output.DETALII_LOCATIE }}\n\n" + } + }, + "type": "n8n-nodes-base.googleTasks", + "typeVersion": 1, + "position": [ + 1584, + -96 + ], + "id": "0b21e63d-79d6-47de-be54-0538ce72e719", + "name": "Negociere client", + "credentials": { + "googleTasksOAuth2Api": { + "id": "ODPnFakt8sIIha6A", + "name": "Google Tasks account" + } + } + }, + { + "parameters": { + "task": "RDc5NUZPQ3JHZEdkOTJDcw", + "title": "Renegociere", + "additionalFields": {} + }, + "type": "n8n-nodes-base.googleTasks", + "typeVersion": 1, + "position": [ + 1024, + -736 + ], + "id": "52356f22-66fc-4fa8-a2d1-b2aaee488995", + "name": "Renegociere", + "credentials": { + "googleTasksOAuth2Api": { + "id": "ODPnFakt8sIIha6A", + "name": "Google Tasks account" + } + } + }, + { + "parameters": { + "task": "RDc5NUZPQ3JHZEdkOTJDcw", + "title": "Efectuare plata", + "additionalFields": {} + }, + "type": "n8n-nodes-base.googleTasks", + "typeVersion": 1, + "position": [ + 816, + -944 + ], + "id": "c55c137f-3c85-45dd-8eb2-8fa6b8872646", + "name": "Efectuare plata", + "credentials": { + "googleTasksOAuth2Api": { + "id": "ODPnFakt8sIIha6A", + "name": "Google Tasks account" + } + } + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "85716fd8-a0a5-4efd-bba2-e168f6b1b9f4", + "leftValue": "={{ $json.output.CLASIFICARE }}", + "rightValue": "POZITIV", + "operator": { + "type": "string", + "operation": "equals" + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 528, + -848 + ], + "id": "3643d99e-efa3-494c-a3dd-b5fe3013bbb7", + "name": "Raspuns artist" + }, + { + "parameters": { + "sendTo": "={{ $('Verificare mail munca').item.json.From }}", + "subject": "Raspuns ", + "message": "masaj standardizat", + "options": {} + }, + "type": "n8n-nodes-base.gmail", + "typeVersion": 2.1, + "position": [ + 816, + -736 + ], + "id": "3b27d5a9-140d-4876-81d1-ac96d68600c9", + "name": "raspuns client", + "webhookId": "7c9ae2b6-357b-4d47-b28c-436c21cc0ddd", + "credentials": { + "gmailOAuth2": { + "id": "i8BHOWnyRr2100nn", + "name": "Gmail account" + } + } + } + ], + "pinData": { + "Model": [ + { + "json": { + "name": "First item", + "code": 1 + } + }, + { + "json": { + "name": "Second item", + "code": 2 + } + } + ], + "Model1": [ + { + "json": { + "name": "First item", + "code": 1 + } + }, + { + "json": { + "name": "Second item", + "code": 2 + } + } + ] + }, + "connections": { + "Model": { + "ai_languageModel": [ + [ + { + "node": "Extragere date", + "type": "ai_languageModel", + "index": 0 + } + ] + ] + }, + "Artist mentionat?": { + "main": [ + [ + { + "node": "Search in table", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Call client1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Artist Reprezentat?": { + "main": [ + [ + { + "node": "Date & Time", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Send a message", + "type": "main", + "index": 0 + } + ] + ] + }, + "Get availability in a calendar": { + "main": [ + [ + { + "node": "If", + "type": "main", + "index": 0 + } + ] + ] + }, + "Date & Time": { + "main": [ + [ + { + "node": "Get availability in a calendar", + "type": "main", + "index": 0 + } + ] + ] + }, + "If": { + "main": [ + [ + { + "node": "Contact artist", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Negociere client", + "type": "main", + "index": 0 + } + ] + ] + }, + "Fallback Model": { + "ai_languageModel": [ + [ + { + "node": "Output Parser", + "type": "ai_languageModel", + "index": 0 + } + ] + ] + }, + "Structur Output": { + "ai_outputParser": [ + [ + { + "node": "Output Parser", + "type": "ai_outputParser", + "index": 0 + } + ] + ] + }, + "Output Parser": { + "ai_outputParser": [ + [ + { + "node": "Extragere date", + "type": "ai_outputParser", + "index": 0 + } + ] + ] + }, + "Search in table": { + "main": [ + [ + { + "node": "Artist Reprezentat?", + "type": "main", + "index": 0 + } + ] + ] + }, + "Contact artist": { + "main": [ + [ + { + "node": "Confirmare Artist", + "type": "main", + "index": 0 + } + ] + ] + }, + "Confirmare Artist": { + "main": [ + [] + ] + }, + "Get row(s) in sheet": { + "main": [ + [ + { + "node": "If1", + "type": "main", + "index": 0 + } + ] + ] + }, + "If1": { + "main": [ + [ + { + "node": "Clasificare raspuns", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Extragere date", + "type": "main", + "index": 0 + } + ] + ] + }, + "Model1": { + "ai_languageModel": [ + [ + { + "node": "Clasificare raspuns", + "type": "ai_languageModel", + "index": 0 + } + ] + ] + }, + "Fallback Model1": { + "ai_languageModel": [ + [ + { + "node": "Output Parser1", + "type": "ai_languageModel", + "index": 0 + } + ] + ] + }, + "Structur Output1": { + "ai_outputParser": [ + [ + { + "node": "Output Parser1", + "type": "ai_outputParser", + "index": 0 + } + ] + ] + }, + "Output Parser1": { + "ai_outputParser": [ + [ + { + "node": "Clasificare raspuns", + "type": "ai_outputParser", + "index": 0 + } + ] + ] + }, + "Verificare mail munca": { + "main": [ + [ + { + "node": "Get row(s) in sheet", + "type": "main", + "index": 0 + } + ] + ] + }, + "Extragere date": { + "main": [ + [ + { + "node": "Artist mentionat?", + "type": "main", + "index": 0 + }, + { + "node": "Append row in sheet", + "type": "main", + "index": 0 + } + ] + ] + }, + "Clasificare raspuns": { + "main": [ + [ + { + "node": "Raspuns artist", + "type": "main", + "index": 0 + } + ] + ] + }, + "Negociere client": { + "main": [ + [ + { + "node": "Artist indisponibil, negociere", + "type": "main", + "index": 0 + } + ] + ] + }, + "Efectuare plata": { + "main": [ + [] + ] + }, + "Raspuns artist": { + "main": [ + [ + { + "node": "Efectuare plata", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "raspuns client", + "type": "main", + "index": 0 + } + ] + ] + }, + "raspuns client": { + "main": [ + [ + { + "node": "Renegociere", + "type": "main", + "index": 0 + } + ] + ] + } + }, + "active": false, + "settings": { + "executionOrder": "v1" + }, + "versionId": "acdd6a64-90a0-44da-8ad7-9ebd4737f0c5", + "meta": { + "templateCredsSetupCompleted": true, + "instanceId": "4fd520f663c33e839375c8d780d3a0bc0ce4f280fc4481318efc45109d8fdb52" + }, + "id": "bVCDAxa0kRRZo2zM", + "tags": [] +} \ No newline at end of file