{
  "name": "get domain proposal",
  "nodes": [
    {
      "parameters": {
        "promptType": "define",
        "text": "=Keyword:\n{{ $('Limit').item.json.keyword }}\n\nDescription:\n{{ $('Limit').item.json.Description }}\n\nCategory:\n{{ $json.category }}\n\nTrend Score:\n{{ $json['trend score'] }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "this is the secret souce of this workflow. I prefer not to disclose it for now."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        1800,
        280
      ],
      "id": "f62ddbd3-7668-4183-8bd3-6842c1290c60",
      "name": "AI Agent",
      "retryOnFail": true,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "jsonSchemaExample": "[\n  { \"keyword\":\"A; B; C\",\n    \"category\": \"SaaS\",\n    \"trend score\": 7,\n    \"domain\": \"Alice.com\", \n    \"fit score\": 8,\n    \"strategy\": \"build a service that creates a story building tool. It will offer premium service for story with Alice.\"}\n]"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.2,
      "position": [
        2400,
        640
      ],
      "id": "dc891a5c-ee1c-4fbb-9717-051e4044382f",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "fieldToSplitOut": "output",
        "options": {}
      },
      "id": "57c5f50e-7d3c-4467-ac10-e2002afa2365",
      "name": "Make JSON Table",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        2320,
        280
      ],
      "typeVersion": 3
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1GN1Js6lLcsddZRz2315WvxCHunduR0KiDHzozq-GSxQ",
          "mode": "list",
          "cachedResultName": "domains",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GN1Js6lLcsddZRz2315WvxCHunduR0KiDHzozq-GSxQ/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Arkusz1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GN1Js6lLcsddZRz2315WvxCHunduR0KiDHzozq-GSxQ/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "keyword": "={{ $('Make JSON Table').item.json.keyword }}",
            "domain": "={{ $('Make JSON Table').item.json.domain }}",
            "trend score": "={{ $('Make JSON Table').item.json['trend score'] }}",
            "fit score": "={{ $('Make JSON Table').item.json['fit score'] }}",
            "category": "={{ $('Make JSON Table').item.json.category }}",
            "status": "NEW",
            "strategy": "={{ $json.strategy }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "domain",
              "displayName": "domain",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "trend score",
              "displayName": "trend score",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "fit score",
              "displayName": "fit score",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "available",
              "displayName": "available",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "registration cost",
              "displayName": "registration cost",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "min years",
              "displayName": "min years",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "renewal cost",
              "displayName": "renewal cost",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "expected value",
              "displayName": "expected value",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "ROI",
              "displayName": "ROI",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "strategy",
              "displayName": "strategy",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "useAppend": false
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2640,
        280
      ],
      "id": "9f873dc7-9b92-4a77-97e5-769232862a69",
      "name": "Save domain names proposal",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "84eyVFV4GuUZly7z",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "d1293183-ad90-419f-912e-1ca874c27900",
              "leftValue": "={{ $json.row_number }}",
              "rightValue": "",
              "operator": {
                "type": "number",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        60,
        220
      ],
      "id": "02d6a3b8-5745-4fca-9b6b-d59629c72586",
      "name": "If"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1rMrllCzGP70xiVzFhNEb_XZ_sIVw3qZ1rmc4e8RI8Fg",
          "mode": "list",
          "cachedResultName": "trends",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rMrllCzGP70xiVzFhNEb_XZ_sIVw3qZ1rmc4e8RI8Fg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 189663263,
          "mode": "list",
          "cachedResultName": "main",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rMrllCzGP70xiVzFhNEb_XZ_sIVw3qZ1rmc4e8RI8Fg/edit#gid=189663263"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "used",
              "lookupValue": "N"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -140,
        220
      ],
      "id": "50c756a0-8283-49d4-aa02-40edfca7a069",
      "name": "check new trends",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "84eyVFV4GuUZly7z",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1rMrllCzGP70xiVzFhNEb_XZ_sIVw3qZ1rmc4e8RI8Fg",
          "mode": "list",
          "cachedResultName": "trends",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rMrllCzGP70xiVzFhNEb_XZ_sIVw3qZ1rmc4e8RI8Fg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 189663263,
          "mode": "list",
          "cachedResultName": "main",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rMrllCzGP70xiVzFhNEb_XZ_sIVw3qZ1rmc4e8RI8Fg/edit#gid=189663263"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Limit').item.json.row_number }}",
            "used": "Y",
            "trend score": "={{ $json['trend score'] }}",
            "category": "={{ $json.category }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "aa",
              "displayName": "aa",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3m trend",
              "displayName": "3m trend",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "6m trend",
              "displayName": "6m trend",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "1y trend",
              "displayName": "1y trend",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2y trend",
              "displayName": "2y trend",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3y trend",
              "displayName": "3y trend",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "zero-weeks",
              "displayName": "zero-weeks",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "used",
              "displayName": "used",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Volume",
              "displayName": "Volume",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Trend",
              "displayName": "Trend",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Growth",
              "displayName": "Growth",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Description",
              "displayName": "Description",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "trend score",
              "displayName": "trend score",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1100,
        200
      ],
      "id": "556df634-ad96-4980-84ba-2764c30d9de9",
      "name": "update used trends",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "84eyVFV4GuUZly7z",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "085f9249-f046-4510-be99-e9191d5ab798",
              "name": "aa",
              "value": "={{ Math.random() }}",
              "type": "number"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        340,
        200
      ],
      "id": "a9fee179-e7ea-4f94-924a-f4361cdca63d",
      "name": "assign random value to rows"
    },
    {
      "parameters": {
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "aa"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.sort",
      "typeVersion": 1,
      "position": [
        500,
        200
      ],
      "id": "34a8208c-15cf-42cd-875b-ff83fb84b2a5",
      "name": "Sort"
    },
    {
      "parameters": {
        "keep": "lastItems"
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        680,
        200
      ],
      "id": "c05716fd-1d65-40a0-83eb-11086008511d",
      "name": "Limit"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -480,
        220
      ],
      "id": "5ae9bed7-fc3e-42ab-8be6-8d60ab6fb1a6",
      "name": "When clicking ‘Test workflow’"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9cd8eb41-2804-4673-aaf7-a0c86233286b",
              "name": "session_id",
              "value": 0,
              "type": "number"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -320,
        220
      ],
      "id": "32381826-1020-4b42-ad06-91b9b9e0a195",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        -480,
        20
      ],
      "id": "ad597a10-32b9-41fd-bc25-30fef938fa3f",
      "name": "Workflow Input Trigger"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "de03d1e4-efee-487b-b2ba-cc6ad127ff1d",
              "name": "response",
              "value": "No free records in 'trends'",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        80,
        680
      ],
      "id": "feb54a8e-34ff-4bc8-9c59-5241f444a1ed",
      "name": "no trends in file"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "DRxAfeuoAFVaWCxA",
          "mode": "list",
          "cachedResultName": "keyword classifier"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "keyword": "={{ $json.keyword }}"
          },
          "matchingColumns": [
            "keyword"
          ],
          "schema": [
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        920,
        200
      ],
      "id": "2d8e5856-5588-42ab-b481-b536f2703937",
      "name": "trend classifier"
    },
    {
      "parameters": {
        "content": "this section randomizes the trends database and select only a few for processing",
        "height": 400,
        "width": 520,
        "color": 2
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        0
      ],
      "typeVersion": 1,
      "id": "9de56bb9-7dca-4d7a-8041-dd0db9a3ebd9",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "this may be a weak point. Higher level WF will break if no proposal is returned ",
        "height": 940,
        "width": 260
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "typeVersion": 1,
      "id": "07e51e1b-c24d-45ec-bf79-ec466a33a5f0",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "# core step: take keyword, find similar records and propose domain name\n\nTo-do: \n- replace google sheet with more reliable database\n",
        "height": 840,
        "width": 1040
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1560,
        0
      ],
      "typeVersion": 1,
      "id": "bcb83e84-4bbc-46bc-9301-98643c2f5cbf",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "errorMessage": "There is no sufficient trends in a file"
      },
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        300,
        680
      ],
      "id": "44aab153-493a-44c9-a87a-f1fd537764ef",
      "name": "Stop and Error"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "b9db89ab-1bf0-4b59-b26b-570772188633",
              "leftValue": "={{ $('trend classifier').item.json.category }}",
              "rightValue": "SaaS",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            },
            {
              "id": "c57a73f9-f66b-45bc-9002-cbbf69637de8",
              "leftValue": "={{ $('trend classifier').item.json.category }}",
              "rightValue": "Online",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            },
            {
              "id": "bab01ece-a7c5-4e2e-a437-81ff76e3ccdd",
              "leftValue": "={{ $('trend classifier').item.json.category }}",
              "rightValue": "Product",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            },
            {
              "id": "89d4a9c5-d79f-4d4d-b3ea-1a4d3ba752e0",
              "leftValue": "={{ $('trend classifier').item.json.category }}",
              "rightValue": "Social",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            },
            {
              "id": "f421be80-0e67-4023-b70f-7d67075aa3b8",
              "leftValue": "={{ $('trend classifier').item.json.category }}",
              "rightValue": "Art",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            },
            {
              "id": "1388c097-ff48-4c4a-922e-0a1145125f34",
              "leftValue": "={{ $('trend classifier').item.json.category }}",
              "rightValue": "Sport",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            },
            {
              "id": "3ccfaf2c-d147-4b9f-8ac5-7af2c5946904",
              "leftValue": "={{ $('trend classifier').item.json.category }}",
              "rightValue": "Other",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1320,
        300
      ],
      "id": "37970a79-c3ef-4a04-a017-306cbd30c103",
      "name": "If1"
    },
    {
      "parameters": {
        "content": "# Compliance section\nCategories related to trademark companies/brands as well as one-off events are filtered out",
        "height": 460,
        "width": 620,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        0
      ],
      "typeVersion": 1,
      "id": "5faea517-ee52-441e-9791-3f8862d92ba0",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        1940,
        720
      ],
      "id": "cac8d053-b9be-47b7-8965-a67e3f0c4574",
      "name": "Embeddings OpenAI1",
      "credentials": {
        "openAiApi": {
          "id": "qUsMQk2UkySnDBhs",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolName": "trending_keywords",
        "toolDescription": "Pinecone vector store with keywords and trends",
        "pineconeIndex": {
          "__rl": true,
          "value": "trends",
          "mode": "list",
          "cachedResultName": "trends"
        },
        "topK": 5,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1,
      "position": [
        1900,
        560
      ],
      "id": "7fedd0aa-217d-450b-9e99-dc6c98f7ff5d",
      "name": "Pinecone Vector Store1",
      "credentials": {
        "pineconeApi": {
          "id": "1E3Vdvv751MDUKBb",
          "name": "PineconeApi account"
        }
      }
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "jwPbzxhSNqs6iGIt",
          "mode": "list",
          "cachedResultName": "check availability and cost"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "domain": "={{ $json.domain }}"
          },
          "matchingColumns": [
            "domain"
          ],
          "schema": [
            {
              "id": "domain",
              "displayName": "domain",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        2840,
        280
      ],
      "id": "bee09465-c7c5-447e-8150-19e9cad237a9",
      "name": "Check availability"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        3380,
        560
      ],
      "id": "9b0d35e5-7371-4747-a8e6-990a07f67bd8",
      "name": "No Operation, do nothing"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "9d226a8f-4d9b-44bd-a389-2630bc91d8da",
              "leftValue": "={{ $json.available }}",
              "rightValue": "Y",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3060,
        280
      ],
      "id": "d19fc111-02e4-479d-8a00-fd2076d15a51",
      "name": "isAvailable?"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "dXlAuNI6Zevj4KUL",
          "mode": "list",
          "cachedResultName": "value estimation"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "domain": "={{ $('Save domain names proposal').item.json.domain }}",
            "strategy": "={{ $('Save domain names proposal').item.json.strategy }}",
            "keyword": "={{ $('Save domain names proposal').item.json.keyword }}",
            "trend_score": 0
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "domain",
              "displayName": "domain",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "strategy",
              "displayName": "strategy",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "trend_score",
              "displayName": "trend_score",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "number",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        3260,
        260
      ],
      "id": "de3648d3-e694-4123-8e1f-92e3d35699e9",
      "name": "estimate value"
    },
    {
      "parameters": {
        "content": "## Update record\n** add info about availability, potential value in 12 months and ROI",
        "height": 820,
        "width": 900,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2780,
        0
      ],
      "typeVersion": 1,
      "id": "f8b80e10-022f-410e-a308-ced1c2c1c68d",
      "name": "Sticky Note4"
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "typeVersion": 1,
      "position": [
        2260,
        660
      ],
      "id": "0b8a3196-350c-4605-a6ba-720081951acf",
      "name": "Think"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "typeVersion": 1,
      "position": [
        1980,
        1180
      ],
      "id": "b13915b8-5b1a-4739-a82e-97c3131a6f00",
      "name": "DeepSeek Chat Model",
      "credentials": {
        "deepSeekApi": {
          "id": "0N2eY3c2kc1zj6Su",
          "name": "DeepSeek account"
        }
      }
    },
    {
      "parameters": {
        "errorMessage": "AI error"
      },
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        2640,
        540
      ],
      "id": "0263ea55-78b9-4907-a3c2-c1a6d250b83f",
      "name": "Stop and Error1"
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1GN1Js6lLcsddZRz2315WvxCHunduR0KiDHzozq-GSxQ",
          "mode": "list",
          "cachedResultName": "domains",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GN1Js6lLcsddZRz2315WvxCHunduR0KiDHzozq-GSxQ/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Arkusz1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GN1Js6lLcsddZRz2315WvxCHunduR0KiDHzozq-GSxQ/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ROI": "={{ Math.round(\n  (\n    ($json['expected value'] - $('Check availability').item.json.price - 100) \n      / \n    ($('Check availability').item.json.price + 100)\n  ) * 100\n\n) }}\n\n",
            "domain": "={{ $json.domain }}"
          },
          "matchingColumns": [
            "domain"
          ],
          "schema": [
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "domain",
              "displayName": "domain",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "trend score",
              "displayName": "trend score",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "fit score",
              "displayName": "fit score",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "available",
              "displayName": "available",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "registration cost",
              "displayName": "registration cost",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "min years",
              "displayName": "min years",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "renewal cost",
              "displayName": "renewal cost",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "expected value",
              "displayName": "expected value",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "ROI",
              "displayName": "ROI",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "strategy",
              "displayName": "strategy",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "useAppend": false
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        3460,
        260
      ],
      "id": "20d66235-6b0c-4e3e-a6e5-a0559da30531",
      "name": "ROI",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "84eyVFV4GuUZly7z",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "content": "## models podium\n\n\nGood\n\n\n\n\n\n\n\n\n\nMedium\n\n\n\n\n\n\n\n\n\nNot so good\n\n\n\n\n\n\nErrors",
        "height": 600,
        "width": 880,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        920
      ],
      "typeVersion": 1,
      "id": "221cab57-dad0-45cd-838b-8fa7fbb684c8",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "model": "gpt-4.1",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.1,
      "position": [
        1760,
        1020
      ],
      "id": "223e5e23-fa3b-495d-9c30-a94442d4c450",
      "name": "OpenAI GPT 4.1",
      "credentials": {
        "openAiApi": {
          "id": "qUsMQk2UkySnDBhs",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.5-pro-preview-03-25",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        1800,
        1180
      ],
      "id": "b3124951-bf49-4a1c-b8db-ee7cbecfa081",
      "name": "Gemini 2.5 pro-preview",
      "credentials": {
        "googlePalmApi": {
          "id": "YKA8u8ng8V8sdiqk",
          "name": "Google Gemini(PaLM) Api account"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-3-7-sonnet-20250219",
          "cachedResultName": "Claude 3.7 Sonnet"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        1760,
        1400
      ],
      "id": "b2425f88-a4bc-45af-94ae-3f1b9d7e952a",
      "name": "Sonnet 3.7",
      "credentials": {
        "anthropicApi": {
          "id": "JRU7Tp2pzzKIKImy",
          "name": "Anthropic account"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "o3-mini",
          "mode": "list",
          "cachedResultName": "o3-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1920,
        1020
      ],
      "id": "0e5c1fc6-ad89-4c55-b0cd-e401b4237ff8",
      "name": "03-mini",
      "credentials": {
        "openAiApi": {
          "id": "qUsMQk2UkySnDBhs",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-3-5-sonnet-20241022",
          "mode": "list",
          "cachedResultName": "Claude 3.5 Sonnet (New)"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        1940,
        1400
      ],
      "id": "c77a17ac-2bf0-4e43-8d97-8950b64dd195",
      "name": "Sonnet 3.5",
      "credentials": {
        "anthropicApi": {
          "id": "JRU7Tp2pzzKIKImy",
          "name": "Anthropic account"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        2060,
        1020
      ],
      "id": "ab7b7e1f-61dd-4cf2-ae30-c5d7e61fb483",
      "name": "GPT 4o-mini",
      "credentials": {
        "openAiApi": {
          "id": "qUsMQk2UkySnDBhs",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4.1-mini",
          "mode": "list",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1660,
        540
      ],
      "id": "2c5e4a40-db57-4d0d-9ab4-40821dd908e0",
      "name": "GPT 4.1-mini",
      "credentials": {
        "openAiApi": {
          "id": "qUsMQk2UkySnDBhs",
          "name": "OpenAi account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Make JSON Table",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop and Error1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Make JSON Table": {
      "main": [
        [
          {
            "node": "Save domain names proposal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "assign random value to rows",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "no trends in file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check new trends": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "assign random value to rows": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "trend classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "check new trends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Input Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "trend classifier": {
      "main": [
        [
          {
            "node": "update used trends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "update used trends": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "no trends in file": {
      "main": [
        [
          {
            "node": "Stop and Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "check new trends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Save domain names proposal": {
      "main": [
        [
          {
            "node": "Check availability",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check availability": {
      "main": [
        [
          {
            "node": "isAvailable?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isAvailable?": {
      "main": [
        [
          {
            "node": "estimate value",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "estimate value": {
      "main": [
        [
          {
            "node": "ROI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        []
      ]
    },
    "OpenAI GPT 4.1": {
      "ai_languageModel": [
        []
      ]
    },
    "Gemini 2.5 pro-preview": {
      "ai_languageModel": [
        []
      ]
    },
    "Sonnet 3.7": {
      "ai_languageModel": [
        []
      ]
    },
    "03-mini": {
      "ai_languageModel": [
        []
      ]
    },
    "Sonnet 3.5": {
      "ai_languageModel": [
        []
      ]
    },
    "GPT 4o-mini": {
      "ai_languageModel": [
        []
      ]
    },
    "GPT 4.1-mini": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "000e5eb7-12df-4391-a515-a146c3d08ef0",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "ad40adec569e15004ae6dc5cabbb87e8497c456c1b4ed9229780cd08a14f93a2"
  },
  "id": "OPveWCUFB6OHMwKs",
  "tags": [
    {
      "createdAt": "2025-04-09T18:31:32.951Z",
      "updatedAt": "2025-04-09T18:31:32.951Z",
      "id": "At8yHoHPgHxzPg79",
      "name": "new domain"
    }
  ]
}
