\nAnswer the following clarification questions to assist the DeepResearcher better under the research topic.\n
\n\nTotal {{ $('Feedback to Items').all().length }} questions.\n
" +}, +"formFields": { +"values": [ +{ +"fieldType": "textarea", +"fieldLabel": "={{ $json[\"output.questions\"] }}", +"placeholder": "=", +"requiredField": true +} +] +} +}, +"typeVersion": 1 +}, +{ +"id": "e07d8c3e-8bcd-4393-9892-f825433ab58d", +"name": "For Each Question...", +"type": "n8n-nodes-base.splitInBatches", +"position": [ +-540, +-460 +], +"parameters": { +"options": {} +}, +"typeVersion": 3 +}, +{ +"id": "e8d26351-52f4-40a6-ba5b-fb6bc816b734", +"name": "DeepResearch Subworkflow", +"type": "n8n-nodes-base.executeWorkflowTrigger", +"position": [ +-1880, +820 +], +"parameters": { +"workflowInputs": { +"values": [ +{ +"name": "requestId", +"type": "any" +}, +{ +"name": "jobType" +}, +{ +"name": "data", +"type": "object" +} +] +} +}, +"typeVersion": 1.1 +}, +{ +"id": "25a8055a-27aa-414f-856b-25a2e2f31974", +"name": "Sticky Note", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-1140, +-680 +], +"parameters": { +"color": 7, +"width": 1000, +"height": 560, +"content": "## 2. Ask Clarifying Questions\n[Read more about form nodes](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/)\n\nTo handle the clarification questions generated by the LLM, I used the same technique found in my \"AI Interviewer\" template ([link](https://n8n.io/workflows/2566-conversational-interviews-with-ai-agents-and-n8n-forms/)).\nThis involves a looping of dynamically generated forms to collect answers from the user." +}, +"typeVersion": 1 +}, +{ +"id": "68398b92-eb35-48bf-885e-540074531cc4", +"name": "Clarifying Questions", +"type": "@n8n/n8n-nodes-langchain.chainLlm", +"position": [ +-1040, +-460 +], +"parameters": { +"text": "=Given the following query from the user, ask some follow up questions to clarify the research direction. Return a maximum of 3 questions, but feel free to return less if the original query is clear:| Technology | Potential Impact |
|---|---|
| 5G Connectivity | Enables faster data speeds and advanced apps | \n
\nYour Report Is On Its Way!\n
\nDeepResearcher will now work independently to conduct the research and the compiled report will be uploaded to the following Notion page below when finished.\n
\nPlease click the \"Done\" button to complete the form.\n
\n This value determines how many sub-queries to generate.\n
\n \n \n\n This value determines how many sources to explore.\n
\n \n \n\nAnswer the following clarification questions to assist the DeepResearcher better under the research topic.\n
\n\nTotal {{ $('Feedback to Items').all().length }} questions.\n
" +}, +"formFields": { +"values": [ +{ +"fieldType": "textarea", +"fieldLabel": "={{ $json[\"output.questions\"] }}", +"placeholder": "=", +"requiredField": true +} +] +} +}, +"typeVersion": 1 +}, +{ +"id": "e07d8c3e-8bcd-4393-9892-f825433ab58d", +"name": "For Each Question...", +"type": "n8n-nodes-base.splitInBatches", +"position": [ +-540, +-460 +], +"parameters": { +"options": {} +}, +"typeVersion": 3 +}, +{ +"id": "e8d26351-52f4-40a6-ba5b-fb6bc816b734", +"name": "DeepResearch Subworkflow", +"type": "n8n-nodes-base.executeWorkflowTrigger", +"position": [ +-1880, +820 +], +"parameters": { +"workflowInputs": { +"values": [ +{ +"name": "requestId", +"type": "any" +}, +{ +"name": "jobType" +}, +{ +"name": "data", +"type": "object" +} +] +} +}, +"typeVersion": 1.1 +}, +{ +"id": "25a8055a-27aa-414f-856b-25a2e2f31974", +"name": "Sticky Note", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-1140, +-680 +], +"parameters": { +"color": 7, +"width": 1000, +"height": 560, +"content": "## 2. Ask Clarifying Questions\n[Read more about form nodes](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/)\n\nTo handle the clarification questions generated by the LLM, I used the same technique found in my \"AI Interviewer\" template ([link](https://n8n.io/workflows/2566-conversational-interviews-with-ai-agents-and-n8n-forms/)).\nThis involves a looping of dynamically generated forms to collect answers from the user." +}, +"typeVersion": 1 +}, +{ +"id": "68398b92-eb35-48bf-885e-540074531cc4", +"name": "Clarifying Questions", +"type": "@n8n/n8n-nodes-langchain.chainLlm", +"position": [ +-1040, +-460 +], +"parameters": { +"text": "=Given the following query from the user, ask some follow up questions to clarify the research direction. Return a maximum of 3 questions, but feel free to return less if the original query is clear:| Technology | Potential Impact |
|---|---|
| 5G Connectivity | Enables faster data speeds and advanced apps | \n
\nYour Report Is On Its Way!\n
\nDeepResearcher will now work independently to conduct the research and the compiled report will be uploaded to the following Notion page below when finished.\n
\nPlease click the \"Done\" button to complete the form.\n
\n This value determines how many sub-queries to generate.\n
\n \n \n\n This value determines how many sources to explore.\n
\n \n \nDear {{ $('Get Form Values').first().json.name }},
\nThanks for requesting an appointment. We will review and get back to you shortly.
\nHere is the summary of the request that was sent:
\n\nName: {{ $('Get Form Values').first().json.name }}
\nEmail: {{ $('Get Form Values').first().json.email }}
\nEnquiry: {{ $('Get Form Values').first().json.enquiry }}
\nSubmitted at: {{ $('Get Form Values').first().json.submittedAt }}\n
\nRequesting appointment date is {{ DateTime.fromISO($('Execute Workflow Trigger').item.json.dateTime).format('EEE, dd MMM @ t') }}.\n
\n\nName: {{ $('Execute Workflow Trigger').first().json.name }}
\nEmail: {{ $('Execute Workflow Trigger').first().json.email }}
\nEnquiry Summary: {{ $json.text }}
\nSubmitted at: {{ $('Execute Workflow Trigger').first().json.submittedAt }}\n
Dear {{ $('Execute Workflow Trigger').first().json.name }},
\nUnfortunately, we cannot schedule the requested appointment at the requested time.
\nKind regards
\n", +"options": {}, +"subject": "=Appointment Request Rejected for {{ DateTime.fromISO($('Execute Workflow Trigger').first().json.dateTime).format('EEE, dd MMM @ t') }}" +}, +"credentials": { +"gmailOAuth2": { +"id": "Sf5Gfl9NiFTNXFWb", +"name": "Gmail account" +} +}, +"typeVersion": 2.1 +}, +{ +"id": "40785eca-943c-45f6-b4a9-0c95538621ed", +"name": "Sticky Note3", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-2580, +-555.2889298043726 +], +"parameters": { +"color": 7, +"width": 763.0427617951669, +"height": 611.898918296892, +"content": "## 1. Qualify Enquiries Using AI\n[Learn more about the text classifier](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.text-classifier/)\n\nWith n8n's multi-forms, you’re no longer stuck creating long, overwhelming forms. Instead, you have more flexibility and control to design smarter, more engaging form experiences.\n\nIn this demo, we’ll explore an appointment request scenario where a user wants to schedule a call to discuss their inquiry. However, not all inquiries require a meeting, making it a perfect use case for AI to pre-qualify the request. We can handle this validation using the text classifier node." +}, +"typeVersion": 1 +}, +{ +"id": "985be8d1-e77a-475b-9ac2-dba163dbd950", +"name": "Sticky Note6", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-1800, +-549.8684464902185 +], +"parameters": { +"color": 7, +"width": 781.472405063291, +"height": 606.0718987341766, +"content": "## 2. Split Form For Better User Experience\n[Learn more about the forms](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form)\n\nOnboarding is a great reason to split your big form into smaller ones. Taking the user through a step by step process ensures a smooth experience and keeps them engaged throughout.\n\nHere, we take the opportunity of the extra context space to display a terms and conditions which the user must agree to making their request. The next form then asks for desired date and time of the event." +}, +"typeVersion": 1 +}, +{ +"id": "9b0a3f0e-e15d-4d0e-b620-1acc78bf812c", +"name": "Decline", +"type": "n8n-nodes-base.form", +"position": [ +-2020, +-160 +], +"webhookId": "4353eadb-b7a0-45f2-8dd8-5f6cd882d8d8", +"parameters": { +"options": {}, +"operation": "completion", +"completionTitle": "Send me a DM Instead!", +"completionMessage": "Thanks for your enquiry but it may not necessarily need an appointment. Please feel free to email me instead at jim@example.com." +}, +"typeVersion": 1 +}, +{ +"id": "fcd3eb7d-6389-4c07-97cc-275ae387c963", +"name": "Decline1", +"type": "n8n-nodes-base.form", +"position": [ +-1260, +-160 +], +"webhookId": "4353eadb-b7a0-45f2-8dd8-5f6cd882d8d8", +"parameters": { +"options": {}, +"operation": "completion", +"completionTitle": "Send me a DM Instead!", +"completionMessage": "Thanks for your enquiry but it may not necessarily need an appointment. Please feel free to email me instead at jim@example.com." +}, +"typeVersion": 1 +}, +{ +"id": "d89427cb-fffb-4aa4-b55c-b315fa0e92be", +"name": "Sticky Note7", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-1000, +-498.80432681242814 +], +"parameters": { +"color": 7, +"width": 792.9401150747982, +"height": 497.4250863060987, +"content": "## 3. Send Acknowledgement to User and Start Approval Process\n[Learn more about the Gmail node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/)\n\nOnce all form steps are concluded, we can send a notification to the requester via email and in the background, trigger another email to the admin to initiate the approval process. The approval process works in a separate execution so doesn't interrupt the user's form experience." +}, +"typeVersion": 1 +}, +{ +"id": "041081e1-ee98-4b40-aa14-1980b23f4031", +"name": "Sticky Note8", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-160, +-620 +], +"parameters": { +"color": 7, +"width": 609.4228768699652, +"height": 287.178089758343, +"content": "## 4. Approve or Decline Appointment\n[Learn more about the Waiting for Approval](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations/#send-a-message-and-wait-for-approval)\n\nThe Wait for Approval feature for Gmail is a special operation which allows for human-in-the-loop interaction in n8n workflows. In this example, the human interaction is the approval of the appointment request. The feature will put the workflow in a waiting state where a message is sent to the admin with 2 buttons: confirm and decline.\n\nWhen the admin clicks on the confirm button, the workflow resumes from the Gmail node and a meeting event is created for the requesting user in Google Calendar.\n\nWhen declined, a rejection email is sent to the requester instead." +}, +"typeVersion": 1 +}, +{ +"id": "d6af0f50-234f-46ca-aa41-7f3891aff8a3", +"name": "Trigger Approval Process", +"type": "n8n-nodes-base.executeWorkflow", +"position": [ +-740, +-260 +], +"parameters": { +"mode": "each", +"options": { +"waitForSubWorkflow": false +}, +"workflowId": { +"__rl": true, +"mode": "id", +"value": "={{ $workflow.id }}" +} +}, +"typeVersion": 1.1 +}, +{ +"id": "e524d6df-9b6d-4d61-8e71-08a0d3a751d7", +"name": "Execute Workflow Trigger", +"type": "n8n-nodes-base.executeWorkflowTrigger", +"position": [ +-160, +-260 +], +"parameters": {}, +"typeVersion": 1 +}, +{ +"id": "74dccbc1-7728-4336-a18a-2541007fd369", +"name": "Summarise Enquiry", +"type": "@n8n/n8n-nodes-langchain.chainLlm", +"position": [ +0, +-260 +], +"parameters": { +"text": "=The enquiry is as follows:\n{{ $('Execute Workflow Trigger').first().json.enquiry.substring(0, 500) }}", +"messages": { +"messageValues": [ +{ +"message": "Summarise the given enquiry" +} +] +}, +"promptType": "define" +}, +"typeVersion": 1.5 +}, +{ +"id": "b74f0f5a-39f0-4db3-beba-03caf981c5d2", +"name": "Sticky Note9", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-3080, +-640 +], +"parameters": { +"width": 468.6766398158801, +"height": 690.6653164556957, +"content": "## Try it out!\n\n### This n8n template is a simple appointment scheduling workflow using n8n forms with AI thrown in the mix for good measure. It also uses n8n's wait for approval feature which allows the ability to confirm appointment requests and create events in Google Calendar.\n\n### How it works\n* We start with a form trigger which asks for the purpose of the appointment.\n* Instantly, we can qualify this by using a text classifier node which uses AI's contextual understanding to ensure the appointment is worthwhile. If not, an alternative is suggested instead.\n* Multi-page forms are then used to set the terms of the appointment and ask the user for a desired date and time.\n* An acknowledgement is sent to the user while an approval by email process is triggered in the background.\n* In a subworkflow, we use Gmail with the wait for approval operation to send an approval form to the admin user who can either confirm or decline the appointment request.\n* When approved, a Google Calendar event is created. When declined, the user is notified via email that the appointment request was declined.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!\n" +}, +"typeVersion": 1 +}, +{ +"id": "d3c87dfa-d6e5-402a-89e5-6d8f93b824a6", +"name": "Sticky Note", +"type": "n8n-nodes-base.stickyNote", +"position": [ +299, +-280 +], +"parameters": { +"width": 177.66444188722656, +"height": 257.56869965477557, +"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 🚨 Set your admin email here!" +}, +"typeVersion": 1 +}, +{ +"id": "6351121d-6ebe-432d-b370-13296fd58e1a", +"name": "Enquiry Classifier", +"type": "@n8n/n8n-nodes-langchain.textClassifier", +"position": [ +-2340, +-280 +], +"parameters": { +"options": { +"fallback": "other" +}, +"inputText": "={{ $json.Enquiry }}", +"categories": { +"categories": [ +{ +"category": "relevant enquiry", +"description": "Enquire about AI, automation, digital products and product engineering." +} +] +} +}, +"typeVersion": 1 +} +], +"pinData": {}, +"connections": { +"Send Receipt": { +"main": [ +[ +{ +"node": "Form End", +"type": "main", +"index": 0 +} +] +] +}, +"Has Accepted?": { +"main": [ +[ +{ +"node": "Enter Date & Time", +"type": "main", +"index": 0 +} +], +[ +{ +"node": "Decline1", +"type": "main", +"index": 0 +} +] +] +}, +"Has Approval?": { +"main": [ +[ +{ +"node": "Create Appointment", +"type": "main", +"index": 0 +} +], +[ +{ +"node": "Send Rejection", +"type": "main", +"index": 0 +} +] +] +}, +"Get Form Values": { +"main": [ +[ +{ +"node": "Trigger Approval Process", +"type": "main", +"index": 0 +} +] +] +}, +"n8n Form Trigger": { +"main": [ +[ +{ +"node": "Enquiry Classifier", +"type": "main", +"index": 0 +} +] +] +}, +"Enter Date & Time": { +"main": [ +[ +{ +"node": "Get Form Values", +"type": "main", +"index": 0 +} +] +] +}, +"OpenAI Chat Model": { +"ai_languageModel": [ +[ +{ +"node": "Enquiry Classifier", +"type": "ai_languageModel", +"index": 0 +} +] +] +}, +"Summarise Enquiry": { +"main": [ +[ +{ +"node": "Wait for Approval", +"type": "main", +"index": 0 +} +] +] +}, +"Wait for Approval": { +"main": [ +[ +{ +"node": "Has Approval?", +"type": "main", +"index": 0 +} +] +] +}, +"Enquiry Classifier": { +"main": [ +[ +{ +"node": "Terms & Conditions", +"type": "main", +"index": 0 +} +], +[ +{ +"node": "Decline", +"type": "main", +"index": 0 +} +] +] +}, +"OpenAI Chat Model1": { +"ai_languageModel": [ +[ +{ +"node": "Summarise Enquiry", +"type": "ai_languageModel", +"index": 0 +} +] +] +}, +"Terms & Conditions": { +"main": [ +[ +{ +"node": "Has Accepted?", +"type": "main", +"index": 0 +} +] +] +}, +"Execute Workflow Trigger": { +"main": [ +[ +{ +"node": "Summarise Enquiry", +"type": "main", +"index": 0 +} +] +] +}, +"Trigger Approval Process": { +"main": [ +[ +{ +"node": "Send Receipt", +"type": "main", +"index": 0 +} +] +] +} +} +} \ No newline at end of file diff --git a/Query Perplexity AI from your n8n workflows.txt b/Query Perplexity AI from your n8n workflows.txt new file mode 100644 index 0000000..1dc5e71 --- /dev/null +++ b/Query Perplexity AI from your n8n workflows.txt @@ -0,0 +1,176 @@ +{ +"nodes": [ +{ +"id": "293b70f0-06e8-4db5-befd-bfaed1f3575a", +"name": "When clicking ‘Test workflow’", +"type": "n8n-nodes-base.manualTrigger", +"position": [ +-460, +80 +], +"parameters": {}, +"typeVersion": 1 +}, +{ +"id": "1c473546-6280-412d-9f8e-b43962365d78", +"name": "Set Params", +"type": "n8n-nodes-base.set", +"position": [ +-160, +-60 +], +"parameters": { +"options": {}, +"assignments": { +"assignments": [ +{ +"id": "8b5c6ca0-5ca8-4f67-abc1-44341cf419bc", +"name": "system_prompt", +"type": "string", +"value": "You are an n8n fanboy." +}, +{ +"id": "7c36c362-6269-4564-b6fe-f82126bc8f5e", +"name": "user_prompt", +"type": "string", +"value": "What are the differences between n8n and Make?" +}, +{ +"id": "4366d2b5-ad22-445a-8589-fddab1caa1ab", +"name": "domains", +"type": "string", +"value": "n8n.io, make.com" +} +] +} +}, +"typeVersion": 3.4 +}, +{ +"id": "894bd6a4-5db7-45fb-a8e0-1a81af068bbf", +"name": "Clean Output", +"type": "n8n-nodes-base.set", +"position": [ +580, +-100 +], +"parameters": { +"options": {}, +"assignments": { +"assignments": [ +{ +"id": "5859093c-6b22-41db-ac6c-9a9f6f18b7e3", +"name": "output", +"type": "string", +"value": "={{ $json.choices[0].message.content }}" +}, +{ +"id": "13208fff-5153-45a7-a1cb-fe49e32d9a03", +"name": "citations", +"type": "array", +"value": "={{ $json.citations }}" +} +] +} +}, +"typeVersion": 3.4 +}, +{ +"id": "52d3a832-8c9b-4356-ad2a-377340678a58", +"name": "Perplexity Request", +"type": "n8n-nodes-base.httpRequest", +"position": [ +240, +40 +], +"parameters": { +"url": "https://api.perplexity.ai/chat/completions", +"method": "POST", +"options": {}, +"jsonBody": "={\n \"model\": \"sonar\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"{{ $json.system_prompt }}\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{ $json.user_prompt }}\"\n }\n ],\n \"temperature\": 0.2,\n \"top_p\": 0.9,\n \"search_domain_filter\": {{ (JSON.stringify($json.domains.split(','))) }},\n \"return_images\": false,\n \"return_related_questions\": false,\n \"search_recency_filter\": \"month\",\n \"top_k\": 0,\n \"stream\": false,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 1,\n \"response_format\": null\n}", +"sendBody": true, +"specifyBody": "json", +"authentication": "genericCredentialType", +"genericAuthType": "httpHeaderAuth" +}, +"credentials": { +"httpBasicAuth": { +"id": "yEocL0NSpUWzMsHG", +"name": "Perplexity" +}, +"httpHeaderAuth": { +"id": "TngzgS09J1YvLIXl", +"name": "Perplexity" +} +}, +"typeVersion": 4.2 +}, +{ +"id": "48657f2c-d1dd-4d7e-8014-c27748e63e58", +"name": "Sticky Note", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-140, +-440 +], +"parameters": { +"width": 480, +"height": 300, +"content": "## Credentials Setup\n\n1/ Go to the perplexity dashboard, purchase some credits and create an API Key\n\nhttps://www.perplexity.ai/settings/api\n\n2/ In the perplexity Request node, use Generic Credentials, Header Auth. \n\nFor the name, use the value \"Authorization\"\nAnd for the value \"Bearer pplx-e4...59ea\" (Your Perplexity Api Key)\n\n" +}, +"typeVersion": 1 +}, +{ +"id": "e0daabee-c145-469e-93c2-c759c303dc2a", +"name": "Sticky Note1", +"type": "n8n-nodes-base.stickyNote", +"position": [ +100, +260 +], +"parameters": { +"color": 5, +"width": 480, +"height": 120, +"content": "**Sonar Pro** is the current top model used by perplexity. \nIf you want to use a different one, check this page: \n\nhttps://docs.perplexity.ai/guides/model-cards" +}, +"typeVersion": 1 +} +], +"pinData": {}, +"connections": { +"Set Params": { +"main": [ +[ +{ +"node": "Perplexity Request", +"type": "main", +"index": 0 +} +] +] +}, +"Perplexity Request": { +"main": [ +[ +{ +"node": "Clean Output", +"type": "main", +"index": 0 +} +] +] +}, +"When clicking ‘Test workflow’": { +"main": [ +[ +{ +"node": "Set Params", +"type": "main", +"index": 0 +} +] +] +} +} +} \ No newline at end of file diff --git a/Query n8n Credentials with AI SQL Agent.txt b/Query n8n Credentials with AI SQL Agent.txt new file mode 100644 index 0000000..c37c42e --- /dev/null +++ b/Query n8n Credentials with AI SQL Agent.txt @@ -0,0 +1,302 @@ +{ +"meta": { +"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e" +}, +"nodes": [ +{ +"id": "382dddd4-da50-49fa-90a2-f7d6d160afdf", +"name": "When clicking \"Test workflow\"", +"type": "n8n-nodes-base.manualTrigger", +"position": [ +920, +280 +], +"parameters": {}, +"typeVersion": 1 +}, +{ +"id": "efa8f415-62f7-43b3-a76a-a2eabf779cb8", +"name": "Map Workflows & Credentials", +"type": "n8n-nodes-base.set", +"position": [ +1360, +280 +], +"parameters": { +"options": {}, +"assignments": { +"assignments": [ +{ +"id": "0fd19a68-c561-4cc2-94d6-39848977e6d2", +"name": "workflow_id", +"type": "string", +"value": "={{ $json.id }}" +}, +{ +"id": "a81f9e6f-9c78-4c3d-9b79-e820f8c5ba29", +"name": "workflow_name", +"type": "string", +"value": "={{ $json.name }}" +}, +{ +"id": "58ab0f2f-7598-48de-bea1-f3373c5731fe", +"name": "credentials", +"type": "array", +"value": "={{ $json.nodes.map(node => node.credentials).compact().reduce((acc,cred) => { const keys = Object.keys(cred); const items = keys.map(key => ({ type: key, ...cred[key] })); acc.push(...items); return acc; }, []) }}" +} +] +} +}, +"typeVersion": 3.3 +}, +{ +"id": "9e9b4f9c-12b7-47ba-8cf4-a9818902a538", +"name": "Sticky Note", +"type": "n8n-nodes-base.stickyNote", +"position": [ +1084, +252 +], +"parameters": { +"width": 216, +"height": 299.56273929030715, +"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 🚨Required\nYou'll need an n8n API key. Note: available workflows will be scoped to your key." +}, +"typeVersion": 1 +}, +{ +"id": "cf04eff5-12b2-42fb-9089-2d0c992af1b8", +"name": "Save to Database", +"type": "n8n-nodes-base.code", +"position": [ +1540, +280 +], +"parameters": { +"language": "python", +"pythonCode": "import json\nimport sqlite3\ncon = sqlite3.connect(\"n8n_workflow_credentials.db\")\n\ncur = con.cursor()\ncur.execute(\"CREATE TABLE IF NOT EXISTS n8n_workflow_credentials (workflow_id TEXT PRIMARY KEY, workflow_name TEXT, credentials TEXT);\")\n\nfor item in _input.all():\n cur.execute('INSERT OR REPLACE INTO n8n_workflow_credentials VALUES(?,?,?)', (\n item.json.workflow_id,\n item.json.workflow_name,\n json.dumps(item.json.credentials.to_py())\n ))\n\ncon.commit()\ncon.close()\n\nreturn [{ \"affected_rows\": len(_input.all()) }]" +}, +"typeVersion": 2 +}, +{ +"id": "7e32cf83-0498-4666-8677-7fd32eec779c", +"name": "Chat Trigger", +"type": "@n8n/n8n-nodes-langchain.chatTrigger", +"position": [ +1880, +280 +], +"webhookId": "993ce267-a1e5-4657-a38c-08f86715063d", +"parameters": {}, +"typeVersion": 1 +}, +{ +"id": "8c37f2ae-192b-4f98-a6fa-5aabf870e9e0", +"name": "Query Workflow Credentials Database", +"type": "@n8n/n8n-nodes-langchain.toolCode", +"position": [ +2320, +440 +], +"parameters": { +"name": "query_workflow_credentials_database", +"language": "python", +"pythonCode": "import json\nimport sqlite3\ncon = sqlite3.connect(\"n8n_workflow_credentials.db\")\n\ncur = con.cursor()\nres = cur.execute(query);\n\noutput = json.dumps(res.fetchall())\n\ncon.close()\nreturn output;", +"description": "Call this tool to query the workflow credentials database. The database is already set. The available tables are as follows:\n* n8n_workflow_credentials (workflow_id TEXT PRIMARY KEY, workflow_name TEXT, credentials TEXT);\n * n8n_workflow_credentials.credentials are stored as json string and the app name may be obscured. Prefer querying using the %LIKE% operation for best results.\n\nPass a SQL SELECT query to this tool for the available tables." +}, +"typeVersion": 1.1 +}, +{ +"id": "60b2ab16-dc7c-4cb8-a58f-696f721b8d6f", +"name": "OpenAI Chat Model", +"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", +"position": [ +2060, +440 +], +"parameters": { +"options": {} +}, +"credentials": { +"openAiApi": { +"id": "8gccIjcuf3gvaoEr", +"name": "OpenAi account" +} +}, +"typeVersion": 1 +}, +{ +"id": "adf576c1-ddb0-4fef-980c-5b485a3204f2", +"name": "Window Buffer Memory", +"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", +"position": [ +2180, +440 +], +"parameters": {}, +"typeVersion": 1.2 +}, +{ +"id": "4335b038-3e9f-4173-986d-cabdb87cc0b4", +"name": "Sticky Note1", +"type": "n8n-nodes-base.stickyNote", +"position": [ +860, +100 +], +"parameters": { +"color": 7, +"width": 930.8402221561373, +"height": 488.8805508857059, +"content": "## Step 1. Store Workflows Credential Mappings to Database\n\nWe'll achieve this by querying n8n's built-in API to query all workflows, extract the credentials list from the nodes within and then store them in a SQLite database. Don't worry, the actual credential data won't be exposed! For the database, we'll abuse the fact that the code node is able to create Sqlite databases - however, this is created in memory and will be wiped if the n8n instance is restarted." +}, +"typeVersion": 1 +}, +{ +"id": "c1f557ee-1176-4f3e-8431-d162f1a59990", +"name": "Sticky Note2", +"type": "n8n-nodes-base.stickyNote", +"position": [ +1820, +100 +], +"parameters": { +"color": 7, +"width": 688.6507290693205, +"height": 527.3794193342486, +"content": "## Step 2. Use Agent as Search Interface\n\nInstead of building a form interface like a regular person, we'll just use an AI tools agent who is given aaccess to perform queries on our database. You can ask it things like \"which workflows are using slack + airtable + googlesheets?\"" +}, +"typeVersion": 1 +}, +{ +"id": "9bdc3fa9-d4a0-4040-bb32-6c76aaca3ad9", +"name": "Workflow Credentials Helper Agent", +"type": "@n8n/n8n-nodes-langchain.agent", +"position": [ +2080, +280 +], +"parameters": { +"options": { +"systemMessage": "=You help find information on n8n workflow credentials. When user mentions an app, assume they mean the workflow credential for the app.\n* Only if the user requests to provide a link to the workflow, replace $workflow_id with the workflow id in the following url schema: {{ window.location.protocol + '//' + window.location.host }}/workflow/$workflow_id" +} +}, +"typeVersion": 1.6 +}, +{ +"id": "ff39f504-9953-47c9-81eb-3146dfd6c8c5", +"name": "Sticky Note4", +"type": "n8n-nodes-base.stickyNote", +"position": [ +420, +100 +], +"parameters": { +"width": 415.13049730628427, +"height": 347.7398931123371, +"content": "## Try It Out!\n\n### This workflow let's you query workflow credentials using an AI SQL agent. Example use-case could be:\n* \"Which workflows are using Slack and Google Calendar?\"\n* \"Which workflows have AI in their name but are not using openAI?\"\n\n### Run the Steps separately!\n* Step 1 populates a local database\n* Step 2 engages with the chatbot" +}, +"typeVersion": 1 +}, +{ +"id": "3db2116c-abde-4856-bd1e-a15e0275477f", +"name": "n8n", +"type": "n8n-nodes-base.n8n", +"position": [ +1140, +280 +], +"parameters": { +"filters": {}, +"requestOptions": {} +}, +"credentials": { +"n8nApi": { +"id": "5vELmsVPmK4Bkqkg", +"name": "n8n account" +} +}, +"typeVersion": 1 +} +], +"pinData": {}, +"connections": { +"n8n": { +"main": [ +[ +{ +"node": "Map Workflows & Credentials", +"type": "main", +"index": 0 +} +] +] +}, +"Chat Trigger": { +"main": [ +[ +{ +"node": "Workflow Credentials Helper Agent", +"type": "main", +"index": 0 +} +] +] +}, +"OpenAI Chat Model": { +"ai_languageModel": [ +[ +{ +"node": "Workflow Credentials Helper Agent", +"type": "ai_languageModel", +"index": 0 +} +] +] +}, +"Window Buffer Memory": { +"ai_memory": [ +[ +{ +"node": "Workflow Credentials Helper Agent", +"type": "ai_memory", +"index": 0 +} +] +] +}, +"Map Workflows & Credentials": { +"main": [ +[ +{ +"node": "Save to Database", +"type": "main", +"index": 0 +} +] +] +}, +"When clicking \"Test workflow\"": { +"main": [ +[ +{ +"node": "n8n", +"type": "main", +"index": 0 +} +] +] +}, +"Query Workflow Credentials Database": { +"ai_tool": [ +[ +{ +"node": "Workflow Credentials Helper Agent", +"type": "ai_tool", +"index": 0 +} +] +] +} +} +} \ No newline at end of file diff --git a/RAG Chatbot for Company Documents using Google Drive and Gemini.txt b/RAG Chatbot for Company Documents using Google Drive and Gemini.txt new file mode 100644 index 0000000..ddbd7ab --- /dev/null +++ b/RAG Chatbot for Company Documents using Google Drive and Gemini.txt @@ -0,0 +1,525 @@ +{ +"id": "7cXvgkl9170QXzT2", +"meta": { +"instanceId": "69133932b9ba8e1ef14816d0b63297bb44feb97c19f759b5d153ff6b0c59e18d", +"templateCredsSetupCompleted": true +}, +"name": "RAG Workflow For Company Documents stored in Google Drive", +"tags": [], +"nodes": [ +{ +"id": "753455a3-ddc8-4a74-b043-70a0af38ff9e", +"name": "Pinecone Vector Store", +"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone", +"position": [ +680, +0 +], +"parameters": { +"mode": "insert", +"options": {}, +"pineconeIndex": { +"__rl": true, +"mode": "list", +"value": "company-files", +"cachedResultName": "company-files" +} +}, +"credentials": { +"pineconeApi": { +"id": "bQTNry52ypGLqt47", +"name": "PineconeApi account" +} +}, +"typeVersion": 1 +}, +{ +"id": "a7c8fa7f-cad2-4497-a295-30aa2e98cacc", +"name": "Embeddings Google Gemini", +"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini", +"position": [ +640, +280 +], +"parameters": { +"modelName": "models/text-embedding-004" +}, +"credentials": { +"googlePalmApi": { +"id": "jLOqyTR4yTT1nYKi", +"name": "Google Gemini(PaLM) Api account" +} +}, +"typeVersion": 1 +}, +{ +"id": "215f0519-4359-4e4b-a90c-7e54b1cc52b5", +"name": "Default Data Loader", +"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader", +"position": [ +840, +220 +], +"parameters": { +"options": {}, +"dataType": "binary", +"binaryMode": "specificField" +}, +"typeVersion": 1 +}, +{ +"id": "863d3d1d-1621-406e-8320-688f64b07b09", +"name": "Recursive Character Text Splitter", +"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter", +"position": [ +820, +420 +], +"parameters": { +"options": {}, +"chunkOverlap": 100 +}, +"typeVersion": 1 +}, +{ +"id": "5af1efb1-ea69-466e-bb3b-2b7e6b1ceef7", +"name": "AI Agent", +"type": "@n8n/n8n-nodes-langchain.agent", +"position": [ +420, +840 +], +"parameters": { +"options": { +"systemMessage": "You are a helpful HR assistant designed to answer employee questions based on company policies.\n\nRetrieve relevant information from the provided internal documents and provide a concise, accurate, and informative answer to the employee's question.\n\nUse the tool called \"company_documents_tool\" to retrieve any information from the company's documents.\n\nIf the answer cannot be found in the provided documents, respond with \"I cannot find the answer in the available resources.\"" +} +}, +"typeVersion": 1.7 +}, +{ +"id": "825632ac-1edf-4e63-948d-b1a498b2b962", +"name": "Vector Store Tool", +"type": "@n8n/n8n-nodes-langchain.toolVectorStore", +"position": [ +820, +1060 +], +"parameters": { +"name": "company_documents_tool", +"description": "Retrieve information from any company documents" +}, +"typeVersion": 1 +}, +{ +"id": "72d2f685-bcc3-4e62-a5e3-72c0fe65f8e8", +"name": "Pinecone Vector Store (Retrieval)", +"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone", +"position": [ +720, +1240 +], +"parameters": { +"options": {}, +"pineconeIndex": { +"__rl": true, +"mode": "list", +"value": "company-files", +"cachedResultName": "company-files" +} +}, +"credentials": { +"pineconeApi": { +"id": "bQTNry52ypGLqt47", +"name": "PineconeApi account" +} +}, +"typeVersion": 1 +}, +{ +"id": "eeff81cb-6aec-4e7f-afe0-432d87085fb2", +"name": "Embeddings Google Gemini (retrieval)", +"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini", +"position": [ +700, +1400 +], +"parameters": { +"modelName": "models/text-embedding-004" +}, +"credentials": { +"googlePalmApi": { +"id": "jLOqyTR4yTT1nYKi", +"name": "Google Gemini(PaLM) Api account" +} +}, +"typeVersion": 1 +}, +{ +"id": "8bb6ebb1-1deb-498b-8da4-b809a736e097", +"name": "Download File From Google Drive", +"type": "n8n-nodes-base.googleDrive", +"position": [ +460, +0 +], +"parameters": { +"fileId": { +"__rl": true, +"mode": "id", +"value": "={{ $json.id }}" +}, +"options": { +"fileName": "={{ $json.name }}" +}, +"operation": "download" +}, +"credentials": { +"googleDriveOAuth2Api": { +"id": "uixLsi5TmrfwXPeB", +"name": "Google Drive account" +} +}, +"typeVersion": 3 +}, +{ +"id": "bd83bacf-dff1-4b7c-af5c-b249fb16c113", +"name": "Sticky Note2", +"type": "n8n-nodes-base.stickyNote", +"position": [ +420, +660 +], +"parameters": { +"content": "## Chat with company documents" +}, +"typeVersion": 1 +}, +{ +"id": "7b90daab-0fb2-4c8a-93e6-b138bb04f282", +"name": "Google Drive File Updated", +"type": "n8n-nodes-base.googleDriveTrigger", +"position": [ +140, +140 +], +"parameters": { +"event": "fileUpdated", +"options": {}, +"pollTimes": { +"item": [ +{ +"mode": "everyMinute" +} +] +}, +"triggerOn": "specificFolder", +"folderToWatch": { +"__rl": true, +"mode": "list", +"value": "1evDIoHePhjw_LgVFZXSZyK1sZm2GHp9W", +"cachedResultUrl": "https://drive.google.com/drive/folders/1evDIoHePhjw_LgVFZXSZyK1sZm2GHp9W", +"cachedResultName": "INNOVI PRO" +} +}, +"credentials": { +"googleDriveOAuth2Api": { +"id": "uixLsi5TmrfwXPeB", +"name": "Google Drive account" +} +}, +"typeVersion": 1 +}, +{ +"id": "3a6c6cef-7a19-42ef-8092-eaf57dae4cdd", +"name": "Google Drive File Created", +"type": "n8n-nodes-base.googleDriveTrigger", +"position": [ +140, +-120 +], +"parameters": { +"event": "fileCreated", +"options": { +"fileType": "all" +}, +"pollTimes": { +"item": [ +{ +"mode": "everyMinute" +} +] +}, +"triggerOn": "specificFolder", +"folderToWatch": { +"__rl": true, +"mode": "list", +"value": "1evDIoHePhjw_LgVFZXSZyK1sZm2GHp9W", +"cachedResultUrl": "https://drive.google.com/drive/folders/1evDIoHePhjw_LgVFZXSZyK1sZm2GHp9W", +"cachedResultName": "INNOVI PRO" +} +}, +"credentials": { +"googleDriveOAuth2Api": { +"id": "uixLsi5TmrfwXPeB", +"name": "Google Drive account" +} +}, +"typeVersion": 1 +}, +{ +"id": "1e38f1c8-7bd0-4eeb-addc-62339582d350", +"name": "Window Buffer Memory", +"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", +"position": [ +500, +1140 +], +"parameters": {}, +"typeVersion": 1.3 +}, +{ +"id": "4b0ab858-99b1-4337-8c5c-a223519e3662", +"name": "When chat message received", +"type": "@n8n/n8n-nodes-langchain.chatTrigger", +"position": [ +80, +840 +], +"webhookId": "5f1c0c82-0ff9-40c7-9e2e-b1a96ffe24cd", +"parameters": { +"options": {} +}, +"typeVersion": 1.1 +}, +{ +"id": "bfb684d1-e5c1-41da-8305-b2606a2eade6", +"name": "Sticky Note", +"type": "n8n-nodes-base.stickyNote", +"position": [ +440, +-240 +], +"parameters": { +"width": 320, +"content": "## Add docuemnts to vector store when updating or creating new documents in Google Drive" +}, +"typeVersion": 1 +}, +{ +"id": "8f627ec6-4b3f-43ad-a4a3-e2b199a7fe58", +"name": "Google Gemini Chat Model", +"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", +"position": [ +320, +1140 +], +"parameters": { +"options": {}, +"modelName": "models/gemini-2.0-flash-exp" +}, +"credentials": { +"googlePalmApi": { +"id": "jLOqyTR4yTT1nYKi", +"name": "Google Gemini(PaLM) Api account" +} +}, +"typeVersion": 1 +}, +{ +"id": "f2133a06-0088-46de-9f74-a3f9fe478f98", +"name": "Google Gemini Chat Model (retrieval)", +"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", +"position": [ +1080, +1240 +], +"parameters": { +"options": {}, +"modelName": "models/gemini-2.0-flash-exp" +}, +"credentials": { +"googlePalmApi": { +"id": "jLOqyTR4yTT1nYKi", +"name": "Google Gemini(PaLM) Api account" +} +}, +"typeVersion": 1 +}, +{ +"id": "578deb96-8393-4850-9757-fa97b2bc9992", +"name": "Sticky Note1", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-540, +220 +], +"parameters": { +"width": 420, +"height": 720, +"content": "## Set up steps\n\n1. Google Cloud Project and Vertex AI API:\n* Create a Google Cloud project.\n* Enable the Vertex AI API for your project.\n2. Google AI API Key:\n* Obtain a Google AI API key from Google AI Studio.\n3. Pinecone Account:\n* Create a free account on the Pinecone website.\nObtain your API key from your Pinecone dashboard.\n* Create an index named company-files in your Pinecone project.\n4. Google Drive:\n* Create a dedicated folder in your Google Drive where company documents will be stored.\n5. Credentials in n8n: Configure credentials in your n8n environment for:\n* Google Drive OAuth2\n* Google Gemini(PaLM) Api (using your Google AI API key)\n* Pinecone API (using your Pinecone API key)\n5. Import the Workflow:\n* Import this workflow into your n8n instance.\n6. Configure the Workflow:\n* Update both Google Drive Trigger nodes to watch the specific folder you created in your Google Drive.\n* Configure the Pinecone Vector Store nodes to use your company-files index." +}, +"typeVersion": 1 +} +], +"active": false, +"pinData": {}, +"settings": { +"executionOrder": "v1" +}, +"versionId": "33b252fb-5d87-4a29-a0a7-97308140699c", +"connections": { +"AI Agent": { +"main": [ +[] +] +}, +"Vector Store Tool": { +"ai_tool": [ +[ +{ +"node": "AI Agent", +"type": "ai_tool", +"index": 0 +} +] +] +}, +"Default Data Loader": { +"ai_document": [ +[ +{ +"node": "Pinecone Vector Store", +"type": "ai_document", +"index": 0 +} +] +] +}, +"Window Buffer Memory": { +"ai_memory": [ +[ +{ +"node": "AI Agent", +"type": "ai_memory", +"index": 0 +} +] +] +}, +"Pinecone Vector Store": { +"main": [ +[] +] +}, +"Embeddings Google Gemini": { +"ai_embedding": [ +[ +{ +"node": "Pinecone Vector Store", +"type": "ai_embedding", +"index": 0 +} +] +] +}, +"Google Gemini Chat Model": { +"ai_languageModel": [ +[ +{ +"node": "AI Agent", +"type": "ai_languageModel", +"index": 0 +} +] +] +}, +"Google Drive File Created": { +"main": [ +[ +{ +"node": "Download File From Google Drive", +"type": "main", +"index": 0 +} +] +] +}, +"Google Drive File Updated": { +"main": [ +[ +{ +"node": "Download File From Google Drive", +"type": "main", +"index": 0 +} +] +] +}, +"When chat message received": { +"main": [ +[ +{ +"node": "AI Agent", +"type": "main", +"index": 0 +} +] +] +}, +"Download File From Google Drive": { +"main": [ +[ +{ +"node": "Pinecone Vector Store", +"type": "main", +"index": 0 +} +] +] +}, +"Pinecone Vector Store (Retrieval)": { +"ai_vectorStore": [ +[ +{ +"node": "Vector Store Tool", +"type": "ai_vectorStore", +"index": 0 +} +] +] +}, +"Recursive Character Text Splitter": { +"ai_textSplitter": [ +[ +{ +"node": "Default Data Loader", +"type": "ai_textSplitter", +"index": 0 +} +] +] +}, +"Embeddings Google Gemini (retrieval)": { +"ai_embedding": [ +[ +{ +"node": "Pinecone Vector Store (Retrieval)", +"type": "ai_embedding", +"index": 0 +} +] +] +}, +"Google Gemini Chat Model (retrieval)": { +"ai_languageModel": [ +[ +{ +"node": "Vector Store Tool", +"type": "ai_languageModel", +"index": 0 +} +] +] +} +} +} \ No newline at end of file diff --git a/RAG_Context-Aware Chunking _ Google Drive to Pinecone via OpenRouter & Gemini.txt b/RAG_Context-Aware Chunking _ Google Drive to Pinecone via OpenRouter & Gemini.txt new file mode 100644 index 0000000..3ed613f --- /dev/null +++ b/RAG_Context-Aware Chunking _ Google Drive to Pinecone via OpenRouter & Gemini.txt @@ -0,0 +1,458 @@ +{ +"id": "VY4WBXuNDPxmOO5e", +"meta": { +"instanceId": "d16fb7d4b3eb9b9d4ad2ee6a7fbae593d73e9715e51f583c2a0e9acd1781c08e", +"templateCredsSetupCompleted": true +}, +"name": "RAG:Context-Aware Chunking | Google Drive to Pinecone via OpenRouter & Gemini", +"tags": [ +{ +"id": "XZIQK6NdzGvgbZFd", +"name": "Sell", +"createdAt": "2025-01-15T12:28:48.424Z", +"updatedAt": "2025-01-15T12:28:48.424Z" +} +], +"nodes": [ +{ +"id": "7abbfa6e-4b17-4656-9b82-377b1bacf539", +"name": "When clicking ‘Test workflow’", +"type": "n8n-nodes-base.manualTrigger", +"position": [ +0, +0 +], +"parameters": {}, +"typeVersion": 1 +}, +{ +"id": "448ec137-bf64-46b4-bf15-c7a040faa306", +"name": "Loop Over Items", +"type": "n8n-nodes-base.splitInBatches", +"position": [ +1100, +0 +], +"parameters": { +"options": {} +}, +"typeVersion": 3 +}, +{ +"id": "f22557ee-7f37-40cd-9063-a9a759274663", +"name": "OpenRouter Chat Model", +"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter", +"position": [ +20, +440 +], +"parameters": { +"options": {} +}, +"credentials": { +"openRouterApi": { +"id": "ddH6iNlm09UxrXvu", +"name": "Auto: OpenRouter" +} +}, +"typeVersion": 1 +}, +{ +"id": "57e8792e-25ae-43d5-b4e9-e87642365ee9", +"name": "Pinecone Vector Store", +"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone", +"position": [ +780, +360 +], +"parameters": { +"mode": "insert", +"options": {}, +"pineconeIndex": { +"__rl": true, +"mode": "list", +"value": "context-rag-test", +"cachedResultName": "context-rag-test" +} +}, +"credentials": { +"pineconeApi": { +"id": "R3QGXSEIRTEAZttK", +"name": "Auto: PineconeApi" +} +}, +"typeVersion": 1 +}, +{ +"id": "0a8c2426-0aaf-424a-b246-336a9034aba8", +"name": "Embeddings Google Gemini", +"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini", +"position": [ +720, +540 +], +"parameters": { +"modelName": "models/text-embedding-004" +}, +"credentials": { +"googlePalmApi": { +"id": "9idxGZRZ3BAKDoxq", +"name": "Google Gemini(PaLM) Api account" +} +}, +"typeVersion": 1 +}, +{ +"id": "edc587bd-494d-43e8-b6d6-26adab7af3dc", +"name": "Default Data Loader", +"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader", +"position": [ +920, +540 +], +"parameters": { +"options": {} +}, +"typeVersion": 1 +}, +{ +"id": "a82d4e0b-248e-426d-9ef3-f25e7078ceb3", +"name": "Recursive Character Text Splitter", +"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter", +"position": [ +840, +680 +], +"parameters": { +"options": {}, +"chunkSize": 100000 +}, +"typeVersion": 1 +}, +{ +"id": "8571b92f-5587-454f-9700-ea04ca35311b", +"name": "Get Document From Google Drive", +"type": "n8n-nodes-base.googleDrive", +"position": [ +220, +0 +], +"parameters": { +"fileId": { +"__rl": true, +"mode": "list", +"value": "1gm0jxFTLuiWB5u4esEjzoCPImrVqu0AEMIKBIesTf9M", +"cachedResultUrl": "https://docs.google.com/document/d/1gm0jxFTLuiWB5u4esEjzoCPImrVqu0AEMIKBIesTf9M/edit?usp=drivesdk", +"cachedResultName": "Udit Rawat - Details" +}, +"options": { +"googleFileConversion": { +"conversion": { +"docsToFormat": "text/plain" +} +} +}, +"operation": "download" +}, +"credentials": { +"googleDriveOAuth2Api": { +"id": "SsiQguNA8w3Wwv4w", +"name": "Auto: Google Drive" +} +}, +"typeVersion": 3 +}, +{ +"id": "2bed3d0f-3d65-4394-87f1-e73320a43a4a", +"name": "Extract Text Data From Google Document", +"type": "n8n-nodes-base.extractFromFile", +"position": [ +440, +0 +], +"parameters": { +"options": {}, +"operation": "text" +}, +"typeVersion": 1 +}, +{ +"id": "837fa691-6c66-434b-ba82-d1cad9aecdf7", +"name": "Split Document Text Into Sections", +"type": "n8n-nodes-base.code", +"position": [ +660, +0 +], +"parameters": { +"jsCode": "let split_text = \"—---------------------------—-------------[SECTIONEND]—---------------------------—-------------\";\nfor (const item of $input.all()) {\n item.json.section = item.json.data.split(split_text);\n item.json.document = JSON.stringify(item.json.section)\n}\nreturn $input.all();" +}, +"typeVersion": 2 +}, +{ +"id": "cc801e7e-e01b-421a-9211-08322ef8a0b2", +"name": "Prepare Sections For Looping", +"type": "n8n-nodes-base.splitOut", +"position": [ +880, +0 +], +"parameters": { +"options": {}, +"fieldToSplitOut": "section" +}, +"typeVersion": 1 +}, +{ +"id": "658cb8df-92e3-4b25-8f37-e5f959d913dc", +"name": "Sticky Note", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-40, +-100 +], +"parameters": { +"width": 1300, +"height": 280, +"content": "## Prepare Document. \nThis section is responsible for downloading the file from Google Drive, splitting the text into sections by detecting separators, and preparing them for looping." +}, +"typeVersion": 1 +}, +{ +"id": "82ee9194-484a-46db-b75c-bec34201c7e2", +"name": "Sticky Note1", +"type": "n8n-nodes-base.stickyNote", +"position": [ +-220, +220 +], +"parameters": { +"width": 780, +"height": 360, +"content": "## Prepare context\nIn this section, the \nagent node will prepare \ncontext for a section \n(chunk of text), which \nwill then be passed for \nconversion into a vectors \nalong with the section itself." +}, +"typeVersion": 1 +}, +{ +"id": "2f6950df-ead1-479a-aa51-7768121a4eb2", +"name": "AI Agent - Prepare Context", +"type": "@n8n/n8n-nodes-langchain.agent", +"position": [ +40, +260 +], +"parameters": { +"text": "=Time Posted: Just now
\nAuthor: AI Research Team
\nTag: AI Models
\nDeepSeek V3 is a state-of-the-art AI model that leverages\n advanced architectures and techniques to deliver high performance across various applications.\n This overview covers its key concepts, practical applications, advantages, limitations, and best\n practices for implementation.
\n1. Mixture-of-Experts (MoE) Architecture: DeepSeek V3\n employs a Mixture-of-Experts (MoE) architecture, which consists of multiple neural networks,\n each optimized for different tasks. This architecture allows for efficient processing by\n activating only a portion of the network for each task, reducing hardware costs.
\n2. Parameters: The model boasts a total of 671\n billion\n parameters, with 37 billion active parameters for each token during processing. The addition\n of\n the Multi-Token Prediction (MTP) module increases the total parameters to 685 billion,\n making it\n significantly larger than other models like Meta's Llama 3.1 (405B).
\n3. Multi-head Latent Attention (MLA): DeepSeek V3\n uses\n Multi-head Latent Attention (MLA) to extract key details from text multiple times, improving\n its\n accuracy.
\n4. Multi-Token Prediction (MTP): The model utilizes\n Multi-Token Prediction to generate several tokens at once, speeding up inference and\n enabling\n speculative decoding.
\n\n DeepSeek V3 employs a Mixture-of-Experts architecture for efficient processing.\n
\n DeepSeek V3 democratizes AI access for smaller organizations.\n
\n DeepSeek V3 processes information at 60 tokens per second.\n
\n Deployment of DeepSeek V3 may be complex for small companies.\n
\n Engage with the open-source community for better implementation.\n
Hashtags: #DeepSeekV3 #AI #MachineLearning #OpenSource
\n