{
  "id": "aNbW3auW0XHMkImG",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Automated NASA Tech Scout & Outreach Generator",
  "tags": [],
  "nodes": [
    {
      "id": "a78f8ab3-619a-46a5-b5cf-11a0c5dfbb8b",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -320,
        176
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "fe29f03a-89a7-4f43-80c2-c971ad6226f3",
      "name": "Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -96,
        176
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "278784d0-256d-466d-9615-568853b0638e",
              "name": "keyword",
              "type": "string",
              "value": "robotics"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "375ededb-84ca-4e62-913b-46cb9afc11aa",
      "name": "NASA Patents API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        128,
        176
      ],
      "parameters": {
        "url": "=https://api.nasa.gov/techtransfer/patent/?engine&query={{ $json.keyword }}&api_key=<__PLACEHOLDER_VALUE__NASA API Key__>",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "401cf1b9-df27-46a0-b5e5-b9ab18cdd10b",
      "name": "Loop Over Patents",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        352,
        176
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "6ca7ad96-4d87-44c2-a430-7e15f4373e14",
      "name": "Google Search - Find Company",
      "type": "@apify/n8n-nodes-preview-apify.apify",
      "position": [
        624,
        176
      ],
      "parameters": {
        "resource": "Actors",
        "operation": "Run actor"
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "5e1e3825-45e8-4dcf-a5e4-eb874eb12dfe",
      "name": "Extract Company URL",
      "type": "n8n-nodes-base.code",
      "position": [
        848,
        176
      ],
      "parameters": {
        "jsCode": "const results = items[0].json.organicResults;\nreturn results && results.length > 0 ? [{ json: { targetUrl: results[0].url, companyName: results[0].title } }] : [];"
      },
      "typeVersion": 2
    },
    {
      "id": "12e136d9-0278-43ea-a9cc-161deb557723",
      "name": "Crawl Company Website",
      "type": "@apify/n8n-nodes-preview-apify.apify",
      "position": [
        1072,
        176
      ],
      "parameters": {
        "resource": "Actors",
        "operation": "Run actor"
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "898e985c-8075-4270-950b-600899906be3",
      "name": "Analyze Fit & Draft Email",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1424,
        176
      ],
      "parameters": {
        "operation": "message"
      },
      "typeVersion": 2
    },
    {
      "id": "0ea4331f-ad57-4387-abdd-fbf647ce3ac1",
      "name": "High Score Filter",
      "type": "n8n-nodes-base.if",
      "position": [
        1712,
        176
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "regex"
              },
              "leftValue": "={{ $json.score }}",
              "rightValue": "S|A"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6e6574a4-7934-4714-a46d-336aa1d97bf5",
      "name": "Google Search - Find LinkedIn",
      "type": "@apify/n8n-nodes-preview-apify.apify",
      "position": [
        1984,
        176
      ],
      "parameters": {
        "resource": "Actors",
        "operation": "Run actor"
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "719cb055-3aff-4c13-92f1-a39a3525f841",
      "name": "Create Notion Lead",
      "type": "n8n-nodes-base.notion",
      "position": [
        2208,
        176
      ],
      "parameters": {
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Notion Database ID for Startup Leads__>"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Company|rich_text",
              "type": "rich_text",
              "textContent": "={{ $('Extract Company URL').item.json.companyName }}"
            },
            {
              "key": "Website|url",
              "type": "url",
              "urlValue": "={{ $('Extract Company URL').item.json.targetUrl }}"
            },
            {
              "key": "LinkedIn|url",
              "type": "url",
              "urlValue": "={{ $json.organicResults[0].url }}"
            },
            {
              "key": "Email|email",
              "type": "email",
              "emailValue": "={{ $('Analyze Fit & Draft Email').item.json.email }}"
            },
            {
              "key": "Score|number",
              "type": "number",
              "numberValue": "={{ $('Analyze Fit & Draft Email').item.json.score }}"
            },
            {
              "key": "Draft Email|rich_text",
              "type": "rich_text",
              "textContent": "={{ $('Analyze Fit & Draft Email').item.json.draft_email }}"
            },
            {
              "key": "NASA Tech|rich_text",
              "type": "rich_text",
              "textContent": "={{ $('Loop Over Patents').item.json.title }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "16e177c1-9def-4482-b6c7-a9b9adef580a",
      "name": "Template Description",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -192
      ],
      "parameters": {
        "color": 2,
        "width": 557,
        "height": 774,
        "content": "## \ud83d\ude80 Automated NASA Tech Scout & Outreach Generator\n\nThis workflow automates the process of finding commercial partners for NASA patents. It scouts for startups, analyzes their fit using AI, and prepares outreach materials.\n\n### \ud83d\udc64 Who is this for?\n- Innovation Managers\n- Tech Transfer Offices\n- Business Development Reps\n\n### \ud83d\udca1 How it works\n1. **Search**: Fetches patents from NASA based on a keyword defined in the **Configuration** node.\n2. **Find**: Searches Google for startups related to the patent technology.\n3. **Enrich**: Crawls the startup's website to understand their business.\n4. **Analyze**: AI scores the fit between the patent and the startup and drafts an email.\n5. **Save**: High-scoring leads are enriched with LinkedIn data and saved to Notion.\n\n### \ud83d\udee0\ufe0f Setup\n1. **Configuration**: Set your search `keyword` in the \"Configuration\" node.\n2. **NASA API**: Replace the placeholder in the **NASA Patents API** node with your API key (get it from api.nasa.gov).\n3. **Apify**: Connect your Apify account. Ensure you have access to `google-search-scraper` and `website-content-crawler` actors.\n4. **OpenAI**: Connect your OpenAI API key.\n5. **Notion**: Create a database with properties: `Company` (Text), `Website` (URL), `LinkedIn` (URL), `Email` (Email), `Score` (Number), `Draft Email` (Text), `NASA Tech` (Text). Enter the Database ID in the Notion node."
      },
      "typeVersion": 1
    },
    {
      "id": "9ef81dac-4703-4dff-8a1e-e3e44e866e81",
      "name": "Step 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        16
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 100,
        "content": "### 1. Data Acquisition\nGet patent data and find potential companies."
      },
      "typeVersion": 1
    },
    {
      "id": "d4ffa419-385b-42c8-b518-200cb30789f5",
      "name": "Step 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 332,
        "height": 100,
        "content": "### 2. Enrichment & Analysis\nCrawl websites and use AI to determine fit."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "375cd56b-b6b4-45e5-8a20-bc0f5288bb64",
  "connections": {
    "Configuration": {
      "main": [
        [
          {
            "node": "NASA Patents API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NASA Patents API": {
      "main": [
        [
          {
            "node": "Loop Over Patents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High Score Filter": {
      "main": [
        [
          {
            "node": "Google Search - Find LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Patents": {
      "main": [
        [
          {
            "node": "Google Search - Find Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Company URL": {
      "main": [
        [
          {
            "node": "Crawl Company Website",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crawl Company Website": {
      "main": [
        [
          {
            "node": "Analyze Fit & Draft Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Fit & Draft Email": {
      "main": [
        [
          {
            "node": "High Score Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Search - Find Company": {
      "main": [
        [
          {
            "node": "Extract Company URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Search - Find LinkedIn": {
      "main": [
        [
          {
            "node": "Create Notion Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}