Skip to main content

Qualify and email literary agents with GPT‑4.1, Gmail and Google Sheets

Workflow preview

Workflow preview
100%
Qualify and email literary agents with GPT‑4.1, Gmail and Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Inspiration & Notes This workflow was born out of a very real problem. While writing a book, I found the process of discovering suitable literary agents and managing outreach to be manual, and surp...

Best for

  • Lead Generation automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.stickynote, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.code, n8n-nodes-base.gmail

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by malcolm.

Original n8n.io source

1.1 Workflow description

Title
Qualify and email literary agents with GPT‑4.1, Gmail and Google Sheets
Workflow name
Qualify and email literary agents with GPT‑4.1, Gmail and Google Sheets

Inspiration & Notes

This workflow was born out of a very real problem.

While writing a book, I found the process of discovering suitable literary agents and managing outreach to be manual, and surprisingly difficult to scale. Researching agents, checking submission rules, personalizing emails, tracking submissions, and staying organized quickly became a full-time job on its own.

So instead of doing it manually, I automated it.

I built this entire workflow in 3 days — and the goal of publishing it is to show that you can do the same. With the right structure and intent, complex sales and marketing workflows don’t have to take months to build.


Contact & Collaboration

If you have questions, business inquiries, or would like help setting up automation workflows, feel free to reach out:

📩 [email protected]

I genuinely enjoy designing workflows and automation systems, especially when they support meaningful projects. I work primarily from interest and impact rather than purely financial motivation.

Whether I take on a project for FREE or paid for the following reasons:

  • I LOVE setting up workflows and automation.
  • I work for meaningfulness, not for money.
  • I may do the work for free, depending on how meaningful the project is. If the problem statement matters, the motivation follows.
  • It also depends on the value I bring to the table -- If I can contribute significant value through system design, I’m more inclined to get involved.

If you’re building something thoughtful and need help automating it, I’m always happy to have a conversation. Enjoy~!


0. Overview

Automates the end-to-end literary agent outreach pipeline, from data ingestion and eligibility filtering to deep agent research, personalized email generation, submission tracking, and analytics.

Architecture

The system is organized into four logical domains: The system is modular and is divided into four domains:

--> Data Engineering --> Marketing & Research --> Sales (Outreach) --> Data Analysis

Each domain operates independently and passes structured data downstream.


1. Data Engineering

Purpose:
Ingest and normalize agent data from multiple sources into a single source of truth.

Inputs

  • Google BigQuery
  • Azure Blob Storage
  • AWS S3
  • Google Sheets
  • (Optional) HTTP sources

Key Steps

  • Scheduled ingestion trigger
  • Merge and normalize heterogeneous data formats (CSV, tables)
  • Deduplication and validation
  • AI-assisted enrichment for missing metadata
  • Append-only writes to a central Google Sheet

Output

  • Clean, normalized agent records ready for eligibility evaluation

2. Marketing & Research

Purpose:
Decide who to contact and how to personalize outreach.

Eligibility Evaluation

An AI agent evaluates each record against strict rules:

  • Email submissions enabled
  • Not QueryTracker-only or QueryManager-only
  • Genre fit (e.g. Memoir, Spiritual, Self-help, Psychology, Relationships, Family)

Outputs

  • send_email (boolean)
  • reason (auditable explanation)

Deep Research

For eligible agents only:

  • Public research from agency sites, interviews, Manuscript Wish List, and LinkedIn (if public)
  • Extracts:
    • Professional background
    • Editorial interests
    • Genres represented
    • Notable clients/books (if publicly listed)
    • Public statements
    • Source-backed personalization angles

Strict Rule:
All claims must be explicitly cited; no inference or hallucination is allowed.


3. Sales (Outreach)

Purpose:
Execute personalized email outreach and maintain clean submission tracking.

Steps

  • AI generates agent-specific email copy
  • Copy is normalized for tone and clarity
  • Email is sent (e.g. Gmail)
  • Submission metadata is logged:
    • Submission Completed
    • Submission Timestamp
    • Channel used

Result

  • Consistent, traceable outreach with CRM-style hygiene

4. Data Analysis

Purpose:
Measure pipeline health and outreach effectiveness.

Features

  • Append-only decision and submission logs
  • QuickChart visualizations for fast validation (e.g. TRUE vs FALSE completion rates)
  • Optional integration with:
    • Power BI
    • Google Analytics 4

Supports

  • Completion rate analysis
  • Funnel tracking
  • Source/platform performance
  • Decision auditing

Design Principles

  • Separation of concerns (ingestion ≠ decision ≠ outreach ≠ analytics)
  • AI with hard guardrails (strict schemas, source-only facts)
  • Append-only logging (analytics-safe, debuggable)
  • Modular & extensible (plug-and-play data sources)
  • Human-readable + machine-usable outputs

Constraints & Notes

  • Only public, professional information is used
  • No private or speculative data
  • HTTP scraping avoided unless necessary
  • Power BI Embedded is not required
  • Workflow designed and implemented end-to-end in ~3 days

Use Cases

Marketing

  • Audience discovery
  • Agent segmentation
  • Personalization at scale
  • Campaign readiness
  • Funnel automation

Sales

  • Lead qualification
  • Deduplication
  • Outreach execution
  • Status tracking
  • Pipeline hygiene

Tech Stack

  • Automation: n8n
  • AI: OpenAI (GPT)
  • Scripting: JavaScript
  • Data Stores: Google Sheets
  • Email: Gmail
  • Visualization: QuickChart
  • BI (optional): Power BI, Google Analytics 4
  • Cloud Sources: AWS S3, Azure Blob, BigQuery

Status

This workflow is production-ready, modular, and designed for extension into other sales or marketing domains beyond literary outreach.


1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Switch1

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 5 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 6 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 7 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 8 - Sticky Note12

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 10 - SalesAgentPrompt

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Send a message

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 12 - Sales Team

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 13 - Mkt Prompt

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Code Readability

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Google BQ

Type / Role
n8n-nodes-base.googleBigQuery - googleBigQuery
Config choices
Version 2.1

Block 16 - Msft Azure Blob

Type / Role
n8n-nodes-base.azureStorage - azureStorage
Config choices
Version 1

Block 17 - Amzn AWS S3

Type / Role
n8n-nodes-base.awsS3 - awsS3
Config choices
Version 2

Block 18 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 19 - Goog Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 20 - Extract from File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1.1

Block 21 - Merge1

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 22 - Merge2

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 23 - AI Agent Determines Which Email to Email1

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 24 - Data Collection Prompt

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Showing the first 24 of 54 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Qualify and email literary agents with GPT‑4.1, Gmail and Google Sheets
Complexity advanced
Nodes 54
Categories Lead Generation, AI RAG
Author malcolm
Published 12 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12651/12651.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Qualify and email literary agents with GPT‑4.1, Gmail and Google Sheets do?

Inspiration & Notes This workflow was born out of a very real problem. While writing a book, I found the process of discovering suitable literary agents and managing outreach to be manual, and surp...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation, AI RAG use case.