feat: add folder support for workflows (fixes #70)
This commit is contained in:
536
workflows/Aggregate/0472_Aggregate_Gmail_Create_Triggered.json
Normal file
536
workflows/Aggregate/0472_Aggregate_Gmail_Create_Triggered.json
Normal file
@@ -0,0 +1,536 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "d17dadc75de867b08b7744d7ba00e531e75580e2dec35d52f2d34e58481e1fb7",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "814e3849-1ae1-4124-bdfc-b72017e9d7c2",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 420.4803040774015,
|
||||
"height": 240.57943708322733,
|
||||
"content": "## Add AI labels to Gmail messages\nWith this workflow you can automatically set labels for your Gmail message according to its content. \n\nIn this workflow available are 3 labels: \"Partnership\", \"Inquiry\" and \"Notification\". Feel free to adjust labels according to your needs. \n\n**Please remember to set label names both in your Gmail account and workflow.**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e83fa311-b5ba-427e-a98e-573394b882dd",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
0,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"width": 421.0932411886662,
|
||||
"height": 257.42916378714597,
|
||||
"content": "## ⚠️ Note\n\n1. Complete video guide for this workflow is available [on my YouTube](https://youtu.be/a8Dhj3Zh9vQ). \n2. Remember to add your credentials and configure nodes (covered in the video guide).\n3. If you like this workflow, please subscribe to [my YouTube channel](https://www.youtube.com/@workfloows) and/or [my newsletter](https://workfloows.com/).\n\n**Thank you for your support!**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4c20d029-750f-476b-9348-6e250ea64d52",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
440,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"width": 238.4602598584674,
|
||||
"height": 348.5873725349161,
|
||||
"content": "### Gmail Trigger\nReceive data from Gmail about new incoming message. \n\n⚠️ Set polling interval according to your needs."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "22923079-80ce-4495-b0f0-da7122195c56",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1160,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"width": 241.53974014153226,
|
||||
"height": 319.3323098457962,
|
||||
"content": "###\n\n\n\n\n\n\n\n\n\n\n### JSON schema\nEdit JSON schema and label names according to your needs.\n\n⚠️ **Label names in system prompt and JSON schema should be the same.**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "40735a58-daaa-43ac-9658-706c3cf0cbba",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1900,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"width": 226.14233872620645,
|
||||
"height": 347.0476323933831,
|
||||
"content": "### Merge labels\nCombine labels retrieved from Gmail account and assigned by AI together."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "87e0f9e2-a2ff-46cf-896a-138b1bde2d0e",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2160,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"width": 452.48413953150185,
|
||||
"height": 347.0476323933831,
|
||||
"content": "### Aggregarte labels and add to message\nCreate array of label IDs and add to the desired email message in Gmail."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1d533664-e5e8-4dc8-afac-bfc5996e4bf9",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
700,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"width": 238.4602598584674,
|
||||
"height": 348.5873725349161,
|
||||
"content": "### Get message content\nBased on Gmail message ID retrieve body content of the email and pass it to AI chain."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e613ca64-50ae-4d7c-b0fc-15812dadcd68",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
960,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"width": 378.57661273793565,
|
||||
"height": 348.5873725349161,
|
||||
"content": "### Assign labels\nLet the AI decide which labels suit the best content of the message.\n\n⚠️ **Remember to edit system prompt** - modify label names and instructions according to your needs."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a2005e70-6774-45ce-b9c6-742786f49964",
|
||||
"name": "Gmail trigger",
|
||||
"type": "n8n-nodes-base.gmailTrigger",
|
||||
"position": [
|
||||
500,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"filters": {},
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "SPECSn66s6QHmld9",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "4b6f7d21-6155-42b7-93ff-2f530df3692f",
|
||||
"name": "Get message content",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
760,
|
||||
180
|
||||
],
|
||||
"webhookId": "b773894c-18c6-454d-9271-6de10be1b7c4",
|
||||
"parameters": {
|
||||
"messageId": "={{ $json.id }}",
|
||||
"operation": "get"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "SPECSn66s6QHmld9",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "ad577660-d9f4-4031-ad16-7021a02bb18e",
|
||||
"name": "Assign labels for message",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
1020,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $('Gmail trigger').item.json.text }}",
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.5
|
||||
},
|
||||
{
|
||||
"id": "1e11d30f-4c73-4fd0-a365-aeb43bee4252",
|
||||
"name": "OpenAI Chat",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1000,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "PrK67ozsBFqSIYG9",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "4a504b64-fb28-44fb-a80a-6f5e5c5a1949",
|
||||
"name": "JSON Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
1240,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"schemaType": "manual",
|
||||
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"labels\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"Inquiry\", \"Partnership\", \"Notification\"]\n }\n }\n },\n \"required\": [\"labels\"]\n}"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "f5ac1b01-0980-4ee4-b4f5-5057258eab70",
|
||||
"name": "Set label values",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1400,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "72d11a72-6693-447c-b7ca-4ba1a3579075",
|
||||
"name": "labels",
|
||||
"type": "array",
|
||||
"value": "={{ $json.output.labels }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "e368e343-728e-4e2f-a37f-5e203000d090",
|
||||
"name": "Get all labels",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
1680,
|
||||
60
|
||||
],
|
||||
"webhookId": "dec6f574-f47c-4b5d-86b9-2b0f6c957145",
|
||||
"parameters": {
|
||||
"resource": "label",
|
||||
"returnAll": true
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "SPECSn66s6QHmld9",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "48ce8351-5d04-4697-b68d-bb84286e0b2b",
|
||||
"name": "Split out assigned labels",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
1680,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "labels"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cc1aa3ac-7427-4761-aacd-caf16c64d7fb",
|
||||
"name": "Merge corresponding labels",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1960,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"advanced": true,
|
||||
"mergeByFields": {
|
||||
"values": [
|
||||
{
|
||||
"field1": "name",
|
||||
"field2": "labels"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.1
|
||||
},
|
||||
{
|
||||
"id": "97fefda6-5936-42a7-a30a-8de4149aa445",
|
||||
"name": "Aggregate label IDs",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
2220,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"fieldToAggregate": "id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7befd422-7243-43af-9b34-21c05a069013",
|
||||
"name": "Add labels to message",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
2440,
|
||||
180
|
||||
],
|
||||
"webhookId": "4f345fc9-2afd-478b-be3b-d3d28f0fbc82",
|
||||
"parameters": {
|
||||
"labelIds": "={{ $json.id }}",
|
||||
"messageId": "={{ $('Gmail trigger').item.json[\"id\"] }}",
|
||||
"operation": "addLabels"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "SPECSn66s6QHmld9",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"Gmail trigger": [
|
||||
{
|
||||
"id": "1962eb5ee3119d76",
|
||||
"to": {
|
||||
"html": "<span class=\"mp_address_group\"><span class=\"mp_address_name\">Workfloows Tutorial</span> <<a href=\"mailto:workfloowstutorial@gmail.com\" class=\"mp_address_email\">workfloowstutorial@gmail.com</a>></span>",
|
||||
"text": "\"Workfloows Tutorial\" <workfloowstutorial@gmail.com>",
|
||||
"value": [
|
||||
{
|
||||
"name": "Workfloows Tutorial",
|
||||
"address": "workfloowstutorial@gmail.com"
|
||||
}
|
||||
]
|
||||
},
|
||||
"date": "2025-04-13T10:33:05.000Z",
|
||||
"from": {
|
||||
"html": "<span class=\"mp_address_group\"><span class=\"mp_address_name\">Workfloows</span> <<a href=\"mailto:workfloows@gmail.com\" class=\"mp_address_email\">workfloows@gmail.com</a>></span>",
|
||||
"text": "\"Workfloows\" <workfloows@gmail.com>",
|
||||
"value": [
|
||||
{
|
||||
"name": "Workfloows",
|
||||
"address": "workfloows@gmail.com"
|
||||
}
|
||||
]
|
||||
},
|
||||
"html": "<div dir=\"ltr\">Hey! <div><br></div><div>We'd love to cooperate with you - could you please send us your offer? </div><div><br></div><div>Best,</div><div>Oskar</div></div>\n",
|
||||
"text": "Hey!\n\nWe'd love to cooperate with you - could you please send us your offer?\n\nBest,\nOskar\n",
|
||||
"headers": {
|
||||
"to": "To: Workfloows Tutorial <workfloowstutorial@gmail.com>",
|
||||
"date": "Date: Sun, 13 Apr 2025 12:33:05 +0200",
|
||||
"from": "From: Workfloows <workfloows@gmail.com>",
|
||||
"subject": "Subject: Inquiry for cooperation",
|
||||
"x-gm-gg": "X-Gm-Gg: ASbGncsLoGTllITLV/hYh7p2Re1X0A4Fd5a1uQb58nQ1FCzXrvjCL9BY2H/6U4fN3wn\r\n\tFkTSzNo0PUVLScNsBjkkOdwaqHhHLT+UzxaAtr8LpnucVTxhWbI08sl8lxjJUsHJwsJwIpSaAqX\r\n\tkKKBKUewdQhcwJNh4P22vOalA=",
|
||||
"arc-seal": "ARC-Seal: i=1; a=rsa-sha256; t=1744540397; cv=none;\r\n d=google.com; s=arc-20240605;\r\n b=BWNyT3FtnssueCPH4di13k++uCiJsB73BRfuQ63N0/+fUQqAvkZRMdN4cZiSCXpLph\r\n +ag3l4hgkp9yuE66MQjv18vWzMaUsmaj5obHWe+6x6YcPkMRW/y+gNitCD+mftpYsQpz\r\n nQpkoyZaY3h9o9vmcUUmOPWCWrUysy8y8sOOhht7Tmekzs3tQj+aLyXJNv+j9SCwvsTE\r\n yd5uisDlrWv1zfpdUZLwNKZuCP+Jtfr01w3QT/zhBCweOccIJaFzfO4s97q8JgUgRrmx\r\n JkrsGpSWJZKWPDh44mkmHH+bw43omIJKXYTHN9nOO3vGyqBWdGYlE0T9ZhCetHHyBbpS\r\n b+Mw==",
|
||||
"received": "Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])\r\n by mx.google.com with SMTPS id 2adb3069b0e04-54c455e2176sor1769457e87.11.2025.04.13.03.33.17\r\n for <workfloowstutorial@gmail.com>\r\n (Google Transport Security);\r\n Sun, 13 Apr 2025 03:33:17 -0700 (PDT)",
|
||||
"message-id": "Message-ID: <CA+sg_9eV=X+LusGnDSP8pDrrYZ8SLn2Maq4CYpLrg=uG=7T7DQ@mail.gmail.com>",
|
||||
"x-received": "X-Received: by 2002:a2e:bd88:0:b0:30d:629c:4333 with SMTP id\r\n 38308e7fff4ca-31049aacf9dmr29831171fa.34.1744540396464; Sun, 13 Apr 2025\r\n 03:33:16 -0700 (PDT)",
|
||||
"return-path": "Return-Path: <workfloows@gmail.com>",
|
||||
"content-type": "Content-Type: multipart/alternative; boundary=\"000000000000a0b4660632a67692\"",
|
||||
"delivered-to": "Delivered-To: workfloowstutorial@gmail.com",
|
||||
"mime-version": "MIME-Version: 1.0",
|
||||
"received-spf": "Received-SPF: pass (google.com: domain of workfloows@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;",
|
||||
"x-gm-features": "X-Gm-Features: ATxdqUEDRqHsd35x8e-h-zd4BcGaOVs83Rpm-BRaGlzjaiGxZMiGfgHEjxn3hNE",
|
||||
"dkim-signature": "DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n d=gmail.com; s=20230601; t=1744540397; x=1745145197; dara=google.com;\r\n h=to:subject:message-id:date:from:mime-version:from:to:cc:subject\r\n :date:message-id:reply-to;\r\n bh=yhyki7Kf5bQNf/8oq2uNTa/y/MoSnhI+j3ZqeBT892s=;\r\n b=Njlov8RLGs/rZIz07rSJIfn8oQDEXgybU4mJ0ujD8T8m7J4NabveIhdobrrHraaZqN\r\n iwOZHBn0TTWAbuccHjfU+BBB8FvJ4/jfCXKbWSwPIWHd53P1wuTxvXYgbkXX4A/W675L\r\n zPSVraK4W1heQDTViCc2MmV5+tH6pbe/52xTOwvx8Xf0WTN1Ku3K/DY8EIsnd0OKdrEn\r\n ml+/LHhVMmwR5lZtte7mTlYi/c5FG8XO95Nh/Ftl22RpuKl1QPFUdJcx+bEVeUh62uHM\r\n Bd8pyi0y/LVKIqNtL/DIvpt2+bt9TLm7MB2P61KMUAP75qZCparl2MWLR62c8tW7cFqm\r\n wPHA==",
|
||||
"x-gm-message-state": "X-Gm-Message-State: AOJu0YzGNl9So86XWoTm+y0PO71OilI6ljQ/cHqUDKwYpIrbLMy8ZiCe\r\n\ty2NKHmx051OaBkuEbe2bQD3dl78xO6sJPWWrTXUn1mV9b52v6vaQsLXXkQWx5cKuaw9spNE1dpU\r\n\tzsVB7chkTKdZ5HO31p29RiSug2SJ0AZXS",
|
||||
"x-google-smtp-source": "X-Google-Smtp-Source: AGHT+IF6PTdq6zPXbZy1CEUmKyNDSavbnDjbcWp5Y3hfiFlZruW8yABRwE9q5LKSffpes/dVbAryLGt6F27ROQMhWMg=",
|
||||
"arc-message-signature": "ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;\r\n h=to:subject:message-id:date:from:mime-version:dkim-signature;\r\n bh=yhyki7Kf5bQNf/8oq2uNTa/y/MoSnhI+j3ZqeBT892s=;\r\n fh=fBYbxd7sNeSi3dX3VeF2+nxOJZdPrQsXgdNq9LWGYGE=;\r\n b=V70ViYZcIyYaZCIMeEXNv4R6X5fkIYJxel9I6iHuCI2RJLc824inbFBL3Enb/JD8yt\r\n Sk1iK/RGh+PYMU1FAHeq/uUri2PG1Z9RZc7e7jjLil/nCWpYF91AhFEZE8B7kl5uWKZb\r\n qA4ASGlYUTJwjoWMpJle0uvlOBksdXIb2Zb5K6kyHe4zlqhHeM6ySiJLEu7bj/eS5TYg\r\n vnmoySAYAsLH5T/08gj6OwaBWcmqhfMVO8adMkIZe1VZQqC9nKVJJis0I3Hsl9UwhicB\r\n VDSvEH/KsHrDDqPkSMDHykv1NzBK9cPgQ8cAG4QdgSd3zuEp5uJkxXNycF1NN1cZwRfZ\r\n eC2A==;\r\n dara=google.com",
|
||||
"authentication-results": "Authentication-Results: mx.google.com;\r\n dkim=pass header.i=@gmail.com header.s=20230601 header.b=Njlov8RL;\r\n spf=pass (google.com: domain of workfloows@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=workfloows@gmail.com;\r\n dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;\r\n dara=pass header.i=@gmail.com",
|
||||
"x-google-dkim-signature": "X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n d=1e100.net; s=20230601; t=1744540397; x=1745145197;\r\n h=to:subject:message-id:date:from:mime-version:x-gm-message-state\r\n :from:to:cc:subject:date:message-id:reply-to;\r\n bh=yhyki7Kf5bQNf/8oq2uNTa/y/MoSnhI+j3ZqeBT892s=;\r\n b=o2krTN0ebufVGn92FP/xtW+t8OQ46Jc9sSrWVXrWihY1hBM7C9fEwuF9svkxx3SB8B\r\n m8qZVS5TIDCv+JkZKK9jpHw3cD09s/YSr7aPP5bAWibx5UhB1/Ki7Kn0hdgt90LS2Kob\r\n jr7CP8QrrWfftq7zutBxaVoCdBtTrod/TJKDxDr1b3vFaoN/XxGnUeqj8EoAbdTDf859\r\n 5hmRQUODpJaybi3MDmBzStjIh9rlUBLkt4csANAuUZWX1/b28+HAiT7AOdq9ksbROpgi\r\n h5LedT5dMXPYU6yU0lQ6kk14R6eX6tHQN3AV5I1kCOaaeArC7NvUK5o8mUH2QDKZgWIe\r\n DR5A==",
|
||||
"arc-authentication-results": "ARC-Authentication-Results: i=1; mx.google.com;\r\n dkim=pass header.i=@gmail.com header.s=20230601 header.b=Njlov8RL;\r\n spf=pass (google.com: domain of workfloows@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=workfloows@gmail.com;\r\n dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;\r\n dara=pass header.i=@gmail.com"
|
||||
},
|
||||
"subject": "Inquiry for cooperation",
|
||||
"labelIds": [
|
||||
"UNREAD",
|
||||
"IMPORTANT",
|
||||
"CATEGORY_PERSONAL",
|
||||
"INBOX"
|
||||
],
|
||||
"threadId": "1962eb5ee3119d76",
|
||||
"messageId": "<CA+sg_9eV=X+LusGnDSP8pDrrYZ8SLn2Maq4CYpLrg=uG=7T7DQ@mail.gmail.com>",
|
||||
"textAsHtml": "<p>Hey!</p><p>We'd love to cooperate with you - could you please send us your offer?</p><p>Best,<br/>Oskar</p>",
|
||||
"sizeEstimate": 5849
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"JSON Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "Assign labels for message",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Assign labels for message",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Gmail trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get message content",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get all labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge corresponding labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set label values": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get all labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Split out assigned labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate label IDs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add labels to message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get message content": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Assign labels for message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Assign labels for message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set label values",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split out assigned labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge corresponding labels",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge corresponding labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate label IDs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "f691e434c527bcfc50a22f01094756f14427f055aa0b6917a75441617ecd7fb2"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "a998289c-65da-49ea-ba8a-4b277d9e16f3",
|
||||
"name": "Telegram Trigger",
|
||||
"type": "n8n-nodes-base.telegramTrigger",
|
||||
"position": [
|
||||
1060,
|
||||
640
|
||||
],
|
||||
"webhookId": "2901cde3-b35a-4b0b-a1ba-17a7d9f80125",
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"message",
|
||||
"*"
|
||||
],
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "pbbCqv0hRu9TDmWm",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "7f50072a-5312-4a47-823e-0513cd9d383a",
|
||||
"name": "OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
1380,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "={{ $json.message.text }}",
|
||||
"options": {},
|
||||
"resource": "image"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "p4Qrsjiuev2epBzW",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "a59264d6-c199-4d7b-ade4-1e31f10eb632",
|
||||
"name": "Telegram",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
1580,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"chatId": "={{ $json.data[1].message.from.id }}",
|
||||
"operation": "sendPhoto",
|
||||
"binaryData": true,
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "pbbCqv0hRu9TDmWm",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "e0719c38-75ae-4082-91ba-d68c7cd28339",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1060,
|
||||
1000
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "bee14b74-248b-4e17-9221-378daff965aa",
|
||||
"name": "Aggregate",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1320,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"includeBinaries": true
|
||||
},
|
||||
"aggregate": "aggregateAllItemData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "50293949-3dc0-4b35-a040-a3ad1a9e80d0",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-60,
|
||||
479.3775380651615
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1036.6634532467683,
|
||||
"height": 671.0981521245417,
|
||||
"content": "\n# N8N Workflow: AI-Enhanced Image Processing and Communication\n\n## Description:\nThis n8n workflow integrates artificial intelligence to optimize image processing tasks and streamline communication via Telegram. Each node in the workflow provides specific benefits that contribute to enhancing user engagement and facilitating efficient communication.\n\n## Title:\nAI-Enhanced Image Processing and Communication Workflow with n8n\n\n## Node Names and Benefits:\n\n\n3. Set up the necessary credentials for the Telegram account and OpenAI API.\n4. Configure each node in the workflow to maximize its benefits and optimize user engagement.\n5. Run the workflow to leverage AI-enhanced image processing and communication capabilities for enhanced user interactions.\n6. Monitor the workflow execution for any errors or issues that may arise during processing.\n7. Customize the workflow nodes, parameters, or AI models to align with specific business objectives and user engagement strategies.\n8. Embrace the power of AI-driven image processing and interactive communication on Telegram to elevate user engagement and satisfaction levels.\n\n## Elevate your user engagement strategies with AI-powered image processing and seamless communication on Telegram using n8n!\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "529fb39e-5140-41b2-8454-2a1c45d670d0",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1000,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"width": 276.16526553869744,
|
||||
"height": 296.62433647952383,
|
||||
"content": " **Telegram Trigger Node**:\n - Benefit: Initiates the workflow based on incoming messages from users on Telegram, enabling real-time interaction and communication."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "339bc4ff-bca0-48ee-98ce-bbf7deb3f6fc",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1320,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"width": 238.40710655577766,
|
||||
"height": 316.8446819098802,
|
||||
"content": " **OpenAI Node**:\n - Benefit: Utilizes AI algorithms to analyze text content of messages, generating intelligent responses and enhancing the quality of communication."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "64216b05-5a6e-44f5-8cf1-86487368d892",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1520,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"width": 229.95409290591755,
|
||||
"height": 332.7896020182219,
|
||||
"content": "**Telegram Node**:\n - Benefit: Sends processed data, including images and responses, back to users on Telegram, ensuring seamless communication and user engagement."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c15a57ee-f461-43d0-9232-b6d2728ee058",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1260,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"height": 332.78960201822133,
|
||||
"content": "**Merge Node**:\n - Benefit: Combines and organizes processed data for efficient handling and integration, optimizing the workflow's data management capabilities."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f6f0aaac-426a-4923-9100-a52f53e78dec",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1000,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"height": 326.33042266316727,
|
||||
"content": "**Aggregate Node**:\n - Benefit: Aggregates all item data, including binaries if specified, for comprehensive reporting and analysis, aiding in decision-making and performance evaluation.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c36d8d68-0641-4e6d-92b1-82879d81e2c9",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-80,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"color": 2,
|
||||
"width": 1837.5703604833238,
|
||||
"height": 706.8771853945606,
|
||||
"content": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Telegram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Telegram Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1397
workflows/Aggregate/0681_Aggregate_HTTP_Create_Webhook.json
Normal file
1397
workflows/Aggregate/0681_Aggregate_HTTP_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
522
workflows/Aggregate/0691_Aggregate_Jotform_Create_Triggered.json
Normal file
522
workflows/Aggregate/0691_Aggregate_Jotform_Create_Triggered.json
Normal file
@@ -0,0 +1,522 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "95b3ab5a70ab1c8c1906357a367f1b236ef12a1409406fd992f60255f0f95f85"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "f13c4b60-5b5f-474b-b79b-45c4fb9cc067",
|
||||
"name": "Subscribe contact in KlickTipp",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Adds the contact to KlickTipp using the transformed webinar registration data.",
|
||||
"position": [
|
||||
-800,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $('New webinar booking via JotForm').item.json.Email }}",
|
||||
"fields": {
|
||||
"dataFields": [
|
||||
{
|
||||
"fieldId": "fieldFirstName",
|
||||
"fieldValue": "={{ $('New webinar booking via JotForm').item.json.Name.first }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "fieldLastName",
|
||||
"fieldValue": "={{ $('New webinar booking via JotForm').item.json.Name.last }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "fieldBirthday",
|
||||
"fieldValue": "={{ $json.birthday }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214129",
|
||||
"fieldValue": "={{ $json.linkdein_url }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214128",
|
||||
"fieldValue": "={{ $json.work_experience_in_years }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214132",
|
||||
"fieldValue": "={{ $json['webinar_start_date&time'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214125",
|
||||
"fieldValue": "={{ $('New webinar booking via JotForm').item.json['Bitte lassen Sie uns wissen, wenn Sie vor dem Webinar Fragen/Hinweise an unsere Referenten haben.'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214431",
|
||||
"fieldValue": "={{ $('New webinar booking via JotForm').item.json['Webinar Auswahl:'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214432",
|
||||
"fieldValue": "={{ $('New webinar booking via JotForm').item.json['In welchem Intervall möchtest Du erinnert werden?'] }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"listId": "358895",
|
||||
"resource": "subscriber",
|
||||
"operation": "subscribe",
|
||||
"smsNumber": "={{ $json.mobile_number }}"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "7aa2b991-782d-4171-ac30-131c2062e17c",
|
||||
"name": "Convert and set webinar data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "This node formats the data received from the Jotform submission, ensuring it is correctly formatted for further processing at the KlickTipp API endpoint.",
|
||||
"position": [
|
||||
-1020,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "f1263cb6-654a-4d07-9073-c015b720e6b7",
|
||||
"name": "mobile_number",
|
||||
"type": "string",
|
||||
"value": "={{ \n// Converts a phone number to numeric-only format with international code prefixed by \"00\"\n$json.Mobilrufnummer.full\n .replace(/^\\+/, '00') // Replace leading \"+\" with \"00\"\n .replace(/[^0-9]/g, '') // Remove non-numeric characters\n}}"
|
||||
},
|
||||
{
|
||||
"id": "b09cc146-e614-478a-8f33-324d813e0120",
|
||||
"name": "birthday",
|
||||
"type": "string",
|
||||
"value": "={{ \n// Converts a date to a UNIX timestamp (in seconds)\nMath.floor(\n new Date(\n $json.Geburtstag.year + '-' + \n $json.Geburtstag.month + '-' + \n $json.Geburtstag.day + 'T00:00:00'\n ).getTime() / 1000\n )\n}}"
|
||||
},
|
||||
{
|
||||
"id": "cecd4621-b31b-43d0-9076-08f0bde83f5b",
|
||||
"name": "linkdein_url",
|
||||
"type": "string",
|
||||
"value": "={{ \n// Validates if the URL matches the correct format; returns it if valid, else a default fallback URL\n/^https?:\\/\\/[^\\s$.?#].[^\\s]*$/.test($json['LinkedIn Profil Link/URL (ACHTUNG keine Formatprüfung bei Eingabe)']) \n ? $json['LinkedIn Profil Link/URL (ACHTUNG keine Formatprüfung bei Eingabe)'] \n : 'https://www.URLnichtImPassendenFormat.de' \n}}"
|
||||
},
|
||||
{
|
||||
"id": "1c455eb9-0750-4d69-9dab-390847a3d582",
|
||||
"name": "work_experience_in_years",
|
||||
"type": "string",
|
||||
"value": "={{\n// Multiplies the decimalnumber value by 100\n$json['Berufserfahrung in Jahren'] * 100 }}"
|
||||
},
|
||||
{
|
||||
"id": "f8e5ecc7-1549-409f-a6d5-e5beb773baef",
|
||||
"name": "webinar_start_date&time",
|
||||
"type": "string",
|
||||
"value": "={{ \n (() => {\n // Input format example: '2025-01-31 13:00'\n const rawDate = $json['Termin Auswahl:']; \n\n // Ensure the raw date is provided and in the expected format\n if (!rawDate || typeof rawDate !== 'string') return ''; // Return empty string if invalid\n\n // Split the date and time into components\n const [datePart, timePart] = rawDate.split(' '); // Example: ['2025-01-31', '13:00']\n if (!datePart || !timePart) return ''; // Return empty string if date or time is missing\n\n // Validate the date format (YYYY-MM-DD)\n const [year, month, day] = datePart.split('-'); // Split year, month, day\n if (!year || !month || !day || year.length !== 4 || month.length !== 2 || day.length !== 2) return ''; // Validate format\n\n // Combine into ISO 8601 format (YYYY-MM-DDTHH:mm) with Germany's local timezone offset\n const isoDateTime = `${year}-${month}-${day}T${timePart}:00+01:00`;\n\n // Create a Date object in Germany's timezone\n const localDate = new Date(isoDateTime);\n\n // Convert the local time to a UTC UNIX timestamp in seconds\n return Math.floor(localDate.getTime() / 1000); \n })()\n}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "2dade6bf-6b65-45db-9a33-9faca1860924",
|
||||
"name": "New webinar booking via JotForm",
|
||||
"type": "n8n-nodes-base.jotFormTrigger",
|
||||
"notes": "Triggers the workflow when a new form submission is received on JotForm.",
|
||||
"position": [
|
||||
-1260,
|
||||
600
|
||||
],
|
||||
"webhookId": "a8dd1d6b-dc1c-4293-84dd-59ee063c1fbd",
|
||||
"parameters": {
|
||||
"form": "250054687472360"
|
||||
},
|
||||
"credentials": {
|
||||
"jotFormApi": {
|
||||
"id": "71GlBAECuZVP7vMO",
|
||||
"name": "Ricardo's JotForm account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d796b45c-64c8-4d6b-b267-9b828ef24345",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-660,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"width": 839.0148942368631,
|
||||
"height": 1288.9426551387483,
|
||||
"content": "### Introduction\nThis workflow streamlines the process of handling webinar registrations submitted via JotForm. It ensures the data is correctly formatted and seamlessly integrates with KlickTipp. Input data is validated and transformed to meet KlickTipp’s API requirements, including formatting phone numbers, converting dates, and validating URLs.\n\n### Benefits\n- **Efficient lead generation**: Contacts from forms are automatically imported into KlickTipp and can be used immediately, saving time and increasing the conversion rate.\n- **Automated processes**: Experts can start workflows directly, such as welcome emails or course admissions, reducing administrative effort.\n- **Error-free data management**: The template ensures precise data mapping, avoids manual corrections, and reinforces a professional appearance.\n\n### Key Feature\n- **JotForm Trigger**: Captures new form submissions, including participant details and webinar preferences.\n- **Data Processing**: Standardizes and validates input fields:\n - Converts phone numbers to numeric-only format with international prefixes.\n - Transforms dates into UNIX timestamps.\n - Validates LinkedIn URLs and applies fallback URLs if validation fails.\n - Scales numerical fields, such as work experience, for specific use cases.\n- **Subscriber Management in KlickTipp**: Adds or updates participants as subscribers in KlickTipp. Includes custom field mappings and tags, such as:\n - Personal information: Name, email, phone number.\n - Webinar details: Chosen webinar, start date/time.\n - Preferences: Reminder intervals, questions for presenters.\n - Contact segmentation: Creates new tags based on form submission if necessary and adds these dynamic tags as well as fixed tags to contacts.\n\n- **Error Handling**: Validates critical fields like phone numbers, URLs, and dates to prevent incorrect data submissions.\n\n#### Setup Instructions\n1. Set up the JotForm and KlickTipp nodes in your n8n instance.\n2. Authenticate your JotForm and KlickTipp accounts.\n3. Create the necessary custom fields to match the data structure\n4. Verify and customize field assignments in the workflow to align with your specific form and subscriber list setup.\n\n\n### Testing and Deployment:\n1. Test the workflow by filling the form on JotForm.\n2. Verify data updates in KlickTipp.\n\n- **Customization**: Update field mappings within the KlickTipp nodes to align with your account setup. This ensures accurate data syncing."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "81832238-a21c-4d2f-b8f2-6a0050370884",
|
||||
"name": "Define Array of tags from Jotform",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "This node defines tags based on the form submission, such as the webinar selection, date, and reminder interval, and saves them as an array for further processing.",
|
||||
"position": [
|
||||
-500,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "814576c1-ba16-4546-9815-2b7dec324f94",
|
||||
"name": "tags",
|
||||
"type": "array",
|
||||
"value": "={{ [\n//Every line represents one of the dynamic values that are received from the form submission in order to create an array/list of tags. If you want to add another variable, keep in mind to add a comma at the end of the last line and only then to add your parameter at the end of this list.\n $('New webinar booking via JotForm').item.json['Webinar Auswahl:'], \n $('New webinar booking via JotForm').item.json['Termin Auswahl:'], \n $('New webinar booking via JotForm').item.json['In welchem Intervall möchtest Du erinnert werden?']\n] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "99beae4f-ab6e-4975-a6b8-baade0279f24",
|
||||
"name": "Split Out Jotform tags",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"notes": "In this node we split the created array again into items so we can merge them with the existing tags we request from KlickTipp.",
|
||||
"position": [
|
||||
-320,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "tags"
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "283d964b-3a37-4ac9-9562-26af43ef32d5",
|
||||
"name": "Tag contact directly in KlickTipp",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Applies existing tags to a subscriber in KlickTipp. This enables the use of specific signatures, sign out automations as well as the automation of emails and campaigns or other automations.",
|
||||
"position": [
|
||||
840,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $('New webinar booking via JotForm').item.json.Email }}",
|
||||
"tagId": "={{$json.tag_ids}}",
|
||||
"resource": "contact-tagging"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "412ea807-11bb-47a1-ae60-168396bbfb3a",
|
||||
"name": "Tag creation check",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"notes": "This node checks the result of the tag comparison and branches the workflow accordingly in order to directly tag the contact or to create the tag first and to then follow through with the tagging.",
|
||||
"position": [
|
||||
140,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "d9567816-9236-434d-b46e-e47f4d36f289",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.exist }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "50478814-aab3-4ec8-94e4-59ff8e30e632",
|
||||
"name": "Aggregate tags to add to contact",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"notes": "This node aggregates all IDs of the existing tags to a list.",
|
||||
"position": [
|
||||
640,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "tag_ids",
|
||||
"fieldToAggregate": "tag_id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "feeb10fa-3eff-4c60-8d2c-77d0da3becf8",
|
||||
"name": "Create the tag in KlickTipp",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Creates a new tag in KlickTipp if it does not already exist.",
|
||||
"position": [
|
||||
440,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"name": "={{ $json.name }}",
|
||||
"operation": "create"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "bf19001c-5369-4d40-ba94-f9d919222455",
|
||||
"name": "Aggregate array of created tags",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"notes": "This node aggregates all IDs of the newly created tags to a list.",
|
||||
"position": [
|
||||
640,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "tag_ids",
|
||||
"fieldToAggregate": "id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "eb4c28a3-30d2-42fb-986c-14b31497611c",
|
||||
"name": "Tag contact KlickTipp after trag creation",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Associates a specific tag with a subscriber in KlickTipp using their email address. This enables the use of specific signatures, signout automations as well as the automation of emails and campaigns or other automations.",
|
||||
"position": [
|
||||
840,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $('New webinar booking via JotForm').item.json.Email }}",
|
||||
"tagId": "={{$json.tag_ids}}",
|
||||
"resource": "contact-tagging"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "5df24c47-f8d9-4f34-8257-00f06ede36ad",
|
||||
"name": "Get list of all existing tags",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "This node fetches all tags that already exist in KlickTipp.",
|
||||
"position": [
|
||||
-500,
|
||||
700
|
||||
],
|
||||
"parameters": {},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "7c2b8718-6f79-4a6a-afb4-3c429882fd98",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"notes": "This node merges the tags which are fetched via the form with the existing tags we requested in order to identify if new tags need to be created.",
|
||||
"position": [
|
||||
-80,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combineBySql",
|
||||
"query": "SELECT \n input1.tags AS name, -- Extracts the tag name from input1\n IF(input2.value IS NOT NULL, true, false) AS exist, -- Checks if the tag exists in input2 (returns true if found, false otherwise)\n input2.id AS tag_id -- Retrieves the ID of the tag from input2 if it exists, otherwise returns NULL\nFROM \n input1\nLEFT JOIN \n input2 \nON \n input1.tags = input2.value -- Matches tags from input1 with values in input2"
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Tag creation check",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Tag creation check": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate tags to add to contact",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Create the tag in KlickTipp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Jotform tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create the tag in KlickTipp": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate array of created tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert and set webinar data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Subscribe contact in KlickTipp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get list of all existing tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Subscribe contact in KlickTipp": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get list of all existing tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Define Array of tags from Jotform",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate array of created tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Tag contact KlickTipp after trag creation",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"New webinar booking via JotForm": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert and set webinar data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate tags to add to contact": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Tag contact directly in KlickTipp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Define Array of tags from Jotform": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Jotform tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,508 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "95b3ab5a70ab1c8c1906357a367f1b236ef12a1409406fd992f60255f0f95f85"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "9e4a97c9-65dc-4be1-bd9d-d5e84ffedd69",
|
||||
"name": "Subscribe contact in KlickTipp",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "This node subscribes the formatted contact data to a specific KlickTipp list.",
|
||||
"position": [
|
||||
900,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $('New submission via Gravityforms').item.json.body['4'] }}",
|
||||
"fields": {
|
||||
"dataFields": [
|
||||
{
|
||||
"fieldId": "fieldFirstName",
|
||||
"fieldValue": "={{ $('New submission via Gravityforms').item.json.body['1'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "fieldLastName",
|
||||
"fieldValue": "={{ $('New submission via Gravityforms').item.json.body['3'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "fieldBirthday",
|
||||
"fieldValue": "={{ $json.birthday }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214512",
|
||||
"fieldValue": "={{ $('New submission via Gravityforms').item.json.body['7'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214514",
|
||||
"fieldValue": "={{ $json.webinar_rating }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214515",
|
||||
"fieldValue": "={{ $('New submission via Gravityforms').item.json.body['9'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214516",
|
||||
"fieldValue": "={{ $('New submission via Gravityforms').item.json.body['12.1'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214513",
|
||||
"fieldValue": "={{ $json.webinar_choice }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"listId": "358895",
|
||||
"resource": "subscriber",
|
||||
"operation": "subscribe",
|
||||
"smsNumber": "={{ $json.mobile_number }}"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "a6cc678f-b8bf-4dc9-a9f5-3edeaee44d3b",
|
||||
"name": "Convert and set feedback data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "This node transforms the form data from Gravity Forms into the appropriate format required for the KlickTipp API.",
|
||||
"position": [
|
||||
680,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "f1263cb6-654a-4d07-9073-c015b720e6b7",
|
||||
"name": "mobile_number",
|
||||
"type": "string",
|
||||
"value": "={{ \n// Converts a phone number to numeric-only format with international code prefixed by \"00\"\n$json.body['5'] \n ? $json.body['5']\n .replace(/^\\+/, '00') // Replace leading \"+\" with \"00\"\n .replace(/[^0-9]/g, '') // Remove non-numeric characters\n : ''\n}}"
|
||||
},
|
||||
{
|
||||
"id": "b09cc146-e614-478a-8f33-324d813e0120",
|
||||
"name": "birthday",
|
||||
"type": "string",
|
||||
"value": "={{ \n// Converts a date to a UNIX timestamp (in seconds)\nMath.floor(\n new Date($json.body['6'] + 'T00:00:00').getTime() / 1000\n)\n}}"
|
||||
},
|
||||
{
|
||||
"id": "1c455eb9-0750-4d69-9dab-390847a3d582",
|
||||
"name": "webinar_choice",
|
||||
"type": "string",
|
||||
"value": "={{ \n // Convert the date format from \"DD.MM.YYYY HH:mm\" to \"MM/DD/YYYY HH:mm\"\n Math.floor(new Date($json[\"body\"][\"13\"].replace(\n /(\\d{2})\\.(\\d{2})\\.(\\d{4})/, // Match the pattern \"DD.MM.YYYY\"\n \"$2/$1/$3\" // Rearrange to \"MM/DD/YYYY\" (needed for JavaScript Date parsing)\n )).getTime() / 1000) // Convert to milliseconds and divide by 1000 to get Unix timestamp (in seconds)\n}}"
|
||||
},
|
||||
{
|
||||
"id": "e375b10b-b05f-413e-93ed-b835e009dd91",
|
||||
"name": "webinar_rating",
|
||||
"type": "string",
|
||||
"value": "={{\n// Multiplies the decimal number value by 100\n$json.body['8'] * 100 }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "1f869f92-8e87-4ab5-8938-f327558ca73b",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
880,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"width": 920,
|
||||
"height": 1182,
|
||||
"content": "### Introduction\nThis workflow facilitates seamless integration between Gravity Forms and KlickTipp, automating the process of handling customer feedback. By transforming raw form data into a format compatible with KlickTipp’s API, it eliminates manual data entry and ensures accurate, consistent information. The workflow relies on community nodes and is available exclusively for self-hosted n8n environments.\n\n### Benefits\n- **Efficient feedback management**: Automatically processes Gravity Forms submissions, saving time and ensuring timely data handling.\n- **Automation of workflows**: Launch follow-up actions like sending thank-you emails or surveys without manual intervention.\n- **Improved data accuracy**: Validates and transforms input data, minimizing errors and maintaining a professional database.\n\n### Key Features\n- **Gravity Forms Trigger**: Captures new form submissions using a webhook, including user feedback and preferences.\n- **Data Processing and Transformation**:\n - Converts phone numbers to numeric-only format with international prefixes.\n - Transforms date fields (e.g., birthdays) into UNIX timestamps.\n - Scales numerical responses like feedback ratings to match desired formats.\n- **Subscriber Management in KlickTipp**: Adds or updates participants as subscribers in KlickTipp. Includes custom field mappings and tags, such as:\n - Personal details (e.g., name, email, phone number).\n - Feedback specifics (e.g., webinar ratings, selected sessions).\n - Structured answers from Gravity Forms responses.\n - Contact segmentation: Creates new tags based on form submission if necessary and adds these dynamic tags as well as fixed tags to contacts.\n- **Error Handling**: Ensures invalid or missing data does not disrupt the workflow, providing fallback values where needed.\n\n### Setup Instructions\n1. Set up the Webhook and KlickTipp nodes in your n8n instance.\n2. Connect your Webhook to Gravity Forms and authenticate your KlickTipp account.\n3. Create the necessary custom fields to match the data structure\n4. Verify and customize field assignments in the workflow to align with your specific form and subscriber list setup.\n\n\n\n### Testing and Deployment\n1. Test the workflow by submitting a form through Gravity Forms.\n2. Verify that the data is correctly processed and updated in KlickTipp.\n3. Simulate various scenarios (e.g., missing or invalid data) to ensure robust error handling.\n\n- **Customization**: Update field mappings within the KlickTipp nodes to ensure alignment with your specific account setup. \n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b2206acf-c3e1-40bc-b268-7a7b89506f5d",
|
||||
"name": "Tag contact directly in KlickTipp",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Applies existing tags to a subscriber in KlickTipp. This enables the use of specific signatures, sign out automations as well as the automation of emails and campaigns or other automations.",
|
||||
"position": [
|
||||
2620,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $('New submission via Gravityforms').item.json.body['4'] }}",
|
||||
"tagId": "={{$json.tag_ids}}",
|
||||
"resource": "contact-tagging"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "a143bed3-a63b-4759-b249-a1cb0683c22a",
|
||||
"name": "Tag creation check",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"notes": "This node checks the result of the tag comparison and branches the workflow accordingly in order to directly tag the contact or to create the tag first and to then follow through with the tagging.",
|
||||
"position": [
|
||||
1920,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "d9567816-9236-434d-b46e-e47f4d36f289",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.exist }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "9cac27ed-0fa7-4e80-84da-4d9f5bae7d72",
|
||||
"name": "Aggregate tags to add to contact",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"notes": "This node aggregates all IDs of the existing tags to a list.",
|
||||
"position": [
|
||||
2420,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "tag_ids",
|
||||
"fieldToAggregate": "tag_id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7f72f6ca-e13f-4f66-a8c9-c9efee511d84",
|
||||
"name": "Create the tag in KlickTipp",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Creates a new tag in KlickTipp if it does not already exist.",
|
||||
"position": [
|
||||
2220,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"name": "={{ $json.name }}",
|
||||
"operation": "create"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b44fe73c-011e-4dee-9961-e8221d577140",
|
||||
"name": "Aggregate array of created tags",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"notes": "This node aggregates all IDs of the newly created tags to a list.",
|
||||
"position": [
|
||||
2420,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "tag_ids",
|
||||
"fieldToAggregate": "id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a03ba56c-1470-48c4-a3ea-aa7d282e5e37",
|
||||
"name": "Tag contact KlickTipp after trag creation",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Associates a specific tag with a subscriber in KlickTipp using their email address. This enables the use of specific signatures, signout automations as well as the automation of emails and campaigns or other automations.",
|
||||
"position": [
|
||||
2620,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $('New submission via Gravityforms').item.json.body['4'] }}",
|
||||
"tagId": "={{$json.tag_ids}}",
|
||||
"resource": "contact-tagging"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "605a93b4-1ebf-4436-8aad-ea433e4bf5bf",
|
||||
"name": "Get list of all existing tags",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "This node fetches all tags that already exist in KlickTipp.",
|
||||
"position": [
|
||||
1280,
|
||||
460
|
||||
],
|
||||
"parameters": {},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b17669be-62b3-423d-8018-dc92c983c5c7",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"notes": "This node merges the tags which are fetched via the form with the existing tags we requested in order to identify if new tags need to be created.",
|
||||
"position": [
|
||||
1700,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combineBySql",
|
||||
"query": "SELECT \n input1.tags AS name, -- Extracts the tag name from input1\n IF(input2.value IS NOT NULL, true, false) AS exist, -- Checks if the tag exists in input2 (returns true if found, false otherwise)\n input2.id AS tag_id -- Retrieves the ID of the tag from input2 if it exists, otherwise returns NULL\nFROM \n input1\nLEFT JOIN \n input2 \nON \n input1.tags = input2.value -- Matches tags from input1 with values in input2"
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "3f643d7b-7acd-46ad-a31a-aa1cd4ec0424",
|
||||
"name": "Define Array of tags from Gravityforms",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "This node defines tags based on the form submission, such as the webinar selection, date, and reminder interval, and saves them as an array for further processing.",
|
||||
"position": [
|
||||
1280,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "814576c1-ba16-4546-9815-2b7dec324f94",
|
||||
"name": "tags",
|
||||
"type": "array",
|
||||
"value": "={{ \n Array.from([\n // Extracts value from Typeform response (field 8), or returns null if not found\n $('New submission via Gravityforms')?.item?.json?.body?.['8'] || null, \n $('New submission via Gravityforms').item.json.body['13'],\n (() => {\n try {\n // Extracts and parses JSON from Typeform response (field 11), or returns null if not found\n let value = $('New submission via Gravityforms')?.item?.json?.body?.['11'];\n return value ? JSON.parse(value) : null;\n } catch (error) {\n return null; // Return null if JSON parsing fails\n }\n })()\n ].flat().filter(item => item !== null)) // Flattens the array and removes null values\n}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "e52482ea-5604-4c4d-a202-de770d4fb240",
|
||||
"name": "Split Out Gravityforms tags",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"notes": "In this node we split the created array again into items so we can merge them with the existing tags we request from KlickTipp.",
|
||||
"position": [
|
||||
1460,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "tags"
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3d020c2b-69d7-4c09-9b09-47ac4d87861c",
|
||||
"name": "New submission via Gravityforms",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"notes": "This webhook node captures incoming data from the Gravity Forms plugin on the website. It triggers the workflow when a new form submission is received.",
|
||||
"position": [
|
||||
460,
|
||||
340
|
||||
],
|
||||
"webhookId": "9e8feb6b-df09-4f17-baf0-9fa3b8c0093c",
|
||||
"parameters": {
|
||||
"path": "9e8feb6b-df09-4f17-baf0-9fa3b8c0093c",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Tag creation check",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Tag creation check": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate tags to add to contact",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Create the tag in KlickTipp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create the tag in KlickTipp": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate array of created tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Gravityforms tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert and set feedback data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Subscribe contact in KlickTipp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get list of all existing tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Subscribe contact in KlickTipp": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Define Array of tags from Gravityforms",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Get list of all existing tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate array of created tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Tag contact KlickTipp after trag creation",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"New submission via Gravityforms": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert and set feedback data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate tags to add to contact": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Tag contact directly in KlickTipp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Define Array of tags from Gravityforms": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Gravityforms tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,508 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "95b3ab5a70ab1c8c1906357a367f1b236ef12a1409406fd992f60255f0f95f85"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "8f3fd206-b47f-4eae-a968-dc44ac0e6976",
|
||||
"name": "Convert and set quiz data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "This node formats the data received from the Jotform submission, ensuring it is correctly formatted for further processing at the KlickTipp API endpoint.",
|
||||
"position": [
|
||||
-1160,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "f1263cb6-654a-4d07-9073-c015b720e6b7",
|
||||
"name": "mobile_number",
|
||||
"type": "string",
|
||||
"value": "={{ \n// Converts a phone number to numeric-only format with international code prefixed by \"00\"\n$json.Mobilrufnummer \n ? $json.Mobilrufnummer\n .replace(/^\\+/, '00') // Replace leading \"+\" with \"00\"\n .replace(/[^0-9]/g, '') // Remove non-numeric characters\n : ''\n}}"
|
||||
},
|
||||
{
|
||||
"id": "b09cc146-e614-478a-8f33-324d813e0120",
|
||||
"name": "birthday",
|
||||
"type": "string",
|
||||
"value": "={{ \n// Converts a date to a UNIX timestamp (in seconds)\nMath.floor(\n new Date($json.Geburtstag + 'T00:00:00').getTime() / 1000\n)\n}}"
|
||||
},
|
||||
{
|
||||
"id": "1c455eb9-0750-4d69-9dab-390847a3d582",
|
||||
"name": "question1_klicktipp_use",
|
||||
"type": "string",
|
||||
"value": "={{ \n// Joins the values from the array into a comma-separated string\n$json['Wofür wird KlickTipp genutzt?'] \n ? $json['Wofür wird KlickTipp genutzt?'].join(', ') \n : '' \n}}"
|
||||
},
|
||||
{
|
||||
"id": "e375b10b-b05f-413e-93ed-b835e009dd91",
|
||||
"name": "question3_amount_cht_members",
|
||||
"type": "string",
|
||||
"value": "={{\n// Multiplies the decimalnumber value by 100\n$json['Wie viele Mitarbeiter hat das KlickTipp Customer Happiness Team?'] * 100 }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "c807913b-dd90-49a2-b4ad-9f56a261fa04",
|
||||
"name": "Subscribe contact in KlickTipp",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Adds the contact to KlickTipp using the transformed quiz data.",
|
||||
"position": [
|
||||
-940,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $('New quiz sumbmission via Typeform').item.json['E-Mail Adresse'] }}",
|
||||
"fields": {
|
||||
"dataFields": [
|
||||
{
|
||||
"fieldId": "fieldFirstName",
|
||||
"fieldValue": "={{ $('New quiz sumbmission via Typeform').item.json.Vorname }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "fieldLastName",
|
||||
"fieldValue": "={{ $('New quiz sumbmission via Typeform').item.json.Nachname }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "fieldBirthday",
|
||||
"fieldValue": "={{ $json.birthday }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214474",
|
||||
"fieldValue": "={{ $('New quiz sumbmission via Typeform').item.json['LinkedIn URL'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214475",
|
||||
"fieldValue": "={{ $json.question1_klicktipp_use }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214476",
|
||||
"fieldValue": "={{ $('New quiz sumbmission via Typeform').item.json['Wo ist der Firmensitz der Klick-Tipp Limited?'] }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "field214477",
|
||||
"fieldValue": "={{ $json.question3_amount_cht_members }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"listId": "358895",
|
||||
"resource": "subscriber",
|
||||
"operation": "subscribe",
|
||||
"smsNumber": "={{ $json.mobile_number }}"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "55656b0f-6fb4-435c-82be-750b557384b4",
|
||||
"name": "New quiz sumbmission via Typeform",
|
||||
"type": "n8n-nodes-base.typeformTrigger",
|
||||
"notes": "Triggers the workflow when a new quiz submission is received on Type Form.",
|
||||
"position": [
|
||||
-1380,
|
||||
680
|
||||
],
|
||||
"webhookId": "37b98062-04ab-49be-b0f7-0fee3841bbd6",
|
||||
"parameters": {
|
||||
"formId": "nRFO0o92"
|
||||
},
|
||||
"credentials": {
|
||||
"typeformApi": {
|
||||
"id": "1AUCqB2W8UDCVKhX",
|
||||
"name": "Ricardo's Typeform account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "92cf733f-f655-4302-b092-94d33399c8bd",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-700,
|
||||
900
|
||||
],
|
||||
"parameters": {
|
||||
"width": 860.4918918918919,
|
||||
"height": 1166.607676825762,
|
||||
"content": "### Introduction\nThis workflow facilitates seamless integration between Typeform and KlickTipp, automating the process of handling quiz responses. By transforming raw quiz data into a format compatible with KlickTipp’s API, it eliminates manual data entry and ensures accurate, consistent information. \n\n### Benefits\n- **Efficient lead generation**: Contacts from forms are automatically imported into KlickTipp and can be used immediately, saving time and increasing the conversion rate.\n- **Automated processes**: Experts can start workflows directly, such as welcome emails or course admissions, reducing administrative effort.\n- **Error-free data management**: The template ensures precise data mapping, avoids manual corrections, and reinforces a professional appearance.\n\n### Key Features\n- **Typeform Trigger**: Captures new quiz submissions, including user details and quiz responses.\n- **Data Processing and Transformation**:\n - Formats phone numbers to numeric-only format with international prefixes.\n - Converts dates (e.g., birthdays) to UNIX timestamps.\n - Maps multiple-choice quiz answers to string values for API compatibility.\n - Scales numeric quiz responses for tailored use cases.\n- **Subscriber Management in KlickTipp**: Adds or updates participants as subscribers in KlickTipp. Includes custom field mappings and tags, such as:\n - Personal details (e.g., name, email, phone number, birthday).\n - Quiz responses (e.g., intended usage of KlickTipp, company location, and team size).\n - Contact segmentation: Creates new tags based on form submission if necessary and adds these dynamic tags as well as fixed tags to contacts.\n- **Error Handling**: Handles empty or malformed data gracefully, ensuring clean submissions to KlickTipp.\n\n### Setup Instructions\n1. Set up the Typeform and KlickTipp nodes in your n8n instance.\n2. Connect your Typeform webhook to capture quiz responses and authenticate your KlickTipp account.\n3. Create the necessary custom fields to match the data structure:\n4. Verify and customize field mappings in the workflow to align with your specific form and subscriber list setup.\n\n\n\n### Testing and Deployment\n1. Test the workflow by submitting a quiz through Typeform.\n2. Verify that the data is correctly processed and updated in KlickTipp.\n\n- **Customization**: Update field mappings within the KlickTipp nodes to ensure alignment with your specific account setup. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "81efd56c-43e7-4598-a9ab-e7578406b227",
|
||||
"name": "Get list of all existing tags",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "This node fetches all tags that already exist in KlickTipp.",
|
||||
"position": [
|
||||
-500,
|
||||
700
|
||||
],
|
||||
"parameters": {},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "4e2de2e8-e0df-476a-aa2e-ff4b00ce7037",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"notes": "This node merges the tags which are fetched via the form with the existing tags we requested in order to identify if new tags need to be created.",
|
||||
"position": [
|
||||
-80,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combineBySql",
|
||||
"query": "SELECT \n input1.tags AS name, -- Extracts the tag name from input1\n IF(input2.value IS NOT NULL, true, false) AS exist, -- Checks if the tag exists in input2 (returns true if found, false otherwise)\n input2.id AS tag_id -- Retrieves the ID of the tag from input2 if it exists, otherwise returns NULL\nFROM \n input1\nLEFT JOIN \n input2 \nON \n input1.tags = input2.value -- Matches tags from input1 with values in input2"
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "fd4b0ed3-08cb-4e6b-8538-1fe7a391bd25",
|
||||
"name": "Define Array of tags from Typeform",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "This node defines tags based on the form submission, such as the webinar selection, date, and reminder interval, and saves them as an array for further processing.",
|
||||
"position": [
|
||||
-500,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "814576c1-ba16-4546-9815-2b7dec324f94",
|
||||
"name": "tags",
|
||||
"type": "array",
|
||||
"value": "={{ \n Array.from([\n // Every line represents one of the dynamic values that are received from the form submission.\n // These values are extracted from Typeform responses.\n $('New quiz sumbmission via Typeform').item.json['Wofür wird KlickTipp genutzt?'],\n $('New quiz sumbmission via Typeform').item.json['Wo ist der Firmensitz der Klick-Tipp Limited?'],\n $('New quiz sumbmission via Typeform').item.json['Wie viele Mitarbeiter hat das KlickTipp Customer Happiness Team?']\n ].flat()) // .flat() ensures that any nested arrays are merged into a single-level array.\n}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "feab2eb3-28b8-4aa5-87b4-999c144fbdeb",
|
||||
"name": "Split Out Typeform tags",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"notes": "In this node we split the created array again into items so we can merge them with the existing tags we request from KlickTipp.",
|
||||
"position": [
|
||||
-320,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "tags"
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0073c5fb-3eb1-4eab-b572-dce0161afaf1",
|
||||
"name": "Tag creation check",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"notes": "This node checks the result of the tag comparison and branches the workflow accordingly in order to directly tag the contact or to create the tag first and to then follow through with the tagging.",
|
||||
"position": [
|
||||
140,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "d9567816-9236-434d-b46e-e47f4d36f289",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.exist }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "2d6bb138-7b5e-4e51-b18a-cfbec85396d2",
|
||||
"name": "Create the tag in KlickTipp",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Creates a new tag in KlickTipp if it does not already exist.",
|
||||
"position": [
|
||||
440,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"name": "={{ $json.name }}",
|
||||
"operation": "create"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "9045b890-07c3-4432-a900-6296e49904d3",
|
||||
"name": "Aggregate tags to add to contact",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"notes": "This node aggregates all IDs of the existing tags to a list.",
|
||||
"position": [
|
||||
460,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "tag_ids",
|
||||
"fieldToAggregate": "tag_id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e9217f44-f004-4460-87ad-fc0fbd63624c",
|
||||
"name": "Tag contact directly in KlickTipp",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Applies existing tags to a subscriber in KlickTipp. This enables the use of specific signatures, sign out automations as well as the automation of emails and campaigns or other automations.",
|
||||
"position": [
|
||||
720,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $('New quiz sumbmission via Typeform').item.json['E-Mail Adresse'] }}",
|
||||
"tagId": "={{$json.tag_ids}}",
|
||||
"resource": "contact-tagging"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "031ffca6-c94d-484f-b798-1beeb62a6ea5",
|
||||
"name": "Aggregate array of created tags",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"notes": "This node aggregates all IDs of the newly created tags to a list.",
|
||||
"position": [
|
||||
640,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "tag_ids",
|
||||
"fieldToAggregate": "id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bedf795b-0dbf-4d57-b0db-7d3bfaaffbaf",
|
||||
"name": "Tag contact KlickTipp after trag creation",
|
||||
"type": "n8n-nodes-klicktipp.klicktipp",
|
||||
"notes": "Associates a specific tag with a subscriber in KlickTipp using their email address. This enables the use of specific signatures, signout automations as well as the automation of emails and campaigns or other automations.",
|
||||
"position": [
|
||||
840,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $('New quiz sumbmission via Typeform').item.json['E-Mail Adresse'] }}",
|
||||
"tagId": "={{$json.tag_ids}}",
|
||||
"resource": "contact-tagging"
|
||||
},
|
||||
"credentials": {
|
||||
"klickTippApi": {
|
||||
"id": "K9JyBdCM4SZc1cXl",
|
||||
"name": "DEMO KlickTipp account"
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 2
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Tag creation check",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Tag creation check": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate tags to add to contact",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Create the tag in KlickTipp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Typeform tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert and set quiz data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Subscribe contact in KlickTipp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create the tag in KlickTipp": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate array of created tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get list of all existing tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Subscribe contact in KlickTipp": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Define Array of tags from Typeform",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Get list of all existing tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate array of created tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Tag contact KlickTipp after trag creation",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate tags to add to contact": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Tag contact directly in KlickTipp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"New quiz sumbmission via Typeform": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert and set quiz data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Define Array of tags from Typeform": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Typeform tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,268 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "6a5e68bcca67c4cdb3e0b698d01739aea084e1ec06e551db64aeff43d174cb23",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "bc49829b-45f2-4910-9c37-907271982f14",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1500,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"width": 780,
|
||||
"height": 540,
|
||||
"content": "### 3. Do you need more details?\nFind a step-by-step guide in this tutorial\n\n[🎥 Watch My Tutorial](https://youtu.be/MQV8wDSug7M)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "80af5237-9046-4b40-ac7c-167d8e0a490f",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"notes": "Pinyin + Example",
|
||||
"position": [
|
||||
-2140,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $('Telegram Trigger').item.json.message.text }}",
|
||||
"options": {
|
||||
"systemMessage": "=# Context\nYou are an AI-powered language tutor designed to help {{ $('Telegram Trigger').item.json.message.chat.first_name }} practice Chinese vocabulary efficiently. \n\n# Role\nYour primary role is to generate interactive Multiple-Choice Questions (MCQs) and evaluate the user's responses.\n\n# Types of Exercises\n- MCQ: Provide an English word and four Chinese answer choices, one correct and three incorrect.\n\n# Rules for MCQ Generation\n1. Select a random **Chinese word** from this list {{ $json.targetLanguage }}\n2. Randomly select **three incorrect Chinese options** from the list or outside the list.\n3. **Do NOT mark the correct answer with ✅** in the question.\n4. Present the question in the following format:\nExample Question Format:\nWhat is the correct translation for \"Warehouse\"?\nA) 运输\nB) 仓库 \nC) 合同\nD) 投标\n5. Ask the user to respond with **A, B, C, or D**.\n\n# Evaluating User Responses:\n1. **Wait for the user's answer. Do NOT assume correctness before checking.**\n2. If the user selects the correct answer:\n- Respond positively: \"Great job! ✅ [Correct Answer] [Correct Answer's Pinyin] means [English Meaning].\"\n3. If the user selects the wrong answer:\n- Provide corrective feedback: \"Oops! ❌ The correct answer was [Correct Answer] ([English Meaning]).\"\n4. If the user provides an **invalid response** (e.g., \"Hello\"), ask them to respond with **A, B, C, or D**.\n\n# Post-Evaluation:\n- After giving feedback, always generate another question. Do not ask the user if he wants another question\n\n# Behavior & Tone\n- Be engaging and encouraging.\n- Ensure clarity in feedback.\n- Guide the user patiently if they provide invalid inputs."
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "8b35027e-ec5b-4c3e-9a5b-2780b6c40223",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
-2180,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "688d6882-4930-407d-bf58-5f6add8eb159",
|
||||
"name": "Simple Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
-2000,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
|
||||
"sessionIdType": "customKey"
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "33f4a062-73f9-4a99-abca-1184ef2c2a41",
|
||||
"name": "Telegram Trigger",
|
||||
"type": "n8n-nodes-base.telegramTrigger",
|
||||
"position": [
|
||||
-2960,
|
||||
-140
|
||||
],
|
||||
"webhookId": "88179da7-9927-4bdc-8bd7-78022810b48e",
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"message"
|
||||
],
|
||||
"additionalFields": {}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "af385807-d024-477e-9a42-c195043e95da",
|
||||
"name": "Retrive Vocabulary",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
-2700,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 0,
|
||||
"cachedResultUrl": "=",
|
||||
"cachedResultName": "="
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "=",
|
||||
"cachedResultUrl": "=",
|
||||
"cachedResultName": "="
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "3ab67ca5-9839-4fa6-bfc1-4dbbaf5593fc",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-3000,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 680,
|
||||
"height": 540,
|
||||
"content": "### 1. Workflow Trigger with Telegram Message\n1. The workflow is triggered by a user message. \n2. The second node retrieves the vocabulary list from a Google Sheet.\n3. The third node combines all the words in Chinese and English in two distinctive lists.\n\n#### How to setup?\n- **Telegram Node:** set up your telegram bot credentials\n[Learn more about the Telegram Trigger Node](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.telegramtrigger/)\n- **Retrieve Vocabulary from a Google Sheet Node**:\n 1. Add your Google Sheet API credentials to access the Google Sheet file\n 2. Select the file using the list, an URL or an ID\n 3. Select the sheet in which you have stored your vocabulary list\n [Learn more about the Google Sheet Node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "740a2d04-46fe-41f1-b887-f88f3e23c50d",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2300,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 760,
|
||||
"height": 780,
|
||||
"content": "### 2. Conversational AI Agent\nThe AI agent will take as inputs the two vocabulary lists and user's message to asks questions and process answers. Conversations are recorded by chat id; each user has its own conversation with the bot.\n\n#### How to setup?\n- **Telegram Nodes:** set up your telegram bot credentials\n[Learn more about the Telegram Trigger Node](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.telegramtrigger/)\n- **AI Agent with the Chat Model**:\n 1. Add a chat model with the required credentials *(Example: Open AI 4o-mini)*\n 2. Adapt the system prompt with the **target learning language** and the format of the question you want to have.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e92a55dc-6d9d-4008-bb40-72a7f2dd470c",
|
||||
"name": "Aggregate Vocabulary Lists",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
-2460,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "initialLanguage",
|
||||
"fieldToAggregate": "initialText"
|
||||
},
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "targetLanguage",
|
||||
"fieldToAggregate": "translatedText"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "18b29677-cfc0-4817-9321-35090a3fda2e",
|
||||
"name": "Answer to the User",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
-1740,
|
||||
-140
|
||||
],
|
||||
"webhookId": "=",
|
||||
"parameters": {
|
||||
"text": "={{ $json.output }}",
|
||||
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
|
||||
"additionalFields": {
|
||||
"appendAttribution": false
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1.2
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Answer to the User",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simple Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Telegram Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Retrive Vocabulary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Retrive Vocabulary": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate Vocabulary Lists",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate Vocabulary Lists": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
475
workflows/Aggregate/1324_Aggregate_Gmail_Send_Triggered.json
Normal file
475
workflows/Aggregate/1324_Aggregate_Gmail_Send_Triggered.json
Normal file
@@ -0,0 +1,475 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "8141ffad-df2a-403b-a869-799c036f9733",
|
||||
"name": "Gmail trigger",
|
||||
"type": "n8n-nodes-base.gmailTrigger",
|
||||
"position": [
|
||||
-600,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"filters": {},
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "uBcIMfsTtKjexw7I",
|
||||
"name": "Gmail (workfloowstutorial@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6d9aa398-e2de-4fd0-b939-2a12d0c9fe14",
|
||||
"name": "Get message content",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
-340,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"options": {},
|
||||
"messageId": "={{ $json.id }}",
|
||||
"operation": "get"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "uBcIMfsTtKjexw7I",
|
||||
"name": "Gmail (workfloowstutorial@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "cd86bc09-8c7f-4c85-9cb3-6dbd42420672",
|
||||
"name": "Set label values",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
300,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "labels",
|
||||
"type": "arrayValue",
|
||||
"arrayValue": "={{ $json.labels }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "329435a6-51d1-416e-9aa9-5fe9a8dce74f",
|
||||
"name": "Get all labels",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
580,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"resource": "label",
|
||||
"returnAll": true
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "uBcIMfsTtKjexw7I",
|
||||
"name": "Gmail (workfloowstutorial@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "7ae2dd15-472d-4a4b-b036-f80ebd7e3c28",
|
||||
"name": "Split out assigned labels",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
580,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "labels"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "744c7afa-75b1-4b3b-8ccb-e2106c01f387",
|
||||
"name": "Merge corresponding labels",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
860,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"mergeByFields": {
|
||||
"values": [
|
||||
{
|
||||
"field1": "name",
|
||||
"field2": "labels"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputDataFrom": "input1"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "e47424dc-f43e-41a9-b1e5-ab3e08cbf395",
|
||||
"name": "Aggregate label IDs",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1120,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "label_ids",
|
||||
"fieldToAggregate": "id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "22ba8297-8efc-463e-8ae0-385fd94a205f",
|
||||
"name": "Add labels to message",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
1340,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"labelIds": "={{ $json.label_ids }}",
|
||||
"messageId": "={{ $('Gmail trigger').item.json[\"id\"] }}",
|
||||
"operation": "addLabels"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "uBcIMfsTtKjexw7I",
|
||||
"name": "Gmail (workfloowstutorial@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "7ebb1aad-00ad-43fa-9e07-e5f324864a74",
|
||||
"name": "Assign labels for message",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
-80,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "={{ $json.text }}",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "Your task is to categorize the message according to the following labels.\n\nPartnership - email about sponsored content, cooperation etc.\nInquiry - email about products, services.\nNotification - email that doesn't require response. \n\nOne email can have more than one label. Return only label names in JSON format, nothing else. Do not make things up. "
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "2f82db6a-422c-4697-a629-cc782d88209d",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1100,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 420.4803040774015,
|
||||
"height": 240.57943708322733,
|
||||
"content": "## Add AI labels to Gmail messages\nWith this workflow you can automatically set labels for your Gmail message according to its content. \n\nIn this workflow available are 3 labels: \"Partnership\", \"Inquiry\" and \"Notification\". Feel free to adjust labels according to your needs. \n\n**Please remember to set label names both in your Gmail account and workflow.**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4a10fb2b-aebb-4735-bbdb-7f07f1136d95",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1100,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"width": 421.0932411886662,
|
||||
"height": 257.42916378714597,
|
||||
"content": "## \u26a0\ufe0f Note\n\n1. Complete video guide for this workflow is available [on my YouTube](https://youtu.be/a8Dhj3Zh9vQ). \n2. Remember to add your credentials and configure nodes (covered in the video guide).\n3. If you like this workflow, please subscribe to [my YouTube channel](https://www.youtube.com/@workfloows) and/or [my newsletter](https://workfloows.com/).\n\n**Thank you for your support!**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "76e62351-d502-4377-9df2-fe92df00fe03",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-660,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"width": 238.4602598584674,
|
||||
"height": 348.5873725349161,
|
||||
"content": "### Gmail Trigger\nReceive data from Gmail about new incoming message. \n\n\u26a0\ufe0f Set polling interval according to your needs."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c10702db-211f-4638-bcf0-fbbe18251cb7",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
60,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"width": 241.53974014153226,
|
||||
"height": 319.3323098457962,
|
||||
"content": "###\n\n\n\n\n\n\n\n\n\n\n### JSON schema\nEdit JSON schema and label names according to your needs.\n\n\u26a0\ufe0f **Label names in system prompt and JSON schema should be the same.**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cb6e3573-3d4d-4313-a97e-86a017438399",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
800,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"width": 226.14233872620645,
|
||||
"height": 347.0476323933831,
|
||||
"content": "### Merge labels\nCombine labels retrieved from Gmail account and assigned by AI together."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8cfb4341-98e6-4944-b26c-15e39184f468",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1060,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"width": 452.48413953150185,
|
||||
"height": 347.0476323933831,
|
||||
"content": "### Aggregarte labels and add to message\nCreate array of label IDs and add to the desired email message in Gmail."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bb9766e8-0b72-47f8-9a8e-0b291609e814",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-400,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"width": 238.4602598584674,
|
||||
"height": 348.5873725349161,
|
||||
"content": "### Get message content\nBased on Gmail message ID retrieve body content of the email and pass it to AI chain."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "48630cbd-8336-4577-928e-37341f09ef9b",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-140,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"width": 378.57661273793565,
|
||||
"height": 348.5873725349161,
|
||||
"content": "### Assign labels\nLet the AI decide which labels suit the best content of the message.\n\n\u26a0\ufe0f **Remember to edit system prompt** - modify label names and instructions according to your needs."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "60a9d75e-1564-4b1d-b3f2-acc2e3bf2411",
|
||||
"name": "JSON Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
140,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"jsonSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"labels\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"Inquiry\", \"Partnership\", \"Notification\"]\n }\n }\n },\n \"required\": [\"labels\"]\n}\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2bdf3fed-8a7f-411a-bad4-266bfea5cede",
|
||||
"name": "OpenAI Chat",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
-120,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4-turbo-preview",
|
||||
"options": {
|
||||
"temperature": 0,
|
||||
"responseFormat": "json_object"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "jazew1WAaSRrjcHp",
|
||||
"name": "OpenAI (workfloows@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"connections": {
|
||||
"JSON Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "Assign labels for message",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Assign labels for message",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Gmail trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get message content",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get all labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge corresponding labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set label values": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get all labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Split out assigned labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate label IDs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add labels to message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get message content": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Assign labels for message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Assign labels for message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set label values",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split out assigned labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge corresponding labels",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge corresponding labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate label IDs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "087ae6e2-b333-4a30-9010-c78050203961",
|
||||
"name": "OpenAI Assistant",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAiAssistant",
|
||||
"position": [
|
||||
1340,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=## Our Previous Conversation:\n{{ $json[\"messages\"].map(m => `\nHuman: ${m.human}\nAI Assistant: ${m.ai}\n`) }}\n## Current message:\n{{ $('Chat Trigger').item.json.chatInput }}",
|
||||
"options": {},
|
||||
"assistantId": "asst_HDSAnzsp4WqY4UC1iI9auH5z"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "VQtv7frm7eLiEDnd",
|
||||
"name": "OpenAi account 7"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3793b10a-ebb7-42ec-8b9b-7fa3a353d9a3",
|
||||
"name": "Calculator",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
|
||||
"position": [
|
||||
1500,
|
||||
640
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7bee2882-bb9e-402e-ba42-9b1ed0e1264b",
|
||||
"name": "Chat Memory Manager",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryManager",
|
||||
"position": [
|
||||
760,
|
||||
460
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "5c66e482-819e-47e7-90be-779e92364e2a",
|
||||
"name": "Chat Memory Manager1",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryManager",
|
||||
"position": [
|
||||
1720,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"type": "user",
|
||||
"message": "={{ $('Chat Trigger').item.json.chatInput }}"
|
||||
},
|
||||
{
|
||||
"type": "ai",
|
||||
"message": "={{ $json.output }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "b96bf629-bd21-4528-8988-e63c5af89fd7",
|
||||
"name": "Aggregate",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1140,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"destinationFieldName": "messages"
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "95001be1-f046-47e3-a58c-25bff170ba06",
|
||||
"name": "Edit Fields",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2320,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "output",
|
||||
"stringValue": "={{ $('OpenAI Assistant').item.json.output }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "4ea04793-c7fb-4b81-abf7-49590aa76ca7",
|
||||
"name": "Limit",
|
||||
"type": "n8n-nodes-base.limit",
|
||||
"position": [
|
||||
2100,
|
||||
460
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "16921f74-d420-445a-9e09-19a6116a3267",
|
||||
"name": "Chat Trigger",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
460,
|
||||
460
|
||||
],
|
||||
"webhookId": "1f83e8ac-d465-454a-8327-cef7f0149cb1",
|
||||
"parameters": {
|
||||
"public": true,
|
||||
"options": {
|
||||
"loadPreviousSession": "memory"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c0826494-779a-4c2d-93c9-746150ac9482",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
740,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 514.8706020514577,
|
||||
"height": 196.64941360686112,
|
||||
"content": "Read contents of the chat from memory"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4ce4594d-070a-4985-9c5d-fcd4ebc4a627",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1320,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 298.02823821086326,
|
||||
"height": 196.64941360686112,
|
||||
"content": "Call the assistant, passing in the previous chat messages"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "49885b3b-de77-4c02-a35e-d188fee38831",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1700,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 298.02823821086326,
|
||||
"height": 196.64941360686112,
|
||||
"content": "Add the latest chat messages to the memory"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f45e8589-d61b-440a-ae89-31ded2738ef7",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2080,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 356.0564764217267,
|
||||
"height": 196.64941360686112,
|
||||
"content": "Return the model output"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3b72a676-aaa2-472a-b055-1fed03f52101",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
360,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"height": 300.48941882630095,
|
||||
"content": "## Try me out\n1. In the OpenAI Assistant node, make sure your OpenAI credentials are set and choose an assistant to use (you'll need to create one if you don't have one already)\n2. Click the 'Chat' button below\n\n - In the first message, tell the AI what your name is\n - In a second message, ask the AI what your name is"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a2250328-e4ce-4ac6-b4fe-658ab173bc28",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
1280,
|
||||
880
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "={{ $('Chat Trigger').item.json.sessionId }}123",
|
||||
"contextWindowLength": 20
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Limit": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI Assistant",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Calculator": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI Assistant",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Chat Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Chat Memory Manager",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Assistant": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Chat Memory Manager1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Chat Memory Manager": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Chat Memory Manager1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Limit",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "Chat Trigger",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Chat Memory Manager",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Chat Memory Manager1",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,640 @@
|
||||
{
|
||||
"name": "DSP Agent",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"message"
|
||||
],
|
||||
"additionalFields": {
|
||||
"download": false
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.telegramTrigger",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
-80,
|
||||
20
|
||||
],
|
||||
"id": "44c8327c-2317-4661-871c-e83f0e0c99dc",
|
||||
"name": "Telegram Trigger",
|
||||
"webhookId": "ece1b7c8-0758-4c1f-8db2-6a14ba1ed182",
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "jo0nQp1JkF7jiljY",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict",
|
||||
"version": 2
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.message.text }}",
|
||||
"rightValue": "",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "exists",
|
||||
"singleValue": true
|
||||
},
|
||||
"id": "b8cc5586-5c76-4295-b8ba-1cecfa47cc5d"
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"renameOutput": true,
|
||||
"outputKey": "text"
|
||||
},
|
||||
{
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict",
|
||||
"version": 2
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "66856d79-632e-4e2d-9e54-6e28df629aeb",
|
||||
"leftValue": "={{ $json.message.voice.file_id }}",
|
||||
"rightValue": "",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "exists",
|
||||
"singleValue": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"renameOutput": true,
|
||||
"outputKey": "voice"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"typeVersion": 3.2,
|
||||
"position": [
|
||||
200,
|
||||
-320
|
||||
],
|
||||
"id": "7754451c-5859-4667-bfd4-34d5c0f9fe71",
|
||||
"name": "Switch",
|
||||
"retryOnFail": false,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "4e2b9056-34d7-4867-8f1e-4265fe80bb8c",
|
||||
"name": "text",
|
||||
"value": "={{ $('Telegram Trigger').item.json.message.text }}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [
|
||||
520,
|
||||
-480
|
||||
],
|
||||
"id": "8ce621b6-8546-4454-b658-675130342d9c",
|
||||
"name": "Edit Fields"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "file",
|
||||
"fileId": "={{ $json.message.voice.file_id }}"
|
||||
},
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
420,
|
||||
-220
|
||||
],
|
||||
"id": "e3bfc970-b16b-4a78-8864-19c476274b26",
|
||||
"name": "Telegram",
|
||||
"webhookId": "21933f09-43da-413d-ab94-a6af068c35b6",
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "XyQMIzmMm1P4BOPV",
|
||||
"name": "Telegram account 2"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "audio",
|
||||
"operation": "transcribe",
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"typeVersion": 1.8,
|
||||
"position": [
|
||||
560,
|
||||
-220
|
||||
],
|
||||
"id": "6473e7bd-6abf-4c49-adaa-68cb78484824",
|
||||
"name": "OpenAI",
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "hdG9YDSe5xnemDwc",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"promptType": "define",
|
||||
"text": "={{ $json.text }}",
|
||||
"options": {
|
||||
"systemMessage": "=\n**Current time and date:** {{$now}} \n\nHey there! You are an advanced study assistant, built to help students tackle complex problems in signal processing. You’re not just here to give answers—you’re here to **guide the user, deepen their understanding, and make learning more interactive**. \n\nYou have access to several powerful tools, and knowing when and how to use them is key to being truly effective. Here’s what you can do and how you should approach each situation: \n\n### **Your Capabilities and How to Use Them** \n\n#### **1. Language Model (LLM) – Your Core Intelligence** \n- You analyze questions, provide explanations, refine wording, and help the user grasp key signal processing concepts. \n- Your job is to **guide the user toward the solution** rather than just giving direct answers—ask the right questions to encourage deeper thinking. \n\n#### **2. Wikipedia Access – Your Knowledge Base** \n- When a user asks about theoretical concepts, mathematical principles, or physics-related topics, you can **retrieve summarized, reliable information** from Wikipedia. \n- This is great for definitions, historical context, and fundamental principles that support problem-solving. \n\n#### **3. Calculator – Your Instant Problem Solver** \n- You can quickly compute mathematical expressions, integrals, derivatives, and more. \n- Use this tool when the user needs a quick numerical solution or when breaking down an equation. \n\n#### **4. Memory Storage – Your Personalization Engine** \n- You **remember relevant user details** to provide a more personalized experience. \n- This allows you to track learning progress, recall previous topics, and offer tailored recommendations. \n\n#### **5. (Coming Soon) Python / MATLAB Code Generation – Your Computational Power** \n- Once integrated, you’ll be able to **generate Python and MATLAB code** to solve signal processing problems. \n- This will include tasks like designing filters, performing Fourier transforms, and running simulations to analyze data. \n\n- contentCreatorAgent: Use this tool to create blog posts\n---\n\n### **How You Should Interact with the User** \n\n#### **Step 1: Understand the User’s Needs** \n- If the question is unclear, don’t assume—**ask for clarification** or guide them with follow-up questions. \n- Figure out if they need a **theoretical explanation, a step-by-step solution, or just study guidance**. \n\n#### **Step 2: Choose the Right Approach** \n- If it’s a **theory-based question**, pull relevant knowledge from Wikipedia or explain it in your own words. \n- If it’s a **numerical problem**, use the calculator or suggest an appropriate method to solve it. \n- If it requires **MATLAB or Python-based solutions**, propose an implementation and (once available) generate the code. \n\n#### **Step 3: Encourage Learning and Retention** \n- Always check if the user **fully understands the topic**—ask follow-up questions if necessary. \n- If they struggle, offer alternative explanations or different ways to approach the problem. \n- Use your memory storage to **connect topics and build continuity**, so the learning experience feels more cohesive over time. \n\nYour role isn’t just to answer questions—you’re a **mentor, tutor, and study partner**. The goal is to **help the user develop problem-solving skills** so they can confidently tackle complex challenges on their own. \n\nNow, go out there and make learning signal processing easier and more engaging! "
|
||||
}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"typeVersion": 1.8,
|
||||
"position": [
|
||||
1040,
|
||||
0
|
||||
],
|
||||
"id": "e7b1d605-ef8e-4d3f-898a-9f947d445630",
|
||||
"name": "AI Agent"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"modelName": "models/gemini-1.5-flash-001",
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
740,
|
||||
440
|
||||
],
|
||||
"id": "6ff240ec-b6f6-4775-966f-09191e8692f6",
|
||||
"name": "Google Gemini Chat Model",
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "Pw2Xdm6s2G3GQ4kf",
|
||||
"name": "Google Gemini(PaLM) Api account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
|
||||
"text": "={{ $json.output }}",
|
||||
"additionalFields": {
|
||||
"appendAttribution": false
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
1400,
|
||||
0
|
||||
],
|
||||
"id": "aa0e7fcf-c816-4b8c-a777-26206a934608",
|
||||
"name": "Telegram1",
|
||||
"webhookId": "e1966a9e-b402-4d56-92ff-7042f181ed35",
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "XyQMIzmMm1P4BOPV",
|
||||
"name": "Telegram account 2"
|
||||
}
|
||||
},
|
||||
"onError": "continueRegularOutput"
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
1360,
|
||||
260
|
||||
],
|
||||
"id": "a634f8e6-adb4-4bcf-a9d3-770e4ed61374",
|
||||
"name": "Calculator"
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
1480,
|
||||
260
|
||||
],
|
||||
"id": "3ad47acf-5188-4129-b451-3bb066dd103e",
|
||||
"name": "Wikipedia"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "search",
|
||||
"base": {
|
||||
"__rl": true,
|
||||
"value": "appoBzMsCIm3Bno0X",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Agent memory",
|
||||
"cachedResultUrl": "https://airtable.com/appoBzMsCIm3Bno0X"
|
||||
},
|
||||
"table": {
|
||||
"__rl": true,
|
||||
"value": "tblb5AH2UtMVj3HLZ",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Memory",
|
||||
"cachedResultUrl": "https://airtable.com/appoBzMsCIm3Bno0X/tblb5AH2UtMVj3HLZ"
|
||||
},
|
||||
"returnAll": false,
|
||||
"limit": 50,
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.airtable",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
160,
|
||||
180
|
||||
],
|
||||
"id": "c032dabb-f14b-4656-8bc4-a60315f59436",
|
||||
"name": "Airtable",
|
||||
"credentials": {
|
||||
"airtableTokenApi": {
|
||||
"id": "halRA2KiS4b7O1X0",
|
||||
"name": "Airtable Personal Access Token account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"fieldToAggregate": "Memory"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
460,
|
||||
180
|
||||
],
|
||||
"id": "5613ac95-fafb-40e5-a1b9-00daeec32e9e",
|
||||
"name": "Aggregate"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"combineBy": "combineAll",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"typeVersion": 3,
|
||||
"position": [
|
||||
840,
|
||||
0
|
||||
],
|
||||
"id": "1b83f257-539b-40dc-bdf4-fd3a0d83cbcc",
|
||||
"name": "Merge"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"sessionIdType": "customKey",
|
||||
"sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}"
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"typeVersion": 1.3,
|
||||
"position": [
|
||||
1160,
|
||||
200
|
||||
],
|
||||
"id": "677cd8fe-74f4-4a7d-8bab-b54df7b0dc78",
|
||||
"name": "Simple Memory"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"value": "gpt-4o-mini",
|
||||
"mode": "list",
|
||||
"cachedResultName": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
1000,
|
||||
200
|
||||
],
|
||||
"id": "349f4676-0c3a-4432-a541-61835f20d9e6",
|
||||
"name": "OpenAI Chat Model",
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "XYV4P1NXYGCO76nI",
|
||||
"name": "n8n free OpenAI API credits"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "create",
|
||||
"base": {
|
||||
"__rl": true,
|
||||
"value": "appoBzMsCIm3Bno0X",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Agent memory",
|
||||
"cachedResultUrl": "https://airtable.com/appoBzMsCIm3Bno0X"
|
||||
},
|
||||
"table": {
|
||||
"__rl": true,
|
||||
"value": "tblb5AH2UtMVj3HLZ",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Memory",
|
||||
"cachedResultUrl": "https://airtable.com/appoBzMsCIm3Bno0X/tblb5AH2UtMVj3HLZ"
|
||||
},
|
||||
"columns": {
|
||||
"mappingMode": "defineBelow",
|
||||
"value": {
|
||||
"Memory": "={{ $fromAI('add_Memory', `Write a memory about the user for future referance in 140 characters `, 'string') }}"
|
||||
},
|
||||
"matchingColumns": [
|
||||
"id"
|
||||
],
|
||||
"schema": [
|
||||
{
|
||||
"id": "Memory",
|
||||
"displayName": "Memory",
|
||||
"required": false,
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true,
|
||||
"display": true,
|
||||
"type": "string",
|
||||
"readOnly": false,
|
||||
"removed": false
|
||||
}
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.airtableTool",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
1600,
|
||||
220
|
||||
],
|
||||
"id": "0dce63bd-262c-477e-951d-8b598ad74617",
|
||||
"name": "memory_tool",
|
||||
"credentials": {
|
||||
"airtableTokenApi": {
|
||||
"id": "halRA2KiS4b7O1X0",
|
||||
"name": "Airtable Personal Access Token account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"name": "contentCreatorAgent",
|
||||
"description": "call this tool whan you need to create contact,post or blog",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"value": "ma0fuAza3j9sB4PL",
|
||||
"mode": "list",
|
||||
"cachedResultName": "My project — contact creator agent"
|
||||
},
|
||||
"workflowInputs": {
|
||||
"mappingMode": "defineBelow",
|
||||
"value": {},
|
||||
"matchingColumns": [],
|
||||
"schema": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
1800,
|
||||
220
|
||||
],
|
||||
"id": "ac3de286-ccc4-44ae-b3b7-9f169e91253e",
|
||||
"name": "contentCreatorAgent"
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Telegram Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Airtable",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Switch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Switch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Telegram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Telegram": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Edit Fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Gemini Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Telegram1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Calculator": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wikipedia": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Airtable": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simple Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"memory_tool": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"contentCreatorAgent": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": false,
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "0e1fa96d-3ab3-4155-9468-c28936ca427d",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "044779692a3324ef2f6b23bb7a885c96eeeb4570ffe4cda096e1b9cb0126214c"
|
||||
},
|
||||
"id": "WjyQKQIrpF9AO1Zf",
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,667 @@
|
||||
{
|
||||
"name": "Dsp agent",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"message"
|
||||
],
|
||||
"additionalFields": {
|
||||
"download": false
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.telegramTrigger",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
-600,
|
||||
500
|
||||
],
|
||||
"id": "8e952294-ec48-426e-ad2c-775ab295afb7",
|
||||
"name": "Telegram Trigger",
|
||||
"webhookId": "ece1b7c8-0758-4c1f-8db2-6a14ba1ed182",
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "VrV0OZcaiBOi3ejB",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict",
|
||||
"version": 2
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.message.text }}",
|
||||
"rightValue": "",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "exists",
|
||||
"singleValue": true
|
||||
},
|
||||
"id": "b8cc5586-5c76-4295-b8ba-1cecfa47cc5d"
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"renameOutput": true,
|
||||
"outputKey": "text"
|
||||
},
|
||||
{
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict",
|
||||
"version": 2
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "66856d79-632e-4e2d-9e54-6e28df629aeb",
|
||||
"leftValue": "={{ $json.message.voice.file_id }}",
|
||||
"rightValue": "",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "exists",
|
||||
"singleValue": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"renameOutput": true,
|
||||
"outputKey": "voice"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"typeVersion": 3.2,
|
||||
"position": [
|
||||
-320,
|
||||
160
|
||||
],
|
||||
"id": "faef9906-72b5-47b3-8707-4c34c81c9096",
|
||||
"name": "Switch",
|
||||
"retryOnFail": false,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "4e2b9056-34d7-4867-8f1e-4265fe80bb8c",
|
||||
"name": "text",
|
||||
"value": "={{ $('Telegram Trigger').item.json.message.text }}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"id": "5a51d584-0484-4757-903b-e772a634f94e",
|
||||
"name": "Edit Fields"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "file",
|
||||
"fileId": "={{ $json.message.voice.file_id }}"
|
||||
},
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
-100,
|
||||
260
|
||||
],
|
||||
"id": "627c1d4b-a495-4a2f-8a07-e3699a71b671",
|
||||
"name": "Telegram",
|
||||
"webhookId": "21933f09-43da-413d-ab94-a6af068c35b6",
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "VrV0OZcaiBOi3ejB",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "audio",
|
||||
"operation": "transcribe",
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"typeVersion": 1.8,
|
||||
"position": [
|
||||
40,
|
||||
260
|
||||
],
|
||||
"id": "10edf485-e6bc-453a-b2ff-cc061ed73adc",
|
||||
"name": "OpenAI",
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "IOLYY7gLnrluESNv",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"promptType": "define",
|
||||
"text": "={{ $json.text }}",
|
||||
"options": {
|
||||
"systemMessage": "=\n**Current time and date:** {{$now}} \n\nHey there! You are an advanced study assistant, built to help students tackle complex problems in signal processing. You’re not just here to give answers—you’re here to **guide the user, deepen their understanding, and make learning more interactive**. \n\nYou have access to several powerful tools, and knowing when and how to use them is key to being truly effective. Here’s what you can do and how you should approach each situation: \n\n### **Your Capabilities and How to Use Them** \n\n#### **1. Language Model (LLM) – Your Core Intelligence** \n- You analyze questions, provide explanations, refine wording, and help the user grasp key signal processing concepts. \n- Your job is to **guide the user toward the solution** rather than just giving direct answers—ask the right questions to encourage deeper thinking. \n\n#### **2. Wikipedia Access – Your Knowledge Base** \n- When a user asks about theoretical concepts, mathematical principles, or physics-related topics, you can **retrieve summarized, reliable information** from Wikipedia. \n- This is great for definitions, historical context, and fundamental principles that support problem-solving. \n\n#### **3. Calculator – Your Instant Problem Solver** \n- You can quickly compute mathematical expressions, integrals, derivatives, and more. \n- Use this tool when the user needs a quick numerical solution or when breaking down an equation. \n\n#### **4. Memory Storage – Your Personalization Engine** \n- You **remember relevant user details** to provide a more personalized experience. \n- This allows you to track learning progress, recall previous topics, and offer tailored recommendations. \n\n#### **5. (Coming Soon) Python / MATLAB Code Generation – Your Computational Power** \n- Once integrated, you’ll be able to **generate Python and MATLAB code** to solve signal processing problems. \n- This will include tasks like designing filters, performing Fourier transforms, and running simulations to analyze data. \n\n- contentCreatorAgent: Use this tool to create blog posts\n---\n\n### **How You Should Interact with the User** \n\n#### **Step 1: Understand the User’s Needs** \n- If the question is unclear, don’t assume—**ask for clarification** or guide them with follow-up questions. \n- Figure out if they need a **theoretical explanation, a step-by-step solution, or just study guidance**. \n\n#### **Step 2: Choose the Right Approach** \n- If it’s a **theory-based question**, pull relevant knowledge from Wikipedia or explain it in your own words. \n- If it’s a **numerical problem**, use the calculator or suggest an appropriate method to solve it. \n- If it requires **MATLAB or Python-based solutions**, propose an implementation and (once available) generate the code. \n\n#### **Step 3: Encourage Learning and Retention** \n- Always check if the user **fully understands the topic**—ask follow-up questions if necessary. \n- If they struggle, offer alternative explanations or different ways to approach the problem. \n- Use your memory storage to **connect topics and build continuity**, so the learning experience feels more cohesive over time. \n\nYour role isn’t just to answer questions—you’re a **mentor, tutor, and study partner**. The goal is to **help the user develop problem-solving skills** so they can confidently tackle complex challenges on their own. \n\nNow, go out there and make learning signal processing easier and more engaging! "
|
||||
}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"typeVersion": 1.8,
|
||||
"position": [
|
||||
520,
|
||||
480
|
||||
],
|
||||
"id": "b05d3c86-eca0-4a69-81ea-4b3f078d4f18",
|
||||
"name": "AI Agent"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"modelName": "models/gemini-1.5-flash-001",
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
220,
|
||||
920
|
||||
],
|
||||
"id": "921b72db-200a-4a47-bd2d-135c4f8450c8",
|
||||
"name": "Google Gemini Chat Model"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
|
||||
"text": "={{ $json.output }}",
|
||||
"additionalFields": {
|
||||
"appendAttribution": false
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
880,
|
||||
480
|
||||
],
|
||||
"id": "32277fd6-3d66-4bb9-a1c6-07d23d0d50b3",
|
||||
"name": "Telegram1",
|
||||
"webhookId": "e1966a9e-b402-4d56-92ff-7042f181ed35",
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "VrV0OZcaiBOi3ejB",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"onError": "continueRegularOutput"
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
380,
|
||||
900
|
||||
],
|
||||
"id": "3276e9b7-358f-4b9a-8537-918ce7c9bc54",
|
||||
"name": "Calculator"
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
520,
|
||||
880
|
||||
],
|
||||
"id": "76c41081-f01d-43bc-8895-3af69cc8ceea",
|
||||
"name": "Wikipedia"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "search",
|
||||
"base": {
|
||||
"__rl": true,
|
||||
"value": "appoBzMsCIm3Bno0X",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Agent memory",
|
||||
"cachedResultUrl": "https://airtable.com/appoBzMsCIm3Bno0X"
|
||||
},
|
||||
"table": {
|
||||
"__rl": true,
|
||||
"value": "tblb5AH2UtMVj3HLZ",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Memory",
|
||||
"cachedResultUrl": "https://airtable.com/appoBzMsCIm3Bno0X/tblb5AH2UtMVj3HLZ"
|
||||
},
|
||||
"returnAll": false,
|
||||
"limit": 50,
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.airtable",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
-360,
|
||||
660
|
||||
],
|
||||
"id": "38834d64-56fb-4170-9885-8d5e5c94a74f",
|
||||
"name": "Airtable",
|
||||
"credentials": {
|
||||
"airtableTokenApi": {
|
||||
"id": "eWfDvgRAeJ0q7Unh",
|
||||
"name": "Airtable Personal Access Token account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"fieldToAggregate": "Memory"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-60,
|
||||
660
|
||||
],
|
||||
"id": "f5f3fbf7-26ce-4754-bcc1-1d046b1a6e0a",
|
||||
"name": "Aggregate"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"combineBy": "combineAll",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"typeVersion": 3,
|
||||
"position": [
|
||||
320,
|
||||
480
|
||||
],
|
||||
"id": "390ccee0-48c6-434d-ad51-53148540ddbe",
|
||||
"name": "Merge"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"sessionIdType": "customKey",
|
||||
"sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}"
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"typeVersion": 1.3,
|
||||
"position": [
|
||||
400,
|
||||
680
|
||||
],
|
||||
"id": "99b213f3-73c9-4649-b5d6-a7aa67886daf",
|
||||
"name": "Simple Memory"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"value": "gpt-4o-mini",
|
||||
"mode": "list",
|
||||
"cachedResultName": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
220,
|
||||
680
|
||||
],
|
||||
"id": "a3bf96ef-ad73-44f2-a867-42ba149082ed",
|
||||
"name": "OpenAI Chat Model",
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "IOLYY7gLnrluESNv",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "create",
|
||||
"base": {
|
||||
"__rl": true,
|
||||
"value": "appoBzMsCIm3Bno0X",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Agent memory",
|
||||
"cachedResultUrl": "https://airtable.com/appoBzMsCIm3Bno0X"
|
||||
},
|
||||
"table": {
|
||||
"__rl": true,
|
||||
"value": "tblb5AH2UtMVj3HLZ",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Memory",
|
||||
"cachedResultUrl": "https://airtable.com/appoBzMsCIm3Bno0X/tblb5AH2UtMVj3HLZ"
|
||||
},
|
||||
"columns": {
|
||||
"mappingMode": "defineBelow",
|
||||
"value": {
|
||||
"Memory": "={{ $fromAI('add_Memory', `Write a memory about the user for future referance in 140 characters `, 'string') }}"
|
||||
},
|
||||
"matchingColumns": [
|
||||
"id"
|
||||
],
|
||||
"schema": [
|
||||
{
|
||||
"id": "Memory",
|
||||
"displayName": "Memory",
|
||||
"required": false,
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true,
|
||||
"display": true,
|
||||
"type": "string",
|
||||
"readOnly": false,
|
||||
"removed": false
|
||||
}
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.airtableTool",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
660,
|
||||
880
|
||||
],
|
||||
"id": "44bf3697-1689-4f8a-8363-ce547d614cae",
|
||||
"name": "memory_tool",
|
||||
"credentials": {
|
||||
"airtableTokenApi": {
|
||||
"id": "eWfDvgRAeJ0q7Unh",
|
||||
"name": "Airtable Personal Access Token account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"name": "contentCreatorAgent",
|
||||
"description": "call this tool whan you need to create contact,post or blog",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"value": "ma0fuAza3j9sB4PL",
|
||||
"mode": "list",
|
||||
"cachedResultName": "My project — contact creator agent"
|
||||
},
|
||||
"workflowInputs": {
|
||||
"mappingMode": "defineBelow",
|
||||
"value": {},
|
||||
"matchingColumns": [],
|
||||
"schema": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
820,
|
||||
880
|
||||
],
|
||||
"id": "2fc2f3f7-c8ba-4fb8-86be-ad72938df0b7",
|
||||
"name": "contentCreatorAgent"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"name": "EmailAgent",
|
||||
"description": "use this tool to send,get and lable emails",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"value": "ANJ05aXmXcKpfhyk",
|
||||
"mode": "list",
|
||||
"cachedResultName": "Email agent"
|
||||
},
|
||||
"workflowInputs": {
|
||||
"mappingMode": "defineBelow",
|
||||
"value": {},
|
||||
"matchingColumns": [],
|
||||
"schema": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
1000,
|
||||
880
|
||||
],
|
||||
"id": "833dce37-a852-4341-92f4-1ae3d41a0914",
|
||||
"name": "Email Agent"
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Telegram Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Airtable",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Switch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Switch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Telegram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Telegram": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Edit Fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Telegram1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Calculator": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wikipedia": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Airtable": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simple Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"memory_tool": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"contentCreatorAgent": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Agent": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": false,
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "bfadace7-e00a-4849-97b9-d8e13fb0c0b2",
|
||||
"meta": {
|
||||
"instanceId": "94de0b0234836a6581f98085078a07c06e3d6f8dac7b83621b73e6356c09de9b"
|
||||
},
|
||||
"id": "Ix2EKF85AgkBkvOG",
|
||||
"tags": []
|
||||
}
|
||||
311
workflows/Aggregate/1430_Aggregate_Schedule_Send_Scheduled.json
Normal file
311
workflows/Aggregate/1430_Aggregate_Schedule_Send_Scheduled.json
Normal file
@@ -0,0 +1,311 @@
|
||||
{
|
||||
"id": "M8oLW9Qd59zNJzg2",
|
||||
"meta": {
|
||||
"instanceId": "1abe0e4c2be794795d12bf72aa530a426a6f87aabad209ed6619bcaf0f666fb0",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Email Summary Agent",
|
||||
"tags": [
|
||||
{
|
||||
"id": "G1v7CnFpOHsReVhM",
|
||||
"name": "Product",
|
||||
"createdAt": "2025-01-13T17:04:34.969Z",
|
||||
"updatedAt": "2025-01-13T17:04:34.969Z"
|
||||
},
|
||||
{
|
||||
"id": "RagrXIh5iBDseqvj",
|
||||
"name": "AI",
|
||||
"createdAt": "2025-01-09T09:18:12.756Z",
|
||||
"updatedAt": "2025-01-09T09:18:12.756Z"
|
||||
},
|
||||
{
|
||||
"id": "Yg2lfYteJZAoIeaC",
|
||||
"name": "Building blocks",
|
||||
"createdAt": "2025-01-13T17:05:49.788Z",
|
||||
"updatedAt": "2025-01-13T17:05:49.788Z"
|
||||
},
|
||||
{
|
||||
"id": "ZuS1C3NpE8uBlFq4",
|
||||
"name": "Finance",
|
||||
"createdAt": "2025-01-13T17:05:03.996Z",
|
||||
"updatedAt": "2025-01-13T17:05:03.996Z"
|
||||
},
|
||||
{
|
||||
"id": "aqlZb2qfWiaT4Xr5",
|
||||
"name": "IT Ops",
|
||||
"createdAt": "2025-01-03T12:20:11.917Z",
|
||||
"updatedAt": "2025-01-03T12:20:11.917Z"
|
||||
},
|
||||
{
|
||||
"id": "fX8hRnEv4D8sLSzF",
|
||||
"name": "OpenAI",
|
||||
"createdAt": "2025-01-09T09:18:12.757Z",
|
||||
"updatedAt": "2025-01-09T09:18:12.757Z"
|
||||
},
|
||||
{
|
||||
"id": "j1qBXzFADkR3sHSa",
|
||||
"name": "Marketing",
|
||||
"createdAt": "2025-01-13T17:03:54.468Z",
|
||||
"updatedAt": "2025-01-13T17:03:54.468Z"
|
||||
},
|
||||
{
|
||||
"id": "x3OVvOuZkLx1hYpW",
|
||||
"name": "Support",
|
||||
"createdAt": "2025-01-13T17:05:40.900Z",
|
||||
"updatedAt": "2025-01-13T17:05:40.900Z"
|
||||
},
|
||||
{
|
||||
"id": "xBOhq1kP3lza5ajE",
|
||||
"name": "HR",
|
||||
"createdAt": "2025-01-13T17:04:57.045Z",
|
||||
"updatedAt": "2025-01-13T17:04:57.045Z"
|
||||
},
|
||||
{
|
||||
"id": "yy04JQqCaXepPdSa",
|
||||
"name": "Project Management",
|
||||
"createdAt": "2024-10-30T18:27:57.309Z",
|
||||
"updatedAt": "2024-10-30T18:27:57.309Z"
|
||||
},
|
||||
{
|
||||
"id": "zJaZorWWcGpTp35U",
|
||||
"name": "DevOps",
|
||||
"createdAt": "2025-01-03T12:19:34.273Z",
|
||||
"updatedAt": "2025-01-03T12:19:34.273Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "94c09c05-539b-452e-83b7-0a029bbe6b7f",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-120,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"width": 248.47086922498647,
|
||||
"height": 314.47468983163634,
|
||||
"content": "- Starts the workflow every day at 7 AM.\n- Adjust the time if you want the workflow to run at a different hour."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5e5cbc87-5c01-438b-a1c0-e8468d3ee20b",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
160,
|
||||
-137.04548301590512
|
||||
],
|
||||
"parameters": {
|
||||
"width": 213.36643278764896,
|
||||
"height": 313.40934714314244,
|
||||
"content": "Fetches all emails received in the past 24 hours from the email address"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9a82f5e9-7d0b-430f-9dbb-d8ae0b129dad",
|
||||
"name": "Daily 7AM Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-40,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "dd3e4b10-187b-45ce-b999-f0143e5af134",
|
||||
"name": "Fetch Emails - Past 24 Hours",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
220,
|
||||
0
|
||||
],
|
||||
"webhookId": "20f1d11d-8a69-43f3-9323-33eaf1b3b600",
|
||||
"parameters": {
|
||||
"filters": {
|
||||
"q": "={{ \n (() => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n return `isb.quantana@quantana.in after:${yesterday.getFullYear()}/${(yesterday.getMonth() + 1).toString().padStart(2, '0')}/${yesterday.getDate().toString().padStart(2, '0')}`;\n })()\n}}"
|
||||
},
|
||||
"operation": "getAll",
|
||||
"returnAll": true
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "YFARhQXJAjbwXjSO",
|
||||
"name": "Vishal Gmail"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "4a8fdfd9-93d7-43a2-92b0-88d845f217bf",
|
||||
"name": "Organize Email Data - Morning",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
460,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"include": "specifiedFields",
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"fieldsToInclude": "id, From, To, CC, snippet"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9e2426e8-57ba-4708-b66f-b58bd19eabff",
|
||||
"name": "Summarize Emails with OpenAI - Morning",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
680,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini",
|
||||
"cachedResultName": "GPT-4O-MINI"
|
||||
},
|
||||
"options": {},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"content": "=Go through this email summary and identify all key details mentioned, any specific issues to look at, and action items.\nUse this format to output\n{\n \"summary_of_emails\": [\n \"Point 1\",\n \"Point 2\",\n \"Point 3\"\n ],\n \"actions\": [\n {\n \"name\": \"Name 1\",\n \"action\": \"Action 1\"\n },\n {\n \"name\": \"Name 1\",\n \"action\": \"Action 2\"\n },\n {\n \"name\": \"Name 2\",\n \"action\": \"Action 3\"\n }\n ]\n}\n\nInput Data:\n\n {{ $json.data.toJsonString() }}\n\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsonOutput": true
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "ksU2WMcMqe2lPgRw",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "4aa68ee8-d38f-418a-9f20-6cc76850c638",
|
||||
"name": "Send Summary - Morning",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
1040,
|
||||
0
|
||||
],
|
||||
"webhookId": "83f2aeb9-7b6c-4336-b5ed-8acfcd259850",
|
||||
"parameters": {
|
||||
"sendTo": "team-email@example.com",
|
||||
"message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Email Summary - isbonline@quantana.in</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n margin: 0;\n padding: 0;\n background-color: #f9f9f9;\n color: #333;\n line-height: 1.6;\n }\n .email-container {\n max-width: 600px;\n margin: 20px auto;\n background: #ffffff;\n border: 1px solid #ddd;\n border-radius: 10px;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n }\n .email-header {\n background-color: #0073e6;\n color: #fff;\n padding: 20px;\n text-align: center;\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n }\n .email-header h1 {\n margin: 0;\n font-size: 24px;\n }\n .email-content {\n padding: 20px;\n }\n .section-title {\n font-size: 20px;\n color: #0073e6;\n margin-bottom: 10px;\n }\n ul {\n list-style: none;\n padding: 0;\n }\n ul li {\n margin: 10px 0;\n padding: 10px;\n background: #f4f4f4;\n border-left: 4px solid #0073e6;\n border-radius: 5px;\n }\n .action-item {\n font-weight: bold;\n margin: 5px 0;\n }\n .action-detail {\n margin-left: 10px;\n }\n .email-footer {\n background-color: #0073e6;\n color: #fff;\n text-align: center;\n padding: 10px;\n font-size: 14px;\n border-bottom-left-radius: 10px;\n border-bottom-right-radius: 10px;\n }\n </style>\n</head>\n<body>\n <div class=\"email-container\">\n <div class=\"email-header\">\n <h1>Email Summary</h1>\n </div>\n <div class=\"email-content\">\n <div>\n <h2 class=\"section-title\">Summary of Emails:</h2>\n <ul>\n {{ $json.message.content.summary_of_emails.map(email => `<li>${email}</li>`).join('') }}\n </ul>\n </div>\n <div>\n <h2 class=\"section-title\">Actions:</h2>\n <ul>\n {{ $json.message.content.actions.map(action => `\n <li>\n <span class=\"action-item\">${action.name}:</span>\n <span class=\"action-detail\">${action.action}</span>\n </li>\n `).join('') }}\n </ul>\n </div>\n </div>\n <div class=\"email-footer\">\n <p>Generated by Quantana ESAgent <br /> A Quantana AI Labs Initiative\n </div>\n </div>\n</body>\n</html>",
|
||||
"options": {
|
||||
"ccList": "cc-list@example.com",
|
||||
"appendAttribution": false,
|
||||
"replyToSenderOnly": false
|
||||
},
|
||||
"subject": "=ESAgent - {{ new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }) }}-00:00 to {{ new Date(new Date().setDate(new Date().getDate())).toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }) }}-07:00AM"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "YFARhQXJAjbwXjSO",
|
||||
"name": "Vishal Gmail"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "c7667667-9533-40cb-9c09-914a11560600",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
400,
|
||||
-132.6641804468672
|
||||
],
|
||||
"parameters": {
|
||||
"width": 226.7095107678671,
|
||||
"height": 305.83657700487913,
|
||||
"content": "Organizes the fetched email data, extracting fields like sender, receiver, CC, and a preview snippet."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "43955af4-3a18-44d7-8c8d-cf8051b18bdd",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
980,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"width": 232.8435827211592,
|
||||
"height": 359.7308639651144,
|
||||
"content": "- Sends the summarized email report to recipients with a styled HTML layout.\n- Update the \"sendTo\" and \"ccList\" fields with the email addresses of your recipients.\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"timezone": "Asia/Kolkata",
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "b18912ed-6c1f-4912-b75a-1553f7620917",
|
||||
"connections": {
|
||||
"Daily 7AM Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch Emails - Past 24 Hours",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fetch Emails - Past 24 Hours": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Organize Email Data - Morning",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Organize Email Data - Morning": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Summarize Emails with OpenAI - Morning",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Summarize Emails with OpenAI - Morning": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Summary - Morning",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "f691e434c527bcfc50a22f01094756f14427f055aa0b6917a75441617ecd7fb2"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "a998289c-65da-49ea-ba8a-4b277d9e16f3",
|
||||
"name": "Telegram Trigger",
|
||||
"type": "n8n-nodes-base.telegramTrigger",
|
||||
"position": [
|
||||
1060,
|
||||
640
|
||||
],
|
||||
"webhookId": "2901cde3-b35a-4b0b-a1ba-17a7d9f80125",
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"message",
|
||||
"*"
|
||||
],
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "pbbCqv0hRu9TDmWm",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "7f50072a-5312-4a47-823e-0513cd9d383a",
|
||||
"name": "OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
1380,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "={{ $json.message.text }}",
|
||||
"options": {},
|
||||
"resource": "image"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "p4Qrsjiuev2epBzW",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "a59264d6-c199-4d7b-ade4-1e31f10eb632",
|
||||
"name": "Telegram",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
1580,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"chatId": "={{ $json.data[1].message.from.id }}",
|
||||
"operation": "sendPhoto",
|
||||
"binaryData": true,
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "pbbCqv0hRu9TDmWm",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "e0719c38-75ae-4082-91ba-d68c7cd28339",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1060,
|
||||
1000
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "bee14b74-248b-4e17-9221-378daff965aa",
|
||||
"name": "Aggregate",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1320,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"includeBinaries": true
|
||||
},
|
||||
"aggregate": "aggregateAllItemData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "50293949-3dc0-4b35-a040-a3ad1a9e80d0",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-60,
|
||||
479.3775380651615
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1036.6634532467683,
|
||||
"height": 671.0981521245417,
|
||||
"content": "\n# N8N Workflow: AI-Enhanced Image Processing and Communication\n\n## Description:\nThis n8n workflow integrates artificial intelligence to optimize image processing tasks and streamline communication via Telegram. Each node in the workflow provides specific benefits that contribute to enhancing user engagement and facilitating efficient communication.\n\n## Title:\nAI-Enhanced Image Processing and Communication Workflow with n8n\n\n## Node Names and Benefits:\n\n\n3. Set up the necessary credentials for the Telegram account and OpenAI API.\n4. Configure each node in the workflow to maximize its benefits and optimize user engagement.\n5. Run the workflow to leverage AI-enhanced image processing and communication capabilities for enhanced user interactions.\n6. Monitor the workflow execution for any errors or issues that may arise during processing.\n7. Customize the workflow nodes, parameters, or AI models to align with specific business objectives and user engagement strategies.\n8. Embrace the power of AI-driven image processing and interactive communication on Telegram to elevate user engagement and satisfaction levels.\n\n## Elevate your user engagement strategies with AI-powered image processing and seamless communication on Telegram using n8n!\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "529fb39e-5140-41b2-8454-2a1c45d670d0",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1000,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"width": 276.16526553869744,
|
||||
"height": 296.62433647952383,
|
||||
"content": " **Telegram Trigger Node**:\n - Benefit: Initiates the workflow based on incoming messages from users on Telegram, enabling real-time interaction and communication."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "339bc4ff-bca0-48ee-98ce-bbf7deb3f6fc",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1320,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"width": 238.40710655577766,
|
||||
"height": 316.8446819098802,
|
||||
"content": " **OpenAI Node**:\n - Benefit: Utilizes AI algorithms to analyze text content of messages, generating intelligent responses and enhancing the quality of communication."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "64216b05-5a6e-44f5-8cf1-86487368d892",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1520,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"width": 229.95409290591755,
|
||||
"height": 332.7896020182219,
|
||||
"content": "**Telegram Node**:\n - Benefit: Sends processed data, including images and responses, back to users on Telegram, ensuring seamless communication and user engagement."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c15a57ee-f461-43d0-9232-b6d2728ee058",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1260,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"height": 332.78960201822133,
|
||||
"content": "**Merge Node**:\n - Benefit: Combines and organizes processed data for efficient handling and integration, optimizing the workflow's data management capabilities."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f6f0aaac-426a-4923-9100-a52f53e78dec",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1000,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"height": 326.33042266316727,
|
||||
"content": "**Aggregate Node**:\n - Benefit: Aggregates all item data, including binaries if specified, for comprehensive reporting and analysis, aiding in decision-making and performance evaluation.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c36d8d68-0641-4e6d-92b1-82879d81e2c9",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-80,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"color": 2,
|
||||
"width": 1837.5703604833238,
|
||||
"height": 706.8771853945606,
|
||||
"content": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Telegram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Telegram Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
311
workflows/Aggregate/1544_Aggregate_Schedule_Send_Scheduled.json
Normal file
311
workflows/Aggregate/1544_Aggregate_Schedule_Send_Scheduled.json
Normal file
@@ -0,0 +1,311 @@
|
||||
{
|
||||
"id": "M8oLW9Qd59zNJzg2",
|
||||
"meta": {
|
||||
"instanceId": "1abe0e4c2be794795d12bf72aa530a426a6f87aabad209ed6619bcaf0f666fb0",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Email Summary Agent",
|
||||
"tags": [
|
||||
{
|
||||
"id": "G1v7CnFpOHsReVhM",
|
||||
"name": "Product",
|
||||
"createdAt": "2025-01-13T17:04:34.969Z",
|
||||
"updatedAt": "2025-01-13T17:04:34.969Z"
|
||||
},
|
||||
{
|
||||
"id": "RagrXIh5iBDseqvj",
|
||||
"name": "AI",
|
||||
"createdAt": "2025-01-09T09:18:12.756Z",
|
||||
"updatedAt": "2025-01-09T09:18:12.756Z"
|
||||
},
|
||||
{
|
||||
"id": "Yg2lfYteJZAoIeaC",
|
||||
"name": "Building blocks",
|
||||
"createdAt": "2025-01-13T17:05:49.788Z",
|
||||
"updatedAt": "2025-01-13T17:05:49.788Z"
|
||||
},
|
||||
{
|
||||
"id": "ZuS1C3NpE8uBlFq4",
|
||||
"name": "Finance",
|
||||
"createdAt": "2025-01-13T17:05:03.996Z",
|
||||
"updatedAt": "2025-01-13T17:05:03.996Z"
|
||||
},
|
||||
{
|
||||
"id": "aqlZb2qfWiaT4Xr5",
|
||||
"name": "IT Ops",
|
||||
"createdAt": "2025-01-03T12:20:11.917Z",
|
||||
"updatedAt": "2025-01-03T12:20:11.917Z"
|
||||
},
|
||||
{
|
||||
"id": "fX8hRnEv4D8sLSzF",
|
||||
"name": "OpenAI",
|
||||
"createdAt": "2025-01-09T09:18:12.757Z",
|
||||
"updatedAt": "2025-01-09T09:18:12.757Z"
|
||||
},
|
||||
{
|
||||
"id": "j1qBXzFADkR3sHSa",
|
||||
"name": "Marketing",
|
||||
"createdAt": "2025-01-13T17:03:54.468Z",
|
||||
"updatedAt": "2025-01-13T17:03:54.468Z"
|
||||
},
|
||||
{
|
||||
"id": "x3OVvOuZkLx1hYpW",
|
||||
"name": "Support",
|
||||
"createdAt": "2025-01-13T17:05:40.900Z",
|
||||
"updatedAt": "2025-01-13T17:05:40.900Z"
|
||||
},
|
||||
{
|
||||
"id": "xBOhq1kP3lza5ajE",
|
||||
"name": "HR",
|
||||
"createdAt": "2025-01-13T17:04:57.045Z",
|
||||
"updatedAt": "2025-01-13T17:04:57.045Z"
|
||||
},
|
||||
{
|
||||
"id": "yy04JQqCaXepPdSa",
|
||||
"name": "Project Management",
|
||||
"createdAt": "2024-10-30T18:27:57.309Z",
|
||||
"updatedAt": "2024-10-30T18:27:57.309Z"
|
||||
},
|
||||
{
|
||||
"id": "zJaZorWWcGpTp35U",
|
||||
"name": "DevOps",
|
||||
"createdAt": "2025-01-03T12:19:34.273Z",
|
||||
"updatedAt": "2025-01-03T12:19:34.273Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "94c09c05-539b-452e-83b7-0a029bbe6b7f",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-120,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"width": 248.47086922498647,
|
||||
"height": 314.47468983163634,
|
||||
"content": "- Starts the workflow every day at 7 AM.\n- Adjust the time if you want the workflow to run at a different hour."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5e5cbc87-5c01-438b-a1c0-e8468d3ee20b",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
160,
|
||||
-137.04548301590512
|
||||
],
|
||||
"parameters": {
|
||||
"width": 213.36643278764896,
|
||||
"height": 313.40934714314244,
|
||||
"content": "Fetches all emails received in the past 24 hours from the email address"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9a82f5e9-7d0b-430f-9dbb-d8ae0b129dad",
|
||||
"name": "Daily 7AM Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-40,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "dd3e4b10-187b-45ce-b999-f0143e5af134",
|
||||
"name": "Fetch Emails - Past 24 Hours",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
220,
|
||||
0
|
||||
],
|
||||
"webhookId": "20f1d11d-8a69-43f3-9323-33eaf1b3b600",
|
||||
"parameters": {
|
||||
"filters": {
|
||||
"q": "={{ \n (() => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n return `isb.quantana@quantana.in after:${yesterday.getFullYear()}/${(yesterday.getMonth() + 1).toString().padStart(2, '0')}/${yesterday.getDate().toString().padStart(2, '0')}`;\n })()\n}}"
|
||||
},
|
||||
"operation": "getAll",
|
||||
"returnAll": true
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "YFARhQXJAjbwXjSO",
|
||||
"name": "Vishal Gmail"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "4a8fdfd9-93d7-43a2-92b0-88d845f217bf",
|
||||
"name": "Organize Email Data - Morning",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
460,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"include": "specifiedFields",
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"fieldsToInclude": "id, From, To, CC, snippet"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9e2426e8-57ba-4708-b66f-b58bd19eabff",
|
||||
"name": "Summarize Emails with OpenAI - Morning",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
680,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini",
|
||||
"cachedResultName": "GPT-4O-MINI"
|
||||
},
|
||||
"options": {},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"content": "=Go through this email summary and identify all key details mentioned, any specific issues to look at, and action items.\nUse this format to output\n{\n \"summary_of_emails\": [\n \"Point 1\",\n \"Point 2\",\n \"Point 3\"\n ],\n \"actions\": [\n {\n \"name\": \"Name 1\",\n \"action\": \"Action 1\"\n },\n {\n \"name\": \"Name 1\",\n \"action\": \"Action 2\"\n },\n {\n \"name\": \"Name 2\",\n \"action\": \"Action 3\"\n }\n ]\n}\n\nInput Data:\n\n {{ $json.data.toJsonString() }}\n\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsonOutput": true
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "ksU2WMcMqe2lPgRw",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "4aa68ee8-d38f-418a-9f20-6cc76850c638",
|
||||
"name": "Send Summary - Morning",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
1040,
|
||||
0
|
||||
],
|
||||
"webhookId": "83f2aeb9-7b6c-4336-b5ed-8acfcd259850",
|
||||
"parameters": {
|
||||
"sendTo": "team-email@example.com",
|
||||
"message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Email Summary - isbonline@quantana.in</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n margin: 0;\n padding: 0;\n background-color: #f9f9f9;\n color: #333;\n line-height: 1.6;\n }\n .email-container {\n max-width: 600px;\n margin: 20px auto;\n background: #ffffff;\n border: 1px solid #ddd;\n border-radius: 10px;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n }\n .email-header {\n background-color: #0073e6;\n color: #fff;\n padding: 20px;\n text-align: center;\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n }\n .email-header h1 {\n margin: 0;\n font-size: 24px;\n }\n .email-content {\n padding: 20px;\n }\n .section-title {\n font-size: 20px;\n color: #0073e6;\n margin-bottom: 10px;\n }\n ul {\n list-style: none;\n padding: 0;\n }\n ul li {\n margin: 10px 0;\n padding: 10px;\n background: #f4f4f4;\n border-left: 4px solid #0073e6;\n border-radius: 5px;\n }\n .action-item {\n font-weight: bold;\n margin: 5px 0;\n }\n .action-detail {\n margin-left: 10px;\n }\n .email-footer {\n background-color: #0073e6;\n color: #fff;\n text-align: center;\n padding: 10px;\n font-size: 14px;\n border-bottom-left-radius: 10px;\n border-bottom-right-radius: 10px;\n }\n </style>\n</head>\n<body>\n <div class=\"email-container\">\n <div class=\"email-header\">\n <h1>Email Summary</h1>\n </div>\n <div class=\"email-content\">\n <div>\n <h2 class=\"section-title\">Summary of Emails:</h2>\n <ul>\n {{ $json.message.content.summary_of_emails.map(email => `<li>${email}</li>`).join('') }}\n </ul>\n </div>\n <div>\n <h2 class=\"section-title\">Actions:</h2>\n <ul>\n {{ $json.message.content.actions.map(action => `\n <li>\n <span class=\"action-item\">${action.name}:</span>\n <span class=\"action-detail\">${action.action}</span>\n </li>\n `).join('') }}\n </ul>\n </div>\n </div>\n <div class=\"email-footer\">\n <p>Generated by Quantana ESAgent <br /> A Quantana AI Labs Initiative\n </div>\n </div>\n</body>\n</html>",
|
||||
"options": {
|
||||
"ccList": "cc-list@example.com",
|
||||
"appendAttribution": false,
|
||||
"replyToSenderOnly": false
|
||||
},
|
||||
"subject": "=ESAgent - {{ new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }) }}-00:00 to {{ new Date(new Date().setDate(new Date().getDate())).toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }) }}-07:00AM"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "YFARhQXJAjbwXjSO",
|
||||
"name": "Vishal Gmail"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "c7667667-9533-40cb-9c09-914a11560600",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
400,
|
||||
-132.6641804468672
|
||||
],
|
||||
"parameters": {
|
||||
"width": 226.7095107678671,
|
||||
"height": 305.83657700487913,
|
||||
"content": "Organizes the fetched email data, extracting fields like sender, receiver, CC, and a preview snippet."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "43955af4-3a18-44d7-8c8d-cf8051b18bdd",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
980,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"width": 232.8435827211592,
|
||||
"height": 359.7308639651144,
|
||||
"content": "- Sends the summarized email report to recipients with a styled HTML layout.\n- Update the \"sendTo\" and \"ccList\" fields with the email addresses of your recipients.\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"timezone": "Asia/Kolkata",
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "b18912ed-6c1f-4912-b75a-1553f7620917",
|
||||
"connections": {
|
||||
"Daily 7AM Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch Emails - Past 24 Hours",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fetch Emails - Past 24 Hours": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Organize Email Data - Morning",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Organize Email Data - Morning": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Summarize Emails with OpenAI - Morning",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Summarize Emails with OpenAI - Morning": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Summary - Morning",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user