{
  "id": "jpDailyJobsSheet",
  "name": "JobsPipe: daily new jobs to Google Sheets",
  "nodes": [
    {
      "parameters": {
        "content": "## JobsPipe: new jobs to Google Sheets, daily\n\n1. Create a **Header Auth** credential named `JobsPipe API`: name `Authorization`, value `Bearer jp_live_...`.\n2. Edit the JSON body in **Search new jobs** (titles, countries, any filter from docs.jobspipe.dev/api-reference/filters).\n3. Pick your spreadsheet in **Add or update rows**. Row 1 of the sheet needs the column names used there (`id`, `job_title`, ...).\n\nEach run asks only for postings JobsPipe discovered in the last 25 hours (`discovered_at_gte`). The extra hour overlaps the previous run; overlapping jobs cost no credits again this month, and rows are matched on `id`, so nothing is duplicated.\n\nCost: 1 credit per job returned, once per calendar month.",
        "height": 380,
        "width": 560
      },
      "id": "0be457c9-b81d-5800-bf1d-cdd92035e680",
      "name": "About this template",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -260,
        -420
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "days",
              "triggerAtHour": 7
            }
          ]
        }
      },
      "id": "2f504e8a-adcc-521a-a1c8-99aa31f22fbc",
      "name": "Every day at 07:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.jobspipe.dev/v1/jobs/search",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"job_title_or\": [\"data engineer\", \"analytics engineer\"],\n  \"job_country_code_or\": [\"US\"],\n  \"discovered_at_gte\": \"{{ $now.toUTC().minus({ hours: 25 }).toFormat('yyyy-MM-dd HH:mm:ss') }}\",\n  \"limit\": 100\n}",
        "options": {
          "timeout": 60000,
          "pagination": {
            "pagination": {
              "paginationMode": "updateAParameterInEachRequest",
              "parameters": {
                "parameters": [
                  {
                    "type": "body",
                    "name": "cursor",
                    "value": "={{ $response.body.metadata.next_cursor }}"
                  }
                ]
              },
              "paginationCompleteWhen": "other",
              "completeExpression": "={{ !$response.body.metadata.next_cursor }}",
              "limitPagesFetched": true,
              "maxRequests": 10,
              "requestInterval": 600
            }
          }
        }
      },
      "id": "1f51bdcb-6488-5613-8d30-1153ac455a27",
      "name": "Search new jobs",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        220,
        0
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "JobsPipe API"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "data",
        "options": {}
      },
      "id": "415ddda8-390c-558b-95d6-68cc5704e1d3",
      "name": "One item per job",
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        440,
        0
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "",
          "mode": "url"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "id": "={{ $json.id }}",
            "job_title": "={{ $json.job_title }}",
            "company": "={{ $json.company }}",
            "location": "={{ $json.location }}",
            "url": "={{ $json.url }}",
            "date_posted": "={{ $json.date_posted }}",
            "salary_string": "={{ $json.salary_string }}",
            "min_annual_salary": "={{ $json.min_annual_salary }}",
            "max_annual_salary": "={{ $json.max_annual_salary }}",
            "salary_currency": "={{ $json.salary_currency }}",
            "discovered_at": "={{ $json.discovered_at }}"
          },
          "matchingColumns": [
            "id"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "job_title",
              "displayName": "job_title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "company",
              "displayName": "company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "location",
              "displayName": "location",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "displayName": "url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "date_posted",
              "displayName": "date_posted",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "salary_string",
              "displayName": "salary_string",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "min_annual_salary",
              "displayName": "min_annual_salary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true
            },
            {
              "id": "max_annual_salary",
              "displayName": "max_annual_salary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true
            },
            {
              "id": "salary_currency",
              "displayName": "salary_currency",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "discovered_at",
              "displayName": "discovered_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "754dd710-754d-5e0b-8c2a-0aeca7fadc3c",
      "name": "Add or update rows",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        660,
        0
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "connections": {
    "Every day at 07:00": {
      "main": [
        [
          {
            "node": "Search new jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search new jobs": {
      "main": [
        [
          {
            "node": "One item per job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "One item per job": {
      "main": [
        [
          {
            "node": "Add or update rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "tags": []
}
