{
  "name": "Automated web scraping: email a CSV, save to Google Sheets & Microsoft Excel",
  "nodes": [
    {
      "id": "c3ef40df-084e-435c-9a11-3aa0a2f94f36",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        380,
        540
      ]
    },
    {
      "id": "e0583472-a450-4582-83bc-84a014bea543",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1040,
        540
      ]
    },
    {
      "id": "f9cbdb05-c249-4ccb-b3c5-f2eb8861f811",
      "name": "Convert to CSV File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1820,
        540
      ]
    },
    {
      "id": "1ecb45ee-659e-42a9-919d-6a3ebed0b836",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        100
      ],
      "parameters": {
        "width": null,
        "height": 184.90255200662574,
        "content": "### You need to setup Microsoft Azure credentials with Microsoft Graph permissions."
      }
    },
    {
      "id": "1d4bcfad-feae-4317-9012-7e03a6203d91",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1900,
        100
      ],
      "parameters": {
        "width": null,
        "height": 183.1237982918667,
        "content": "### Unlike Google Sheets where we did not need to have a certain format, here we need to create the column headers, otherwise the appending to the sheet won't work."
      }
    },
    {
      "id": "4248ddb3-11c0-41e3-be81-ce4ec92923ee",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2020,
        740
      ],
      "parameters": {
        "width": null,
        "height": 135.09744799337426,
        "content": "### For these steps to work you will need to have Drive, Sheets and Gmail APIs enabled in your Google Cloud Account"
      }
    },
    {
      "id": "d17174fe-8015-453a-b439-43eb3245d7cb",
      "name": "Extract all books from the page",
      "type": "n8n-nodes-base.html",
      "position": [
        820,
        540
      ]
    },
    {
      "id": "5de66b0a-9138-42e3-857a-3060c71776a9",
      "name": "Sort by price",
      "type": "n8n-nodes-base.sort",
      "position": [
        1480,
        540
      ]
    },
    {
      "id": "b8c539ce-292c-4b67-83b2-b397cfc5bb97",
      "name": "Extract individual book price",
      "type": "n8n-nodes-base.html",
      "position": [
        1260,
        540
      ]
    },
    {
      "id": "b8aa573d-5b63-4669-900f-bcc915b6ad41",
      "name": "Save to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1820,
        760
      ]
    },
    {
      "id": "97bdbc85-84b3-4463-9b98-5d40b80a3a1a",
      "name": "Save to Microsoft Excel 365",
      "type": "n8n-nodes-base.microsoftExcel",
      "position": [
        1820,
        320
      ]
    },
    {
      "id": "4078dc06-0497-4579-a6f4-8c314307aab8",
      "name": "Send CSV via e-mail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2040,
        540
      ]
    },
    {
      "id": "8ddca560-8da7-4090-b865-0523f95ca463",
      "name": "Fetch website content",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        600,
        540
      ]
    },
    {
      "id": "450020e6-9f43-4652-be13-25cb5eb3584c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        60
      ],
      "parameters": {
        "width": 579,
        "height": 297,
        "content": "## Automated Web Scraping: email a CSV, save to Google Sheets & Microsoft Excel\n\nSet-up steps:\n1. Change the website to scrape in the \"Fetch website content\" node\n2. Configure Microsoft Azure credenti"
      }
    }
  ],
  "connections": {
    "Split Out": {
      "main": [
        [
          {
            "node": "Extract individual book price",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort by price": {
      "main": [
        [
          {
            "node": "Save to Microsoft Excel 365",
            "type": "main",
            "index": 0
          },
          {
            "node": "Convert to CSV File",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to CSV File": {
      "main": [
        [
          {
            "node": "Send CSV via e-mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch website content": {
      "main": [
        [
          {
            "node": "Extract all books from the page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract individual book price": {
      "main": [
        [
          {
            "node": "Sort by price",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "Fetch website content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract all books from the page": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}