{
  "id": "CsAeAdjSA8YRn8rh",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Personalize IJSHI",
  "tags": [],
  "nodes": [
    {
      "id": "d50c5e29-8a78-4453-b0e2-d7d4f557c759",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -380,
        -60
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "11a807b9-b215-4167-8839-cd4151ce7caf",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -160,
        -60
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "icebreaker"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1558745101,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1pQVwVFZ99hCjktMy-YDF3nYmZLL4yheF10OR5-7Apbw/edit#gid=1558745101",
          "cachedResultName": "Copy of Indeed JSHI"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1pQVwVFZ99hCjktMy-YDF3nYmZLL4yheF10OR5-7Apbw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1pQVwVFZ99hCjktMy-YDF3nYmZLL4yheF10OR5-7Apbw/edit?usp=drivesdk",
          "cachedResultName": "Leads Gen DB i1"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "836d33ad-9455-4d92-b9b7-7eb49c1b6e80",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        -160
      ],
      "parameters": {
        "width": 1160,
        "height": 300,
        "content": "## AI Personal Icebreaker generation"
      },
      "typeVersion": 1
    },
    {
      "id": "67b2cce9-9289-426f-8cd3-89b7e65aad85",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -300
      ],
      "parameters": {
        "color": 3,
        "width": 440,
        "height": 240,
        "content": "## Note \nPart two of the Indeed Job Scraper, Filter and Enrichment workflow, this workflow takes information about the scraped and filtered job listings on Indeed via Apify, which is stored in Google Sheets to generate a customized, five-line email icebreaker to imply that the rest of the icebreaker is personalized. Personalized IJSFE (Indeed Job Scraper For Enrichment).\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8c36adcd-c521-4f0e-a184-1075ca8695d8",
      "name": "Personalization",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        60,
        -60
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {
          "temperature": 0.8
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You're a helpful, intelligent writing assistant."
            },
            {
              "content": "=Your task is to take, as input, a bunch of information about a job posting and company, and then generate a customized, five-line email icebreaker to imply that the rest of your comunique is personalized.\n\nYou'll return your icebreakers in the following JSON format:\n\n{\"icebreaker\":\"Hey {Name}, Love {thingaboutcompany}--also a fan of {otherinterestingthingaboutjobdescription}. Wanted to run something by you.\n\nI put something interesting together a few months ago that works well. To make a long story short, it\u2019s {solutiontojob} that uses AI to {dowhatjobdescriptionwants}. Costs just a few cents to run.\"}\n\nRules:\n- Write in a Spartan/laconic tone of voice.\n- Keep things short\n- Try to imply familiarity slightly--i.e if you see an opportunity to imply that I like the same things, believe the same things, or want the same things they do, don't go overboard, keep it light and subtle.\n- Make sure to use the above formula when constructing your icebreakers.\n- Make use of acronyms, shorten the company name, locations, etc, where possible (say, \"XYZ\" instead of \"XYZ Agency\", \"AMS\" instead of \"AMS Professional Services\", \"Wellington\" instead of \"The Wellington Agency\", \"San Fran\" instead of \"San Francisco\", \"BC\" instead of \"British Columbia\"). Do so whenever possible.\n- After \"Hey {firstName},\" always insert \"\\n\\n\"."
            },
            {
              "content": "={\n\u201cfirstName\u201d:\u201c{{ $json['companyCeo/name'] }}\u201d,\n\u201cjobTitle\u201d:\u201c{{ $json.title }}\u201d,\n\u201cjobdescription\u201d:\u201c{{ $json.descriptionText }}\u201d,\n\u201ccompanyName\u201d:\u201c{{ $json.companyName }}\u201d,\n\u201ccompanyDescription\u201d:\u201c{{ $json.companyDescription }}\u201d\n}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "typeVersion": 1.8
    },
    {
      "id": "eff4a4a2-958a-4d39-a4d0-dfed7ea76140",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        460,
        -60
      ],
      "parameters": {
        "columns": {
          "value": {
            "email": "={{ $('Get row(s) in sheet').item.json.email }}",
            "title": "={{ $('Get row(s) in sheet').item.json.title }}",
            "jobUrl": "={{ $('Get row(s) in sheet').item.json.jobUrl }}",
            "isRemote": "={{ $('Get row(s) in sheet').item.json.isRemote }}",
            "jobType/0": "={{ $('Get row(s) in sheet').item.json['jobType/0'] }}",
            "icebreaker": "={{ $json.message.content.icebreaker }}",
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "scrapedCeo": "={{ $('Get row(s) in sheet').item.json.scrapedCeo }}",
            "companyName": "={{ $('Get row(s) in sheet').item.json.companyName }}",
            "companyCeo/name": "={{ $('Get row(s) in sheet').item.json['companyCeo/name'] }}",
            "descriptionText": "={{ $('Get row(s) in sheet').item.json.descriptionText }}",
            "location/country": "={{ $('Get row(s) in sheet').item.json['location/country'] }}",
            "salary/salaryText": "={{ $('Get row(s) in sheet').item.json['salary/salaryText'] }}",
            "companyDescription": "={{ $('Get row(s) in sheet').item.json.companyDescription }}",
            "companyNumEmployees": "={{ $('Get row(s) in sheet').item.json.companyNumEmployees }}",
            "hiringDemand/isUrgentHire": "={{ $('Get row(s) in sheet').item.json['hiringDemand/isHighVolumeHiring'] }}",
            "companyLinks/corporateWebsite": "={{ $('Get row(s) in sheet').item.json['companyLinks/corporateWebsite'] }}",
            "hiringDemand/isHighVolumeHiring": "={{ $('Get row(s) in sheet').item.json['hiringDemand/isHighVolumeHiring'] }}"
          },
          "schema": [
            {
              "id": "jobUrl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "jobUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "descriptionText",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "descriptionText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hiringDemand/isHighVolumeHiring",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "hiringDemand/isHighVolumeHiring",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hiringDemand/isUrgentHire",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "hiringDemand/isUrgentHire",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "isRemote",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "isRemote",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "jobType/0",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "jobType/0",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyCeo/name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyCeo/name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "icebreaker",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "icebreaker",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "scrapedCeo",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "scrapedCeo",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyDescription",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyDescription",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyLinks/corporateWebsite",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyLinks/corporateWebsite",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyNumEmployees",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyNumEmployees",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "location/country",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "location/country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "salary/salaryText",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "salary/salaryText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1558745101,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1pQVwVFZ99hCjktMy-YDF3nYmZLL4yheF10OR5-7Apbw/edit#gid=1558745101",
          "cachedResultName": "Copy of Indeed JSHI"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1pQVwVFZ99hCjktMy-YDF3nYmZLL4yheF10OR5-7Apbw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1pQVwVFZ99hCjktMy-YDF3nYmZLL4yheF10OR5-7Apbw/edit?usp=drivesdk",
          "cachedResultName": "Leads Gen DB i1"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b70ebe04-1243-46d8-9267-e014dbc3c088",
  "connections": {
    "Personalization": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Personalization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}