{
  "name": "Inbox To-Do and Industry Digest",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "value": 5,
              "unit": "minutes"
            }
          ]
        },
        "output": "raw",
        "filters": {},
        "options": {}
      },
      "name": "New Email",
      "type": "n8n-nodes-base.microsoftOutlookTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ],
      "id": "5e845eee-e049-4001-b8b9-b04219e73631"
    },
    {
      "parameters": {
        "operation": "removeItemsRepeatedAcrossExecutions",
        "dedupeValue": "={{ $json.id }}",
        "options": {}
      },
      "name": "Skip Emails Seen Before",
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        220,
        300
      ],
      "id": "8a8523ce-665a-443e-b845-59dd7dfbc110"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f414f5af-5b04-4a0c-9ec2-155916e55f67",
              "name": "aboutMe",
              "value": "PASTE one line: who you are and what your business does.",
              "type": "string"
            },
            {
              "id": "9e731867-444f-4bbc-ba4e-addd37d644b3",
              "name": "myJob",
              "value": "PASTE one or two lines on what your job is, so the AI can tell your work from everyone else's. Example: requests from customers, partners and my own team; anything with a deadline, an order, a price, a contract or a meeting I need to set.",
              "type": "string"
            },
            {
              "id": "575a8834-32ff-41b2-b218-2936c89d321c",
              "name": "industryTopics",
              "value": "PASTE the industry news you want kept. Example: deals and mergers among the companies I sell to; programs and offers those companies run for their customers; what end customers are asking for; how the big players are responding; news in my own product category.",
              "type": "string"
            },
            {
              "id": "6eea4d9c-84bf-4ec6-aacc-c268083b699a",
              "name": "themes",
              "value": "deal or merger, customer program, demand trend, market move, category news, other",
              "type": "string"
            },
            {
              "id": "7a5933aa-e204-4256-b91a-000bbea3113d",
              "name": "myAddress",
              "value": "you@example.com",
              "type": "string"
            },
            {
              "id": "fa43224a-344f-486b-a6b5-d5efc4d0cf6d",
              "name": "neverSendToAI",
              "value": "",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "name": "Config",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        440,
        300
      ],
      "id": "fd477f01-9334-4358-917b-ecef551455dd",
      "executeOnce": true
    },
    {
      "parameters": {
        "jsCode": "// The privacy rule lives here, before any AI step.\n// The AI sees sender, subject and the first 6,000 characters of the body as plain text.\n// Senders on the neverSendToAI list are skipped outright: no AI, no row.\n// Attachments are never opened or downloaded.\nconst cfg = $('Config').first().json;\nconst me = String(cfg.myAddress).trim().toLowerCase();\nconst blocked = String(cfg.neverSendToAI).split(',').map(s => s.trim().toLowerCase()).filter(Boolean);\nconst toText = html => String(html ?? '')\n  .replace(/<(style|script)[\\s\\S]*?<\\/\\1>/gi, ' ')\n  .replace(/<br\\s*\\/?>|<\\/p>|<\\/div>|<\\/li>|<\\/tr>/gi, '\\n')\n  .replace(/<[^>]+>/g, ' ')\n  .replace(/&nbsp;/g, ' ').replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&#39;|&rsquo;/g, \"'\").replace(/&quot;/g, '\"')\n  .replace(/[ \\t]+/g, ' ').replace(/\\n\\s*\\n+/g, '\\n\\n').trim();\nreturn $('Skip Emails Seen Before').all().map(({ json: m }) => {\n  const address = String(m.from?.emailAddress?.address ?? '').toLowerCase();\n  const name = m.from?.emailAddress?.name ?? address;\n  const from = name && name !== address ? `${name} <${address}>` : address;\n  const subject = m.subject ?? '';\n  const body = toText(m.body?.content ?? m.bodyPreview).slice(0, 6000);\n  return { json: {\n    messageId: m.id, from, fromName: name, address, subject,\n    received: String(m.receivedDateTime ?? '').slice(0, 10), link: m.webLink ?? '',\n    skip: m.isDraft === true || (me && address === me) || blocked.some(b => address === b || address.endsWith('@' + b.replace(/^@/, ''))),\n    aiInput: `From: ${from}\\nReceived: ${String(m.receivedDateTime ?? '').slice(0, 10)}\\nSubject: ${subject}\\n\\n${body}`\n  } };\n}).filter(i => !i.json.skip);"
      },
      "name": "What the AI May See",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        660,
        300
      ],
      "id": "b29fc6d1-8c6c-4fda-8cce-9eb5caa55fae"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.aiInput }}",
        "options": {
          "systemMessage": "=You sort email for {{ $('Config').first().json.aboutMe }}\nToday is {{ $now.toISODate() }}.\n\nWhat counts as MY JOB:\n{{ $('Config').first().json.myJob }}\n\nThe industry news worth keeping:\n{{ $('Config').first().json.industryTopics }}\n\nPut every email in exactly one class:\nMY JOB = someone needs something from me, or there is a task, deadline, decision or follow-up that is mine.\nINDUSTRY REPORT = news or analysis about the industry topics above, even if nothing is needed from me today.\nOTHER = everything else: promotions, receipts, automated notices, internal chatter with nothing for me to do.\nIf an email is both, choose MY JOB.\n\nReturn ONLY a JSON object, no prose, no code fences:\n{\"category\": \"MY JOB\" | \"INDUSTRY REPORT\" | \"OTHER\",\n \"task\": \"MY JOB only: the task in under 15 words, starting with a verb. Otherwise empty.\",\n \"due\": \"MY JOB only: YYYY-MM-DD if the email states or clearly implies a date, worked out from the Received date. Otherwise empty. Never guess.\",\n \"company\": \"INDUSTRY REPORT only: the main retailer or company named. Otherwise empty.\",\n \"tags\": [\"INDUSTRY REPORT only: one to three of these, most important first: {{ $('Config').first().json.themes }}\"],\n \"summary\": \"INDUSTRY REPORT only: two sentences. What happened, then why it matters to me. Otherwise empty.\"}"
        }
      },
      "name": "Sort the Email",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        880,
        300
      ],
      "id": "1ad2f696-aa65-4f18-b7e9-83fe933f4c5b"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-5-20250929",
          "cachedResultName": "Claude Sonnet 4.5"
        },
        "options": {}
      },
      "name": "Claude",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        880,
        520
      ],
      "id": "698fcaf2-d811-48d4-af6d-5c4158c68c82"
    },
    {
      "parameters": {
        "jsCode": "// Reads Claude's answer. If it can't be read, the email becomes a to-do so nothing is lost.\nreturn $input.all().map((item, i) => {\n  const mail = $('What the AI May See').all()[i].json;\n  const raw = String(item.json.output ?? item.json.text ?? '').replace(/```(json)?/g, '');\n  let sort = { category: 'MY JOB', task: 'Check this email by hand (the sort could not be read)', due: '', company: '', tags: [], summary: '' };\n  try { sort = { ...sort, ...JSON.parse(raw.slice(raw.indexOf('{'), raw.lastIndexOf('}') + 1)) }; } catch (e) {}\n  const category = String(sort.category).toUpperCase().trim();\n  return { json: { ...mail, ...sort, category, tags: Array.isArray(sort.tags) ? sort.tags : [] } };\n});"
      },
      "name": "Decide",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1100,
        300
      ],
      "id": "0f9e202b-c16b-4991-b741-3cfac8df7c0a"
    },
    {
      "parameters": {
        "jsCode": "// Column names must match row 1 of the To-Do sheet exactly.\nreturn $input.all().map(i => i.json).filter(m => m.category === 'MY JOB').map(m => ({ json: {\n  Added: $now.toISODate(), Task: m.task || m.subject, From: m.from, Subject: m.subject,\n  Due: m.due || '', Link: m.link, Status: 'Open'\n} }));"
      },
      "name": "To-Do Rows",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1320,
        200
      ],
      "id": "67a3bbd3-14c4-4609-9b51-5244d6929887"
    },
    {
      "parameters": {
        "jsCode": "// Column names must match row 1 of the Industry Log sheet exactly.\nreturn $input.all().map(i => i.json).filter(m => m.category === 'INDUSTRY REPORT').map(m => ({ json: {\n  Date: m.received || $now.toISODate(), Source: m.fromName, Company: m.company || '',\n  Tags: m.tags.join(', '), Summary: m.summary, Subject: m.subject, Link: m.link\n} }));"
      },
      "name": "Industry Report Rows",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1320,
        420
      ],
      "id": "0044f696-b6c0-4d35-a4dc-8dddff4fbeda"
    },
    {
      "parameters": {
        "resource": "worksheet",
        "operation": "append",
        "workbook": {
          "__rl": true,
          "value": "",
          "mode": "list"
        },
        "worksheet": {
          "__rl": true,
          "value": "",
          "mode": "list"
        },
        "dataMode": "autoMap",
        "options": {}
      },
      "name": "Add to To-Do Sheet",
      "type": "n8n-nodes-base.microsoftExcel",
      "typeVersion": 2.2,
      "position": [
        1540,
        200
      ],
      "id": "2cc9acaf-97f9-49aa-9432-a98d0ef9da87"
    },
    {
      "parameters": {
        "resource": "worksheet",
        "operation": "append",
        "workbook": {
          "__rl": true,
          "value": "",
          "mode": "list"
        },
        "worksheet": {
          "__rl": true,
          "value": "",
          "mode": "list"
        },
        "dataMode": "autoMap",
        "options": {}
      },
      "name": "Add to Industry Log",
      "type": "n8n-nodes-base.microsoftExcel",
      "typeVersion": 2.2,
      "position": [
        1540,
        420
      ],
      "id": "ab470970-d153-4479-8569-23d1bbb87904"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 7 * * 5"
            }
          ]
        }
      },
      "name": "Friday 7am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        800
      ],
      "id": "f47c5bf9-3f4c-4f91-a2a5-e8bba9939dbd"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "b8af6d72-dde7-45b7-83e5-8dd10dc4c0e5",
              "name": "myName",
              "value": "Your name",
              "type": "string"
            },
            {
              "id": "cb5f5076-36b0-4f82-8d84-d5b315abf6eb",
              "name": "aboutMe",
              "value": "PASTE one line: who you are and what your business does.",
              "type": "string"
            },
            {
              "id": "d6b5b529-0f58-4b05-b862-ccf3bd1415e0",
              "name": "sendTo",
              "value": "you@example.com",
              "type": "string"
            },
            {
              "id": "f75facb4-df17-4992-84a2-3988e02f8277",
              "name": "daysBack",
              "value": 7,
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "name": "Digest Config",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        800
      ],
      "id": "151cb740-53c1-4d67-a50d-2f96895dba13",
      "executeOnce": true
    },
    {
      "parameters": {
        "resource": "worksheet",
        "operation": "readRows",
        "workbook": {
          "__rl": true,
          "value": "",
          "mode": "list"
        },
        "worksheet": {
          "__rl": true,
          "value": "",
          "mode": "list"
        },
        "options": {}
      },
      "name": "Read Industry Log",
      "type": "n8n-nodes-base.microsoftExcel",
      "typeVersion": 2.2,
      "position": [
        440,
        800
      ],
      "id": "48e36fe5-8065-4ae9-b294-5a9ae15239b2",
      "executeOnce": true,
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "resource": "worksheet",
        "operation": "readRows",
        "workbook": {
          "__rl": true,
          "value": "",
          "mode": "list"
        },
        "worksheet": {
          "__rl": true,
          "value": "",
          "mode": "list"
        },
        "options": {}
      },
      "name": "Read To-Do List",
      "type": "n8n-nodes-base.microsoftExcel",
      "typeVersion": 2.2,
      "position": [
        660,
        800
      ],
      "id": "c5db566a-4c68-4fac-929f-a5e0405ba186",
      "executeOnce": true,
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "jsCode": "// Plain code, no AI: this week's reports grouped by their first tag, plus every to-do not marked Done.\nconst cfg = $('Digest Config').first().json;\n// Excel can hand dates back as serial numbers (46300) or as text (2026-10-02). Read both.\nconst toDate = v => {\n  if (v === '' || v == null) return null;\n  const n = Number(v);\n  if (!isNaN(n) && n > 20000 && n < 80000) return DateTime.fromMillis(Math.round((n - 25569) * 86400000), { zone: 'utc' });\n  const d = DateTime.fromISO(String(v));\n  return d.isValid ? d : null;\n};\nconst since = $now.minus({ days: Number(cfg.daysBack) || 7 }).startOf('day');\nconst reports = $('Read Industry Log').all().map(i => i.json)\n  .filter(r => r.Summary && (toDate(r.Date) ?? since) >= since)\n  .map(r => ({ ...r, Date: toDate(r.Date)?.toISODate() ?? String(r.Date ?? ''), theme: String(r.Tags ?? '').split(',')[0].trim() || 'other' }));\nconst byTheme = {};\nfor (const r of reports) (byTheme[r.theme] ??= []).push(r);\nconst todos = $('Read To-Do List').all().map(i => i.json)\n  .filter(t => t.Task && String(t.Status ?? '').trim().toLowerCase() !== 'done')\n  .map(t => ({ ...t, Due: toDate(t.Due)?.toISODate() ?? '', Added: toDate(t.Added)?.toISODate() ?? '' }))\n  .sort((a, b) => (a.Due || '9999').localeCompare(b.Due || '9999'));\nconst listText = Object.entries(byTheme).map(([theme, rows]) =>\n  `THEME: ${theme}\\n` + rows.map(r => `- ${r.Date} | ${r.Company || r.Source} | ${r.Summary}`).join('\\n')).join('\\n\\n');\nreturn [{ json: { reports, byTheme, todos, listText: listText || '(no industry reports this week)' } }];"
      },
      "name": "Gather the Week",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        880,
        800
      ],
      "id": "012286a5-b09c-4168-ba09-c0cdd15f2012"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You write the Friday industry briefing for {{ $('Digest Config').first().json.aboutMe }}\n\nBelow are this week's industry reports, already grouped by theme. For each theme, write one or two sentences on what the reports add up to: the pattern, not a repeat of each item. Then name up to three things worth acting on or watching next week, each one sentence.\nUse only what is in the reports. Never invent a company, number or date.\n\nReturn ONLY a JSON object, no prose, no code fences:\n{\"themes\": {\"<theme name exactly as given>\": \"one or two sentences\"}, \"act\": [\"one sentence\", \"one sentence\"]}\nIf there are no reports, return {\"themes\": {}, \"act\": []}.\n\nThis week's reports:\n{{ $json.listText }}",
        "options": {}
      },
      "name": "Write the Digest",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        1100,
        800
      ],
      "id": "eede2d10-4703-48f7-a53c-4c4e5d6d264c"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-5-20250929",
          "cachedResultName": "Claude Sonnet 4.5"
        },
        "options": {}
      },
      "name": "Claude ",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        1100,
        1020
      ],
      "id": "00d87465-8ac6-4138-a246-fc18184c8c71"
    },
    {
      "parameters": {
        "jsCode": "// The email is built here in code, so a model hiccup can never break the layout.\nconst week = $('Gather the Week').first().json;\nconst cfg = $('Digest Config').first().json;\nconst raw = String($json.output ?? $json.text ?? '').replace(/```(json)?/g, '');\nlet ai = { themes: {}, act: [] };\ntry { ai = { ...ai, ...JSON.parse(raw.slice(raw.indexOf('{'), raw.lastIndexOf('}') + 1)) }; } catch (e) {}\nconst esc = s => String(s ?? '').replace(/&/g, '&amp;').replace(/</g, '&lt;');\nconst link = (url, text) => url ? `<a href=\"${esc(url)}\">${esc(text)}</a>` : esc(text);\nconst h2 = t => `<h2 style=\"color:#1B2A4A;border-bottom:2px solid #C9A84C;padding-bottom:4px;margin:24px 0 8px;font-family:Arial,sans-serif\">${t}</h2>`;\nconst themes = Object.entries(week.byTheme).map(([theme, rows]) => `\n  <h3 style=\"margin:16px 0 4px;color:#2A3F6B;text-transform:capitalize\">${esc(theme)} (${rows.length})</h3>\n  ${ai.themes?.[theme] ? `<p style=\"margin:0 0 6px;border-left:3px solid #C9A84C;padding-left:10px\">${esc(ai.themes[theme])}</p>` : ''}\n  <ul style=\"margin:0;padding-left:18px\">${rows.map(r => `<li style=\"margin:0 0 6px\">${link(r.Link, (r.Company || r.Source) + ': ' + r.Subject)}<br><span style=\"color:#555\">${esc(r.Summary)}</span></li>`).join('')}</ul>`).join('');\nconst act = (ai.act ?? []).length ? `<ol>${ai.act.map(a => `<li>${esc(a)}</li>`).join('')}</ol>` : '';\nconst todos = week.todos.length\n  ? `<table style=\"border-collapse:collapse;width:100%;font-size:14px\">${week.todos.map(t => `<tr>\n      <td style=\"padding:4px 8px;border-bottom:1px solid #ddd;white-space:nowrap;color:${t.Due && t.Due < $now.toISODate() ? '#b00020' : '#555'}\">${esc(t.Due || 'no date')}</td>\n      <td style=\"padding:4px 8px;border-bottom:1px solid #ddd\">${link(t.Link, t.Task)}<br><span style=\"color:#777;font-size:12px\">${esc(t.From)}</span></td></tr>`).join('')}</table>`\n  : '<p>Nothing open. Clear week.</p>';\nreturn [{ json: {\n  subject: `Friday digest: ${week.reports.length} industry reports, ${week.todos.length} open to-dos`,\n  html: `<div style=\"font-family:Arial,sans-serif;max-width:680px\">\n    <p>${esc(cfg.myName)}, here is your week. Mark a to-do <b>Done</b> in the sheet and it drops off next Friday.</p>\n    ${h2('Open to-dos')}${todos}\n    ${h2('The industry this week')}${themes || '<p>No industry reports were saved this week.</p>'}\n    ${act ? h2('Worth acting on') + act : ''}\n  </div>`\n} }];"
      },
      "name": "Build the Friday Email",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1320,
        800
      ],
      "id": "f5556735-df95-4dcd-b761-b8ab547f02fa"
    },
    {
      "parameters": {
        "resource": "message",
        "operation": "send",
        "toRecipients": "={{ $('Digest Config').first().json.sendTo }}",
        "subject": "={{ $json.subject }}",
        "bodyContent": "={{ $json.html }}",
        "additionalFields": {
          "bodyContentType": "html"
        }
      },
      "name": "Email Me the Digest",
      "type": "n8n-nodes-base.microsoftOutlook",
      "typeVersion": 2,
      "position": [
        1540,
        800
      ],
      "id": "dcf9e53e-04d7-4d8d-a997-c2da474883b1"
    },
    {
      "parameters": {
        "content": "## Inbox to-do list + industry digest (Outlook)\n**Top row, every 5 minutes:** reads each new email in Outlook and sorts it into **MY JOB**, **INDUSTRY REPORT** or **OTHER**. MY JOB becomes a row on your **To-Do** sheet (task, from, due date if the email gives one, link). INDUSTRY REPORT becomes a row on your **Industry Log** (date, source, company, tags, two-sentence summary, link). OTHER is left alone.\n\n**Bottom row, Fridays at 7am:** reads the week's Industry Log, groups it by theme, and emails you one digest with your open to-dos on top.\n\nIt never moves, labels, deletes or answers your mail, and never opens attachments. The only email it sends goes to you.\n\n**Set up (20 min):** one Excel workbook in OneDrive, two sheets, headers in row 1:\n- **To-Do:** Added, Task, From, Subject, Due, Link, Status\n- **Industry Log:** Date, Source, Company, Tags, Summary, Subject, Link\nConnect Outlook (2 nodes), Excel (4 nodes) and Claude (2 nodes). Fill in **Config** and **Digest Config**.\n\n**Your part:** mark a to-do **Done** in the sheet when it's done.",
        "height": 560,
        "width": 460,
        "color": 5
      },
      "name": "Read Me First",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -60,
        -320
      ],
      "id": "1295d1d4-a17e-4535-b171-6ee5e9742420"
    }
  ],
  "connections": {
    "New Email": {
      "main": [
        [
          {
            "node": "Skip Emails Seen Before",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Skip Emails Seen Before": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config": {
      "main": [
        [
          {
            "node": "What the AI May See",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "What the AI May See": {
      "main": [
        [
          {
            "node": "Sort the Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort the Email": {
      "main": [
        [
          {
            "node": "Decide",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "To-Do Rows": {
      "main": [
        [
          {
            "node": "Add to To-Do Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Industry Report Rows": {
      "main": [
        [
          {
            "node": "Add to Industry Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Friday 7am": {
      "main": [
        [
          {
            "node": "Digest Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Digest Config": {
      "main": [
        [
          {
            "node": "Read Industry Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Industry Log": {
      "main": [
        [
          {
            "node": "Read To-Do List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read To-Do List": {
      "main": [
        [
          {
            "node": "Gather the Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gather the Week": {
      "main": [
        [
          {
            "node": "Write the Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write the Digest": {
      "main": [
        [
          {
            "node": "Build the Friday Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build the Friday Email": {
      "main": [
        [
          {
            "node": "Email Me the Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decide": {
      "main": [
        [
          {
            "node": "To-Do Rows",
            "type": "main",
            "index": 0
          },
          {
            "node": "Industry Report Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude": {
      "ai_languageModel": [
        [
          {
            "node": "Sort the Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Claude ": {
      "ai_languageModel": [
        [
          {
            "node": "Write the Digest",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {
    "New Email": [
      {
        "json": {
          "id": "s1",
          "subject": "Need your updated price list by Thursday (sample)",
          "from": {
            "emailAddress": {
              "name": "Sam Lee",
              "address": "sam.lee@example.com"
            }
          },
          "receivedDateTime": "2026-10-01T14:05:00Z",
          "webLink": "https://outlook.office.com/mail/sample-1",
          "body": {
            "contentType": "html",
            "content": "<p>Hi,</p><p>We are finalizing next quarter's plan. Can you send your updated price list and minimum order quantities by Thursday, October 8?</p><p>Thanks, Sam</p>"
          }
        }
      },
      {
        "json": {
          "id": "s2",
          "subject": "Industry weekly: two distributors agree to merge (sample)",
          "from": {
            "emailAddress": {
              "name": "Industry Weekly",
              "address": "news@example.com"
            }
          },
          "receivedDateTime": "2026-10-01T11:00:00Z",
          "webLink": "https://outlook.office.com/mail/sample-2",
          "body": {
            "contentType": "html",
            "content": "<h1>Industry Weekly</h1><p>Two regional distributors (sample names) announced a merger that will combine their warehouses and customer lists. The combined company plans a loyalty program with volume discounts for its smaller customers. A sample survey also found buyers are asking for faster delivery over lower prices.</p>"
          }
        }
      },
      {
        "json": {
          "id": "s3",
          "subject": "Your October office supplies order has shipped (sample)",
          "from": {
            "emailAddress": {
              "name": "Supply Store",
              "address": "orders@example.com"
            }
          },
          "receivedDateTime": "2026-10-01T09:30:00Z",
          "webLink": "https://outlook.office.com/mail/sample-3",
          "body": {
            "contentType": "html",
            "content": "<p>Your order #12345 has shipped and will arrive Monday.</p>"
          }
        }
      }
    ]
  }
}