I am trying to build a workflow where I get to create New Policies or update existing policies on command and send for approval.
I want something like
Trigger (Manual) - Search for the document - If exists Update through Open Ai or searching Search Engine - I does not exist - Create new Content/Policy - send for approval - Once approved - Upload on ClickUp OR Monday.com
</{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-700,
560
],
“id”: “e73c716b-e155-4674-bc7c-d3a058ad51ad”,
“name”: “When Click”
},
{
“parameters”: {
“resource”: “fileFolder”,
“queryString”: “N8N CC”,
“returnAll”: true,
“filter”: {
“driveId”: {
“__rl”: true,
“value”: “My Drive”,
“mode”: “list”,
“cachedResultName”: “My Drive”,
“cachedResultUrl”: “https://drive.google.com/drive/my-drive”
}
},
“options”: {
“fields”:
}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
-480,
560
],
“id”: “6fa44b12-7503-42ba-8efa-c5e30acbb842”,
“name”: “Google Drive2”,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “JNrDWBNF5tKknPjZ”,
“name”: “Google Drive account 2”
}
}
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: false,
“leftValue”: “”,
“typeValidation”: “loose”,
“version”: 2
},
“conditions”: [
{
“id”: “f53f8494-9e4f-48cd-9f35-056df8e27642”,
“leftValue”: “=Update”,
“rightValue”: “Update”,
“operator”: {
“type”: “object”,
“operation”: “exists”,
“singleValue”: true
}
},
{
“id”: “e69d38cd-0148-4a69-9044-c7631155ad75”,
“leftValue”: “Create New”,
“rightValue”: “Create New”,
“operator”: {
“type”: “object”,
“operation”: “notExists”,
“singleValue”: true
}
}
],
“combinator”: “or”
},
“looseTypeValidation”: true,
“options”: {
“ignoreCase”: true
}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.2,
“position”: [
-220,
560
],
“id”: “1a0dfd86-9b3e-4151-a09a-7eb0dc9e0e02”,
“name”: “If”
},
{
“parameters”: {
“title”: “N8N CC”
},
“type”: “n8n-nodes-base.googleDocs”,
“typeVersion”: 2,
“position”: [
180,
660
],
“id”: “29d86168-0442-42cd-a4b5-587949d38880”,
“name”: “Google Docs1”,
“credentials”: {
“googleDocsOAuth2Api”: {
“id”: “hVFSZCJLhtTxpmpq”,
“name”: “Google Docs account 2”
}
}
},
{
“parameters”: {
“agent”: “conversationalAgent”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 1.7,
“position”: [
400,
660
],
“id”: “fa79537e-e390-4bec-ba7e-c2d25354b565”,
“name”: “AI Agent”
},
{
“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”: [
340,
920
],
“id”: “25ee3f87-d09a-4998-9674-7cbf7cf44366”,
“name”: “OpenAI Chat Model”,
“credentials”: {
“openAiApi”: {
“id”: “0v0ml7iZ7v4FIWUz”,
“name”: “OpenAi account 2”
}
}
},
{
“parameters”: {},
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.3,
“position”: [
520,
920
],
“id”: “7aba596b-b451-44fc-969c-e85908888368”,
“name”: “Window Buffer Memory”
},
{
“parameters”: {
“toolDescription”: “Right down the Data Privacy Policy”,
“url”: “https://www.google.co.uk/”
},
“type”: “@n8n/n8n-nodes-langchain.toolHttpRequest”,
“typeVersion”: 1.1,
“position”: [
660,
920
],
“id”: “90a9cb58-8ce4-4119-a433-3c90fce3f22c”,
“name”: “HTTP Request1”
}
],
“connections”: {
“When Click”: {
“main”: [
[
{
“node”: “Google Drive2”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Drive2”: {
“main”: [
[
{
“node”: “If”,
“type”: “main”,
“index”: 0
}
]
]
},
“If”: {
“main”: [
,
[
{
“node”: “Google Docs1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Docs1”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“OpenAI Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Window Buffer Memory”: {
“ai_memory”: [
[
{
“node”: “AI Agent”,
“type”: “ai_memory”,
“index”: 0
}
]
]
},
“HTTP Request1”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “7e1af607913e961aafcad9555ba4fff5865cc62bd6c09dc08b5c73edcee980e9”
}
}>