{
  "name": "E-book & Book Chapter Summarizer",
  "nodes": [
    {
      "parameters": {
        "content": "## \ud83d\udcda E-book Chapter Summarizer\n\n### What this workflow does\n1. Watches Google Drive for book chapter PDFs\n2. Downloads and extracts chapter details\n3. Parses themes, concepts, arguments, quotes\n4. Generates AI insights and takeaways\n5. Logs reading notes to Google Sheets\n6. Sends summary to Slack\n\n### Setup steps\n1. Get PDF Vector API key from pdfvector.com/api-keys\n2. Create Google Drive folder for book chapters\n3. Create Google Sheet with columns:\n   Book, Author, Chapter #, Chapter Title, Pages, Main Themes, Key Concepts, Arguments, Quotes Noted, Action Items, Main Takeaway, Read Date\n4. Update folder ID and spreadsheet ID in nodes\n5. Connect Slack for notifications\n\n### Perfect for\n- Book clubs\n- Students\n- Busy professionals\n- Content creators",
        "height": 628,
        "width": 476,
        "color": 5
      },
      "id": "cfda33dd-2ac3-457f-a1ea-ff0bee53fe1e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -80,
        0
      ]
    },
    {
      "parameters": {
        "content": "## \ud83d\udcdd Notes Generated\n\n- Chapter summaries\n- Key takeaways\n- Notable quotes\n- Vocabulary terms\n- Discussion questions\n- Action items",
        "height": 232,
        "width": 280
      },
      "id": "51e82376-fead-4529-b2dd-04803874af64",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        448,
        16
      ]
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "value": "YOUR_BOOKS_FOLDER_ID",
          "mode": "list",
          "cachedResultName": "Book Chapters"
        },
        "event": "fileCreated",
        "options": {}
      },
      "id": "0c9a1900-55a5-4867-bcf5-d5b56b551812",
      "name": "New Chapter",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        432,
        288
      ]
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "id": "8648822c-326c-43eb-963b-4314d3560fdc",
      "name": "Download Chapter",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        624,
        288
      ]
    },
    {
      "parameters": {
        "operation": "extract",
        "inputType": "file",
        "prompt": "Extract ebook or book chapter content as flat fields. bookTitle, authorName, chapterNumber, chapterTitle, pageRange, mainThemesList (comma-separated main themes), keyConceptsList (comma-separated key concepts), mainArgumentsList (semicolon-separated main arguments), statisticsList (semicolon-separated statistics or data points), notableQuotesList (semicolon-separated notable quotes with attribution), vocabularyList (comma-separated new terms or vocabulary), discussionQuestionsList (semicolon-separated discussion questions), actionItemsList (semicolon-separated actionable takeaways), chapterSummary (2-3 sentence summary of the chapter).",
        "schema": "{\"type\": \"object\", \"properties\": {\"bookTitle\": {\"type\": \"string\"}, \"authorName\": {\"type\": \"string\"}, \"chapterNumber\": {\"type\": \"string\"}, \"chapterTitle\": {\"type\": \"string\"}, \"pageRange\": {\"type\": \"string\"}, \"mainThemesList\": {\"type\": \"string\"}, \"keyConceptsList\": {\"type\": \"string\"}, \"mainArgumentsList\": {\"type\": \"string\"}, \"statisticsList\": {\"type\": \"string\"}, \"notableQuotesList\": {\"type\": \"string\"}, \"vocabularyList\": {\"type\": \"string\"}, \"discussionQuestionsList\": {\"type\": \"string\"}, \"actionItemsList\": {\"type\": \"string\"}, \"chapterSummary\": {\"type\": \"string\"}}, \"additionalProperties\": false}"
      },
      "id": "860df966-658b-428f-adfa-fd9c837c8df9",
      "name": "PDF Vector Extract",
      "type": "n8n-nodes-pdfvector.pdfVector",
      "typeVersion": 2,
      "position": [
        848,
        192
      ]
    },
    {
      "parameters": {
        "operation": "ask",
        "inputType": "file",
        "question": "Based on this book chapter, provide: 1) A 3-4 sentence summary, 2) The single most important insight, 3) How this connects to broader themes (if discernible), and 4) One practical application or action the reader could take based on this chapter."
      },
      "id": "d9b9e8d5-0117-4aeb-8169-abc94a7476ba",
      "name": "PDF Vector Insights",
      "type": "n8n-nodes-pdfvector.pdfVector",
      "typeVersion": 2,
      "position": [
        848,
        352
      ]
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1056,
        288
      ],
      "id": "e25e4e96-9b73-476d-b35a-6af56035fde1",
      "name": "Merge"
    },
    {
      "parameters": {
        "jsCode": "// After Merge: input[0] = PDF Vector Extract, input[1] = PDF Vector Insights\nconst allInputs = $input.all();\nconst extractData = (allInputs[0]?.json?.data || allInputs[0]?.json) || {};\nconst insightsData = allInputs[1]?.json || {};\nconst insights = insightsData.markdown || insightsData.answer || '';\n\nconst fileName = $('New Chapter').item.json.name;\nconst fileId   = $('New Chapter').item.json.id;\n\nconst quotes    = (extractData.notableQuotesList   || '').split(';').filter(q => q.trim());\nconst actions   = (extractData.actionItemsList     || '').split(';').filter(a => a.trim());\nconst arguments_= (extractData.mainArgumentsList   || '').split(';').filter(a => a.trim());\nconst concepts  = (extractData.keyConceptsList     || '').split(',').filter(c => c.trim());\nconst questions = (extractData.discussionQuestionsList || '').split(';').filter(q => q.trim());\n\nconst actionList   = actions.map(a   => `\u2192 ${a.trim()}`).join('\\n')      || 'None';\nconst quoteList    = quotes.map(q    => `\u275d ${q.trim()}`).join('\\n\\n')   || 'None';\nconst argumentList = arguments_.map((a,i) => `${i+1}. ${a.trim()}`).join('\\n') || 'None';\nconst questionsList = questions.map((q,i) => `${i+1}. ${q.trim()}`).join('\\n') || 'None';\n\nreturn [{ json: {\n  bookTitle:      extractData.bookTitle      || 'Unknown',\n  authorName:     extractData.authorName     || 'N/A',\n  author:         extractData.authorName     || 'N/A',\n  chapterNumber:  extractData.chapterNumber  || 'N/A',\n  chapterTitle:   extractData.chapterTitle   || 'N/A',\n  pageRange:      extractData.pageRange      || 'N/A',\n  mainThemesList: extractData.mainThemesList || 'N/A',\n  themesList:     extractData.mainThemesList || 'N/A',\n  keyConceptsList: extractData.keyConceptsList || 'N/A',\n  mainArgumentsList: extractData.mainArgumentsList || 'N/A',\n  notableQuotesList: extractData.notableQuotesList || 'N/A',\n  actionItemsList:   extractData.actionItemsList   || 'N/A',\n  chapterSummary:    extractData.chapterSummary    || 'N/A',\n  mainTakeaway:   insights,\n  aiInsights:     insights,\n  argumentList,  argumentCount: arguments_.length,\n  quoteList,     quoteCount:    quotes.length,\n  actionList,    actionCount:   actions.length,\n  conceptCount:  concepts.length,\n  questionsList,\n  fileName, fileId,\n  processedAt: new Date().toISOString()\n}}];"
      },
      "id": "ebeafa47-5c19-4546-bb64-28a2a1d05da3",
      "name": "Compile Notes",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1232,
        288
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "list",
          "cachedResultName": "Reading Log"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Book": "={{ $json.bookTitle }}",
            "Author": "={{ $json.authorName }}",
            "Chapter #": "={{ $json.chapterNumber }}",
            "Chapter Title": "={{ $json.chapterTitle }}",
            "Pages": "={{ $json.pageRange }}",
            "Main Themes": "={{ $json.mainThemesList }}",
            "Key Concepts": "={{ $json.keyConceptsList }}",
            "Arguments": "={{ $json.mainArgumentsList }}",
            "Quotes Noted": "={{ $json.quoteCount }}",
            "Action Items": "={{ $json.actionCount }}",
            "Main Takeaway": "={{ $json.mainTakeaway }}",
            "Read Date": "={{ $json.processedAt.split('T')[0] }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Book",
              "displayName": "Book",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Author",
              "displayName": "Author",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Chapter #",
              "displayName": "Chapter #",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Chapter Title",
              "displayName": "Chapter Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Pages",
              "displayName": "Pages",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Main Themes",
              "displayName": "Main Themes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Key Concepts",
              "displayName": "Key Concepts",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Arguments",
              "displayName": "Arguments",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Quotes Noted",
              "displayName": "Quotes Noted",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Action Items",
              "displayName": "Action Items",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Main Takeaway",
              "displayName": "Main Takeaway",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Read Date",
              "displayName": "Read Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ]
        },
        "options": {}
      },
      "id": "39c61b02-3ff7-4dc9-b6bc-27b4c791c0ae",
      "name": "Log to Reading Notes",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.4,
      "position": [
        1424,
        288
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "YOUR_SLACK_CHANNEL_ID",
          "mode": "list",
          "cachedResultName": "book-club"
        },
        "text": "=\ud83d\udcda *Chapter Summary*\n\n*Book:* {{ $('Compile Notes').item.json.bookTitle }}\n*Author:* {{ $('Compile Notes').item.json.author }}\n*Chapter:* {{ $('Compile Notes').item.json.chapterNumber || 'N/A' }} - {{ $('Compile Notes').item.json.chapterTitle }}\n\n\ud83d\udccb *Summary Stats:*\n\u2022 Themes: {{ $('Compile Notes').item.json.themesList }}\n\u2022 Key Concepts: {{ $('Compile Notes').item.json.conceptCount }}\n\u2022 Arguments: {{ $('Compile Notes').item.json.argumentCount }}\n\u2022 Quotes: {{ $('Compile Notes').item.json.quoteCount }}\n\u2022 Action Items: {{ $('Compile Notes').item.json.actionCount }}\n\n\ud83d\udca1 *Main Takeaway:*\n{{ $('Compile Notes').item.json.mainTakeaway }}\n\n\ud83e\udde0 *AI Insights:*\n{{ $('Compile Notes').item.json.aiInsights }}\n\n\u2753 *Discussion Questions:*\n{{ $('Compile Notes').item.json.questionsList }}\n\n\ud83d\udd17 <https://drive.google.com/file/d/{{ $('Compile Notes').item.json.fileId }}/view|View Chapter>",
        "otherOptions": {}
      },
      "id": "30ea618e-b625-440a-bf26-0de27f30cd60",
      "name": "Send to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        1632,
        288
      ]
    }
  ],
  "connections": {
    "New Chapter": {
      "main": [
        [
          {
            "node": "Download Chapter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Chapter": {
      "main": [
        [
          {
            "node": "PDF Vector Extract",
            "type": "main",
            "index": 0
          },
          {
            "node": "PDF Vector Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PDF Vector Extract": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PDF Vector Insights": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Compile Notes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compile Notes": {
      "main": [
        [
          {
            "node": "Log to Reading Notes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Reading Notes": {
      "main": [
        [
          {
            "node": "Send to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}