{
  "name": "Clean company names for cold emails with GPT-4 Mini and Google Sheets",
  "nodes": [
    {
      "id": "fce88a0b-ba03-4657-8d7c-62a96bb12d50",
      "name": "Get Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        260,
        -35
      ]
    },
    {
      "id": "73e028cc-a9e0-4bf1-ac13-5fb9a5e937da",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        480,
        60
      ]
    },
    {
      "id": "1b43f3d4-d9d6-4929-8fad-dc9f884feff9",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        660,
        60
      ]
    },
    {
      "id": "15fe57a0-4cd5-4907-b9cf-103d5be6cdc7",
      "name": "Clean Company Name",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        480,
        -160
      ]
    },
    {
      "id": "5d61e2e3-f881-4919-87ae-5af5a62e12a1",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        856,
        -35
      ]
    },
    {
      "id": "11b87495-d6a1-4e72-a019-efbb44a7c8dc",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1076,
        -35
      ]
    },
    {
      "id": "1883c284-9adf-43e5-8461-d419f112379a",
      "name": "Save Output",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1300,
        -40
      ]
    },
    {
      "id": "602d2068-9694-4722-ac83-909a37bc0c4c",
      "name": "Create Destination Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        40,
        -35
      ]
    },
    {
      "id": "dd66b31e-aaa1-4e23-95e7-da2e62e9dc99",
      "name": "On Form Submit",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -180,
        -35
      ]
    },
    {
      "id": "ecb26e43-a1fb-4d08-b871-444c7f0d4b75",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -340
      ],
      "parameters": {
        "width": 660,
        "height": 560,
        "content": "## Prep and save output\nHere we merge in the LLM's output with the original lead data and save everything back to the new sheet we created earlier in the workflow."
      }
    },
    {
      "id": "ae44d84f-f177-4b01-ab27-29dda23f53d8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -340
      ],
      "parameters": {
        "width": 620,
        "height": 560,
        "content": "## Fetch the lead data\nWhen a form is submitted with the url to a Google Sheet with the lead data, we create a new sheet in the document that we will use to store the results and fetch all the lead da"
      }
    },
    {
      "id": "3beae3d0-d242-4430-8d3d-bd0e24cad78f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        -340
      ],
      "parameters": {
        "width": 380,
        "height": 560,
        "content": "## Clean up the company name with AI\n**Important**: For better results, update the system prompt with more specific examples based on the company industry / patterns in your lead data."
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Leads": {
      "main": [
        [
          {
            "node": "Clean Company Name",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Save Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On Form Submit": {
      "main": [
        [
          {
            "node": "Create Destination Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Clean Company Name",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Clean Company Name": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Destination Sheet": {
      "main": [
        [
          {
            "node": "Get Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Clean Company Name",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}