Tag: AI workflow

  • Workers for Agents in TypeScript: Patterns That Hold Up in Production

    Workers for Agents in TypeScript: Patterns That Hold Up in Production

    Workers for Agents in TypeScript: Patterns That Hold Up in Production

    The 60-second version

    Workers reward a specific style of TypeScript: small, single-purpose, structured-input-and-output, well-typed. The constraints (30 seconds, 128MB, no state) push you toward this style automatically. Workers that hold up in production share patterns: typed input/output schemas, defensive HTTP calls with timeouts, structured error returns, no hidden side effects.

    Five production patterns

    1. Type your input and output.
    Type strictly. The agent works against the schema. Schema drift breaks the agent silently.
    2. Defensive HTTP with timeouts.
    External API calls inside a 30-second budget need their own timeouts. A 25-second API call leaves 5 seconds for everything else. Set explicit fetch timeouts shorter than the Worker timeout.
    3. Structured error returns instead of throws.
    Throw inside a Worker and the agent gets opaque failure. Return structured error objects and the agent can reason about the failure and respond gracefully.
    4. Idempotency where state matters.
    Workers have no persistent state, but they can hit external systems that do. If the external call is non-idempotent (e.g., creates a record), include an idempotency key derived from input. Calling the Worker twice should produce one record, not two.
    5. Approved domains as a deployment artifact.
    Track domain approvals in code. When a Worker stops working in production, “did the approved domains change” is the first thing to check.

    Three production failures to design around

    1. The 30-second wall. Aim for under 5 seconds typical, under 15 worst case. Long calls fail under retry loads.
    2. Silent domain blocks. A Worker calling a non-approved domain fails with an error that isn’t always obvious. Log every outbound destination.
    3. Memory leaks via large responses. Don’t pull a 50MB JSON response into a 128MB Worker. Stream, paginate, or pre-filter at the source.

    Testing strategy

    Unit-test the Worker logic separately from the agent. Use mock HTTP. Then integration-test with the actual agent calling the Worker. The two test layers catch different bugs.

    What to read next

    Workers + External APIs, Notion AI Meets MCP, Workers for Agents foundation piece, Security Posture.

  • Notion Agents vs n8n Alone: When the Workflow Belongs Inside Notion

    Notion Agents vs n8n Alone: When the Workflow Belongs Inside Notion

    Notion Agents vs n8n Alone: When the Workflow Belongs Inside Notion

    The 60-second version

    This isn’t either-or. n8n is the deterministic workflow engine — when X happens, do Y across these 5 apps. Notion Agents are the reasoning layer — given the context, decide whether X actually warrants action and what the right action is. Combined via the n8n MCP bridge, they form a complete automation stack: agent reasons, n8n executes. Operators who treat them as competitors miss the leverage.

    When Notion Agents win

    • The workflow needs to read and synthesize Notion workspace content
    • Natural-language understanding of context matters
    • The “decide whether to act” question is the hard part
    • Schedule-driven autonomous work is the goal
    • The workflow output is itself in Notion

    When n8n wins

    • Pure cross-app data movement (no reasoning needed)
    • Hundreds of integration options matter
    • Visual workflow building with branching logic
    • High-volume deterministic automations
    • Workflows that don’t touch Notion at all

    The combined pattern

    The pattern that’s emerging:
    Notion Agent decides what to do based on context
    n8n workflow executes the cross-app coordination
    – Connected via the n8n MCP bridge inside Notion
    Example: Agent reads new lead in Notion → reasons whether it matches ICP → if yes, calls n8n workflow that updates Salesforce, sends Slack notification, schedules follow-up email.

    What n8n does that Notion Agents don’t

    • Massive integration catalog (Salesforce, Stripe, hundreds of others)
    • Visual flow building
    • High-throughput deterministic execution
    • Self-hosting option for compliance-sensitive use cases

    What Notion Agents do that n8n doesn’t

    • Natural-language understanding of unstructured workspace content
    • Native Notion database manipulation
    • Skills (saved natural-language workflows)
    • Workers for custom code execution
    • Schedule-driven autonomous reasoning

    Where this goes wrong

    1. Trying to do everything in one tool. Reasoning in n8n (limited) or deterministic execution in Notion Agents (expensive) is the wrong direction.
    2. Skipping the MCP bridge. Without it, you re-implement n8n integrations as Workers. Don’t.
    3. Letting agent reasoning replace simple n8n triggers. If the trigger is “row added to database,” that’s deterministic. Just use n8n.

    What to read next

    n8n MCP Bridge, Workers + External APIs, Notion AI vs Zapier, MCP foundation piece.

  • Google Drive + Notion AI: Bringing External Documents Into Agent Context

    Google Drive + Notion AI: Bringing External Documents Into Agent Context

    Google Drive + Notion AI: Bringing External Documents Into Agent Context

    The 60-second version

    Most teams have content split between Notion and Google Drive. Drive holds the “I’m collaborating in real-time with five people” docs; Notion holds the structured workspace and database content. The Drive integration lets agents read across both. The result: synthesis that pulls from “the project doc in Drive” plus “the project page in Notion” plus “the related research in Notion’s research database” without manual copy-paste.

    Three patterns that work

    1. Cross-source synthesis. “Summarize the state of project X” pulls from the Notion project page, the Google Doc collaborators are working in, and the Sheets file with the metrics. Agent produces one synthesis from three sources.
    2. Drive-content-as-source for Notion drafts. Drafting a Notion document, agent pulls from a Drive Doc as reference. Useful when the source-of-truth lives in Drive but the deliverable lives in Notion.
    3. Migration assistance. Teams moving from Drive to Notion can use the integration to surface “what’s still in Drive that should be in Notion.” Helps the migration without forcing it.

    What stays manual

    • The actual collaboration in Drive (real-time editing isn’t an agent task)
    • Decisions about which content lives where (organizational, not synthesis)
    • Sensitive Drive content the agent shouldn’t see (don’t connect it)

    Permission inheritance

    The Drive integration uses the connected user’s permissions. The agent sees what you see. Two practical implications:
    – For org-wide Drive content, connect through an account with broad access
    – For personal Drive, connect your personal account; the agent sees only your stuff

    Where this goes wrong

    1. Connecting too broadly. A Drive integration that gives the agent access to your entire org’s Drive includes things you didn’t think about (HR docs, finance, executive). Scope tightly.
    2. Letting Drive content lag behind Notion content. When a Notion page is canonical, the agent should reference it, not the Drive doc. Mark canonical sources clearly.
    3. Treating Drive as substrate without organization. A messy Drive feeds an agent that produces messy synthesis. The Editorial Surface Area thesis applies to Drive too.

    What to read next

    Editorial Surface Area, Slack Integration, Calendar + Notion AI, MCP foundation piece.

  • Calendar + Notion AI: Letting Your Agent Schedule and Prep Meetings

    Calendar + Notion AI: Letting Your Agent Schedule and Prep Meetings

    Calendar + Notion AI: Letting Your Agent Schedule and Prep Meetings

    The 60-second version

    Calendar is the most repetitive coordination work in knowledge work. Notion AI’s calendar integration takes most of it off your plate. The agent reads your upcoming meetings, pulls related context from your Notion workspace, and drops a one-page brief in your inbox 30 minutes before. For scheduling, the agent suggests times based on your patterns and drafts the calendar invite. You confirm and send. Five minutes of coordination work compresses to thirty seconds of approval.

    Three calendar integration patterns

    1. The pre-meeting brief agent. Triggered 30-60 minutes before each external meeting. Pulls the relevant project page, prior meeting notes with these attendees, open action items, and any current context. Brief lands in your inbox or daily notes.
    2. The scheduling assist agent. When you need to schedule something, ask the agent. It reads your calendar, suggests times that match your patterns (e.g., afternoon for deep work, mornings for standup), and drafts the invite text. You review and send.
    3. The post-meeting capture agent. After meetings, agent prompts for quick voice or text capture. Processes the capture into structured updates: action items added to task database, decisions logged to project page, follow-ups scheduled.

    What stays human

    • Deciding which meetings to take
    • The conversations themselves
    • Final approval before scheduling sends
    • Any sensitive scheduling (interviews, terminations, board calls)

    Setup considerations

    The integration runs at the user level — your calendar connects to your agent. For shared calendars, the connection inherits the calendar’s permissions. Two practical notes:
    – The agent only sees what your calendar permissions show. Private events stay private to the agent.
    – For executive assistants managing multiple calendars, each calendar is a separate connection with separate agent context.

    Where this goes wrong

    1. Letting the agent send invites autonomously. Calendar invites have political weight. Always keep a human approval step.
    2. Trusting brief content for sensitive meetings. Performance reviews, terminations, sensitive client conversations — review the brief manually before relying on it.
    3. Overloading prep briefs. A 4-page brief is worse than a 1-paragraph brief because you don’t read it. Configure the agent to produce concise briefs by default.

    What to read next

    Slack Integration, Mail Integration, AI-Native Company Patterns, The Solo Operator’s Stack.

  • Mail Integration: Drafting and Triaging Email From Inside Notion AI

    Mail Integration: Drafting and Triaging Email From Inside Notion AI

    Mail Integration: Drafting and Triaging Email From Inside Notion AI

    The 60-second version

    Inbox triage is the highest-frequency, lowest-strategic-value work most knowledge workers do daily. Notion AI’s mail integration takes the operational layer off your plate. Agent reads inbox, categorizes incoming messages, drafts replies for routine items, and surfaces what actually needs your judgment. You review the drafts and send the ones that work. The inbox-zero ritual goes from 90 minutes to 15.

    Three mail integration patterns

    1. The triage and draft agent. Runs morning and afternoon. Categorizes inbox: requires response, FYI, junk, action item. For “requires response” items where context exists in Notion, drafts the reply. You review drafts and approve sends.
    2. The follow-up watcher. Watches sent messages. Flags conversations where you sent something and haven’t heard back in 5+ days. Drafts a follow-up. You review and decide whether to send.
    3. The inbox-to-database agent. When inbox content matches database criteria (new lead → CRM, support request → tickets, content pitch → editorial queue), agent extracts structured data and creates the database entry. Reduces manual entry.

    What stays human

    • Sending. Always.
    • Sensitive replies (HR, legal, conflict, confidential)
    • Initial emails to new contacts
    • Anything where voice matters more than content

    The send button stays human

    This is the rule. Agent integrations with mail should be read-and-draft, never autonomous send. The relationship cost of one wrong sent email exceeds the time savings of automating sends across hundreds of right ones. Don’t.

    Where this goes wrong

    1. Trusting drafts on relationship emails. Drafts to existing contacts you have history with risk missing nuance. Read these especially carefully before sending.
    2. Auto-categorizing too aggressively. “FYI” categorization can hide actual urgency. Sample-check the FYI bucket weekly.
    3. Letting follow-ups become spam. A follow-up after 5 days is reasonable. Three follow-ups in 10 days is harassment. Configure follow-up agents conservatively.

    Privacy posture

    Mail integration gives the agent significant access. Two practices:
    – Connect a personal mail account, not a shared inbox
    – Audit what the agent has read monthly via the Notion access logs

    What to read next

    Slack Integration, Calendar + Notion AI, AI-Native Company Patterns.

  • Notion AI for Knowledge Workers: The Personal Productivity Loadout

    Notion AI for Knowledge Workers: The Personal Productivity Loadout

    Notion AI for Knowledge Workers: The Personal Productivity Loadout

    The 60-second version

    Most coverage of Notion AI focuses on team and company use. The individual knowledge worker case is just as compelling and significantly cheaper. Plus plan (\$10/user/month) gets you the inline AI, AI Q&A across your workspace, and meeting notes. That’s enough for most personal productivity workflows. The Custom Agent layer (Business plan) only matters when you have recurring autonomous work — which most individuals don’t, but some do. Match the plan to the actual use, not the marketing aspiration.

    The personal loadout

    1. Daily planning interaction. Each morning, ask Notion AI to summarize your calendar, recent notes, and active projects. Get a one-paragraph “here’s your day” briefing. No agent needed; standard inline AI handles this.
    2. Meeting prep. Before each meeting, ask Notion AI to pull relevant context for the topic and attendees. Standard AI Q&A works fine for personal use. The brief is conversational, not formatted, but that’s adequate for personal prep.
    3. Writing substantive documents. Open a doc, draft, then use the inline AI to tighten paragraphs, suggest counterpoints, summarize sections. The AI is a writing partner, not a ghostwriter — you direct, it executes.
    4. Second-brain navigation. Ask Notion AI to find that thing you wrote three months ago about X. Or to synthesize what you’ve thought about Y across multiple notes. This is where Notion AI outperforms ChatGPT — it knows your stuff.
    5. Quick capture. Use voice memos (mobile) or quick text (desktop) to drop thoughts into a daily notes database. Periodically ask AI to review and structure them into related projects or notes.

    When you do need Custom Agents

    Three personal use cases that earn the upgrade:
    – You produce content on a recurring schedule (newsletter, blog, podcast notes)
    – You manage a personal client roster (consulting, coaching) and want pipeline hygiene
    – You run multiple side projects and need cross-project synthesis automated
    If none of these apply, Plus plan is enough. Don’t upgrade for capability you won’t use.

    The privacy framing

    For individuals, the privacy story matters. Notion AI runs on your workspace content. It doesn’t expose that content to other users. For personal journaling, sensitive notes, or confidential client work, this is meaningfully better than a general-purpose AI.

    Where individuals go wrong

    1. Buying Business plan for capability they won’t use. If you don’t have recurring scheduled work, Custom Agents are wasted spend.
    2. Treating AI as a replacement for thinking. The value of personal notes is largely the thinking that happens during writing. AI shortcuts the writing, which can shortcut the thinking. Use AI for synthesis and recall, not for the original thinking.
    3. Importing too many sources too fast. A new Notion AI user often connects every source available. The agent then synthesizes from a noisy signal. Start with one or two well-organized databases and grow from there.

    What to read next

    Editorial Surface Area, Second-Brain Architecture, Custom Agents vs Basic.

  • Connecting Slack to Your Notion Agent: The Read-Summarize-Act Loop

    Connecting Slack to Your Notion Agent: The Read-Summarize-Act Loop

    Connecting Slack to Your Notion Agent: The Read-Summarize-Act Loop

    The 60-second version

    Slack is where decisions happen. Notion is where decisions are documented. The gap between them is where things fall through. The Slack integration closes the gap by letting agents read what’s happening in Slack, summarize it into Notion, and draft outbound responses based on Slack threads. The pattern that works: read-summarize-act. Agent reads the Slack thread, summarizes the decision into the relevant Notion project page, and drafts the follow-up message back to Slack. The decision is documented and the follow-up is sent without manual handoff.

    Three Slack integration patterns

    1. The decision-capture loop. Agent watches designated #project channels. When a decision is made (signaled by patterns like “let’s do X” or explicit decision flags), agent appends the decision and context to the project page in Notion. Decisions stop being lost to Slack history.
    2. The status digest agent. Daily or weekly, agent reads activity in selected channels and produces a digest in a Notion page. Useful for managers tracking multiple teams without scrolling through hundreds of messages.
    3. The action item extractor. Agent watches conversations for action items (“can you do X by Friday”). Adds them to the relevant person’s task database. Drafts a confirmation message in Slack thread asking the person to confirm.

    What stays human

    • The conversations themselves
    • Decisions about what to do
    • Nuanced communication where tone matters
    • DMs and sensitive channels (don’t connect those)

    Permission and privacy

    Slack agent integration respects user-level permissions. The agent sees what the connected user sees. Two implications:
    – Don’t connect a junior account to a workspace agent — the agent inherits the junior’s limited view
    – Don’t connect an admin account that can see DMs unless you actually want the agent reading DMs (you don’t)
    The right pattern is a dedicated integration account with scoped channel access.

    Where this goes wrong

    1. Agents posting to Slack autonomously. This generates noise and damages trust fast. Configure agents to draft, not post. Humans review and send.
    2. Reading too many channels. The agent’s signal-to-noise ratio drops with channel count. Pick 3-5 relevant channels per agent. Add more later if useful.
    3. Trusting the action-item extractor without confirmation. Slack conversation is loose. “Can you” doesn’t always mean “I commit.” Always add a confirmation step.

    What to read next

    Calendar + Notion AI, Mail Integration, MCP, AI-Native Company Patterns.

  • Notion AI for Customer Success: QBRs, Health Scores, and Account Plans

    Notion AI for Customer Success: QBRs, Health Scores, and Account Plans

    Notion AI for Customer Success: QBRs, Health Scores, and Account Plans

    The 60-second version

    CS work is constrained by CSM bandwidth. The bandwidth gets eaten by documentation: QBRs, account plans, health score updates, internal reporting. Custom Agents take that documentation work over so CSMs can spend their time on customer calls. The result is CS teams that cover more accounts at the same headcount or go deeper on the same accounts. Either way, the math improves.

    Four CS-specific agent patterns

    1. The QBR draft agent. Triggered before QBR season. For each account: pulls usage data (via integration), product adoption metrics, support ticket trends, key milestones, prior QBR action items. Drafts the QBR deck content in the team’s template. CSM customizes for the specific customer instead of building from scratch.
    2. The health score maintenance agent. Daily or weekly. Reads usage data, support patterns, engagement signals, NPS responses. Updates each account’s health score in the customer database. Surfaces accounts that dropped a tier in the last week.
    3. The account plan agent. Monthly per account. Reviews account activity, identifies expansion opportunities, surfaces stalled adoption areas, drafts the updated account plan with specific next-quarter goals.
    4. The renewal risk agent. Continuous. Scans accounts approaching renewal. Cross-references health score, recent engagement, support ticket sentiment, and upcoming contract dates. Flags 60-90 days before renewal so CSM has runway to address issues.

    What stays CSM

    • Customer conversations
    • Expansion negotiations
    • Crisis response when accounts are unhappy
    • The judgment about which accounts deserve which level of investment
    • Reading the customer relationship temperature
      The agent surfaces signals; the CSM interprets them.

    The leverage math

    A typical CSM covers 25-40 accounts. Documentation work consumes 30-40% of their week. Custom Agents take that to 10-15%. The CSM either covers more accounts (50-60) or goes deeper on the same accounts (more strategic, more frequent touch).
    The strategic question: which path matches your business? Higher coverage favors expansion-led businesses. Deeper accounts favor retention-led businesses. Don’t let agents accidentally pick the path for you by default.

    Where CS teams go wrong

    1. Letting agents update health scores autonomously into a “you’re red” customer-facing alert. Health scores have political weight inside the customer’s organization. Auto-flagging customers as red without human review can damage the relationship.
    2. Skipping the QBR review. The agent draft is starting material. The customization for that specific customer is what makes the QBR land. Don’t ship the agent draft as-is.
    3. Trusting renewal risk flags without context. A customer can look “at risk” by the data while being fine in the relationship. CSM context wins. Don’t escalate based on the agent flag alone.

    What to read next

    Notion AI for Sales Teams, Account Research, AI-Native Company Patterns.

  • Notion AI for Marketing: Campaign Briefs, Performance Reports, and Brand Review

    Notion AI for Marketing: Campaign Briefs, Performance Reports, and Brand Review

    Notion AI for Marketing: Campaign Briefs, Performance Reports, and Brand Review

    The 60-second version

    Marketing is split between operational work (briefs, reports, calendars) and creative work (campaigns, content, brand voice). Custom Agents handle the operational half well. The creative half stays human, but agents support it — running brand voice review against the style guide, surfacing past performance patterns, drafting from briefs. The result is marketing teams that ship more campaigns with the same headcount because the operational drag is gone.

    Four marketing-specific agent patterns

    1. The campaign brief agent. Triggered when a new campaign is added with objective and audience. Pulls past campaigns to similar audiences, current brand guidelines, channel performance data. Drafts a structured brief: objective, audience, key messages, channels, calendar, success metrics. Marketer refines instead of starting blank.
    2. The performance report agent. Weekly or per-campaign. Reads connected analytics sources, compares against targets, identifies wins and underperformance, drafts narrative explanation with proposed optimizations. The Monday report writes itself; marketer reviews and adds context.
    3. The brand voice review agent. Triggered when content lands in a review queue. Compares against the brand guide. Flags voice deviations by severity. Suggests specific before/after rewrites for flagged sections. The reviewer fixes flagged issues instead of reading every line.
    4. The content calendar agent. Maintains the calendar across channels. Surfaces upcoming gaps, pulls campaign deadlines forward, flags conflicts between simultaneous campaigns, drafts the next week’s posting schedule.

    What stays human

    • Campaign strategy and creative direction
    • Brand voice itself (the style guide is human-written)
    • Customer relationships and influencer partnerships
    • Final approval on anything customer-facing
    • The judgment about what the company should sound like

    The brand voice question

    Marketing teams worry that agents flatten brand voice. The honest answer: they will, unless you actively prevent it. Three things help:
    – A specific style guide with tone examples and anti-examples
    – Voice samples in the agent’s context (real prior content, not just guidelines)
    – A human reviewer who catches voice drift and updates the guide
    Done well, agent-assisted content holds voice better than freelance content because the guide gets enforced consistently. Done badly, every campaign sounds like every other campaign.

    Where marketing teams go wrong

    1. Trusting performance reports without verifying numbers. Agent drafts narrative; marketer verifies the underlying numbers tie to source. The narrative can be right while the numbers are wrong.
    2. Letting brand review become approval. The agent flags deviations. Humans decide which deviations are actual problems versus intentional creative choices. Don’t auto-reject.
    3. Producing more content because production is cheap. Same trap as PMs. Cheap production isn’t strategy. The volume question stays human.

    What to read next

    Notion AI for Content Teams, Notion AI for Sales, AI-Native Company Patterns.

  • Notion AI for Product Managers: Specs, Roadmaps, and Stakeholder Updates

    Notion AI for Product Managers: Specs, Roadmaps, and Stakeholder Updates

    Notion AI for Product Managers: Specs, Roadmaps, and Stakeholder Updates

    The 60-second version

    PMs spend 60% of their time writing — specs, updates, briefs, summaries. Custom Agents take that down to 20%. The PM defines the problem and the strategic call; the agent produces the documentation. Specs draft from a problem statement. Stakeholder updates generate in three audience-specific versions from one source. User research synthesizes into themes automatically. The PM gets back to the work that PMs are actually hired for: deciding what to build.

    Four PM-specific agent patterns

    1. The spec drafting agent. Triggered when a new initiative is added with a problem statement. Pulls related research, prior similar specs, technical constraints from engineering pages. Drafts a structured spec with goals, non-goals, user stories, success metrics, open questions. PM reviews and decides; doesn’t start blank.
    2. The audience-tailored update agent. Single input: this week’s progress and risks. Three outputs: exec brief (3 paragraphs, headline-led), engineering update (technical detail, dependencies), customer-facing update (benefits framing). Audience-specific framing automated.
    3. The research synthesis agent. Triggered when interview notes land in the research database. Extracts themes, codes responses, identifies patterns across interviews, ranks insights by frequency and impact. PM gets a synthesis instead of a pile of raw notes.
    4. The roadmap maintenance agent. Reads the roadmap database. When initiatives change status or priority, updates the Now/Next/Later view, drafts the rationale for moves, flags timeline conflicts. The roadmap stays current without weekly reformatting.

    What stays PM

    • Strategic prioritization (what to build, what to kill)
    • Customer conversations
    • Cross-functional negotiation
    • Final spec approval
    • The judgment behind every roadmap move
      The agent makes the writing fast. It doesn’t make the deciding fast.

    The compounding effect

    PMs running this pattern report a category change in their work: less time on producing artifacts, more time on customer conversations and strategic calls. The artifacts still exist (specs, updates, roadmaps) but they’re produced faster and revised more often because revising is cheap.
    A weekly artifact that used to take 4 hours now takes 90 minutes. Across 50 weeks, that’s 125 hours reclaimed per PM per year. Most PMs spend that on the work they were always supposed to be doing.

    Where PMs go wrong

    1. Letting the agent draft success metrics. Metrics are strategic. The agent can suggest; the PM decides. Don’t outsource the metric definition.
    2. Trusting cross-team updates without verification. The agent might miss context from another team. Sample-check updates that go to engineering or sales for accuracy before sending.
    3. Producing more artifacts because production is cheap. Cheap production is a temptation to over-produce. The discipline of “what should we actually communicate” matters more, not less.

    What to read next

    Notion AI for Engineering, Synthesize Research piece, AI-Native Company Patterns.