Share
Explore

n8n Internal Workflow - overview

Prepared For: n8n Freelancer ​Prepared By: Lead Systems Architect

1. Purpose of the Document

This document outlines the refined n8n workflow architecture to handle two search tiers (Preliminary Search and Deep Search) with clear orchestration logic. Given the differing input data and search fields for the two search types, we will separate the workflows into two distinct diagrams for clarity and implementation ease.
The n8n system will:
Monitor two distinct Google Drive folders for different search tiers.
Trigger Airbyte and specify the appropriate search fields dynamically.
Perform vector similarity search in Qdrant.
Use GPT-4 to process and analyze the results.
Generate a structured PDF report tailored to the tier requirements.
Upload the report to Google Drive and send notifications.

2. High-Level Workflow Overview

The system will manage two distinct workflows based on the search tier:

1. Preliminary Search (Tier 1)

Input: File uploaded to Preliminary_Search folder.
Search Logic: Focuses only on the invention description provided in the document.
Search Fields:
Title, Abstract (basic fields).
API Source: Fetches data only from USPTO.

2. Deep Search (Tier 2)

Input: File uploaded to Enhanced_Search folder containing a drafted provisional patent.
Search Logic: Incorporates multiple metadata fields from the document:
Title, Abstract, Claims, Classification Codes, Assignee, and Inventor(s).
Search Fields: Comprehensive metadata-based search.
API Sources: Fetches data from USPTO, WIPO Patentscope, and EPO OPS APIs.

3. Folder Structure and Workflow Triggers

The system watches two distinct Google Drive folders:
Table 1
Search Tier
Google Drive Folder
Input Document Type
1
Preliminary Search
/Clients/<Client_Name>/Preliminary_Search
Description-based patent document.
2
Deep Search
/Clients/<Client_Name>/Enhanced_Search
Drafted provisional patent (metadata).
There are no rows in this table

4. Workflow Diagrams

We will separate the diagrams into Tier 1 and Tier 2 workflows to make them clear and actionable.

4.1 Tier 1 Workflow: Preliminary Search

Focus: Uses basic description fields only (Title and Abstract). ​Source: Fetches data only from USPTO API.
+--------------------------------------------------+
| Google Drive: Watch Preliminary_Search Folder | <-- Input File Uploaded
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Trigger Airbyte Job: USPTO API | <-- REST API Call
| - Fields: Title, Abstract |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Monitor Airbyte Job Status | <-- Check Job Completion
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Generate Embeddings: OpenAI API | <-- Description Input
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Search Qdrant: Vector Similarity Search | <-- Top 10 Similar Patents
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| GPT-4: AI Analysis |
| - Relevance Scoring |
| - Blocking Analysis |
| - New Claim Suggestions |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Generate PDF: CraftMyPDF API |
| - Include AI Insights and Patent Metadata |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Upload PDF to Google Drive |
| - Folder: /Clients/<Client_Name>/Final_Reports |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Send Notifications |
| - Success: Email/Slack |
| - Error: Log and Alert |
+--------------------------------------------------+

4.2 Tier 2 Workflow: Deep Search

Focus: Uses comprehensive metadata fields defined in the drafted provisional patent. ​Sources: Fetches data from USPTO, WIPO, and EPO OPS APIs.
+--------------------------------------------------+
| Google Drive: Watch Enhanced_Search Folder | <-- Input File Uploaded
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Trigger Airbyte Jobs | <-- REST API Calls
| - Sources: USPTO, WIPO, EPO OPS |
| - Fields: Title, Abstract, Claims, Class Codes |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Monitor All Airbyte Jobs Status | <-- Check Job Completion
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Deduplication and Data Validation |
| - Ensure unique application numbers |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Generate Embeddings: OpenAI API |
| - Input: Title, Claims, Abstract, Class Codes |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Search Qdrant: Vector Similarity Search |
| - Input: Embeddings |
| - Output: Top 10-20 Relevant Patents |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| GPT-4: AI Analysis |
| - Relevance Scoring |
| - Blocking Analysis |
| - New Claim Suggestions |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Generate PDF: CraftMyPDF API |
| - Include: Metadata, AI Insights, Drawings |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Upload PDF to Google Drive |
| - Folder: /Clients/<Client_Name>/Final_Reports |
+-------------------------+------------------------+
|
+-------------------------v------------------------+
| Send Notifications |
| - Success: Email/Slack |
| - Error: Log and Alert |
+--------------------------------------------------+

5. Key Differences Between the Tiers

Table 2
Feature
Preliminary Search (Tier 1)
Deep Search (Tier 2)
1
Input Folder
/Preliminary_Search
/Enhanced_Search
2
Input Document
Simple description
Drafted provisional patent (rich fields)
3
Search Fields
Title, Abstract
Title, Abstract, Claims, Class Codes, etc.
4
API Sources
USPTO
USPTO, WIPO, EPO OPS
5
Deduplication
Not Required
Yes (Cross-API deduplication)
6
Output
Top 10 Relevant Patents
Top 10-20 Relevant Patents + Metadata
There are no rows in this table

6. Responsibilities for the n8n Freelancer

General Responsibilities

Google Drive Setup: Monitor two folders for file uploads.
Airbyte Integration: Trigger API calls with dynamic search fields based on the tier.
Data Deduplication: Ensure duplicate patents are avoided for Deep Search.
Qdrant Search: Perform vector similarity searches.
OpenAI Integration: Generate embeddings and process patent data using GPT-4.
CraftMyPDF Integration: Generate structured PDF reports.
File Upload: Save final reports in designated Google Drive folders.
Notifications: Set up success/failure alerts via Email or Slack.

7. Deliverables Checklist

Table 3
Task
Status
Comments
1
Google Drive Watch Configured
2
Tier-Based Airbyte Triggers Configured
3
Deduplication Logic for Deep Search
4
Qdrant Search Integrated
5
OpenAI GPT-4 Analysis Nodes Configured
6
PDF Report Generation Configured
7
Google Drive Upload for Final Reports
8
Notifications (Success/Failure) Tested
There are no rows in this table
This document simplifies the implementation process by breaking down the workflows per tier, using clear diagrams and responsibilities. Let me know if additional clarity or refinements are needed! 🚀
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.