AWS Builder Center

I Hate Filling Out Job Applications, So I Built an AI-Powered Chrome Extension

How I automated the most tedious part of job hunting with TypeScript, Azure OpenAI, and Kiro AI

The Problem

It's 2 AM. You've applied to 47 companies this week. Your fingers hurt from typing the same information repeatedly. Every job application wants the same data: email, work experience, projects, skills, and the dreaded "Why do you want to work here?"
Average time per application: 15-20 minutes Mental fatigue: Extreme Typos from copy-paste: Guaranteed
And don't get me started on Google Forms that don't render inputs until you click them, making browser autofill useless.
I hate filling out repetitive forms. So I built this.



The Solution: AI-Powered Form Autofill

I created a Chrome extension that doesn't just fill forms—it understands them.

Key Features

1. Smart Form Detection
  • Detects standard HTML forms
  • Works with Google Forms (div-based, not form-based)
  • Handles dynamically loaded forms
  • Supports custom implementations
2. AI-Powered Classification Using Azure OpenAI GPT-4o-mini:
  • Identifies form type (job app, contact, survey)
  • Understands context (file upload + "resume" = job application)
  • Suggests relevant fields
3. Intelligent Answer Generation Traditional autofill: "No match found, skipping."
My extension:
  • Question: "What motivates you in your career?"
  • AI generates: A contextual answer from my work experience, education, and projects
  • Result: Personalized response without manual writing
4. Dual AI Provider Support
  • Azure OpenAI (fast, paid)
  • Hugging Face (free, open-source)
  • Auto-detection based on configured API key



How Kiro Accelerated Development

Building an intelligent form filler is complex. You need DOM manipulation, AI integration, edge case handling, and more.
This is where Kiro became my secret weapon.

Kiro Moment #1: Google Forms Detection

The Problem: Google Forms don't use  <input>  tags until clicked. My detection failed completely.
Me to Kiro: "The google forms are still not being able to be detected"
Kiro's Analysis:
Google Forms doesn't put real inputs into the DOM until user interaction. You need to detect question blocks with role="listitem", data-item-id, and class patterns.
Kiro's Solution: Complete rewrite with question block detection:
// Before: Input-based (fails on Google Forms)
const inputs = document.querySelectorAll('input, select, textarea');

// After: Question block detection
const questionBlocks = document.querySelectorAll([
'[role="listitem"][data-item-id]',
'[class*="question"]',
'[data-params*="question"]'
].join(','));

questionBlocks.forEach(block => {
const label = this.extractQuestionLabel(block);
const type = this.detectQuestionType(block);
fields.push({ element: block, type, attributes: { label } });
});

Result: Google Forms detection: 0% → 95%



Kiro Moment #2: AI Architecture

The Problem: I needed AI classification supporting both Azure and Hugging Face.
Me to Kiro: "integrate GPT-based form classification with Azure OpenAI API"
Kiro Created: Complete dual-provider architecture:
// FormClassifier.ts - Azure OpenAI
export class FormClassifier {
async classifyForm(form: DetectedForm): Promise<FormClassification> {
const contextText = this.extractContextText(form.element);
const response = await this.callGPT(this.buildPrompt(contextText));
return this.parseClassification(response);
}
}

// HuggingFaceClassifier.ts - Open-source
export class HuggingFaceClassifier {
async classifyForm(form: DetectedForm): Promise<FormClassification> {
const prompt = `<s>[INST] ${this.buildPrompt()} [/INST]`;
return await this.callHuggingFace(prompt);
}
}

Plus automatic provider detection:
function detectAIProvider(): 'azure' | 'huggingface' {
const hasAzure = azureKey !== 'YOUR_AZURE_API_KEY_HERE';
const hasHuggingface = huggingfaceKey !== 'YOUR_HUGGINGFACE_API_KEY_HERE';
if (hasHuggingface && !hasAzure) return 'huggingface';
if (hasAzure) return 'azure';
return 'azure';
}

Setup: Just add your API key to  .env . The extension auto-selects the provider.



Kiro Moment #3: Answer Matching

The Problem: Map arbitrary form questions to structured profile data using AI.
Me to Kiro: "Also for answer matching use AI to mark and or write new"
Kiro Created:  AIAnswerMatcher.ts :
async matchAnswer(field: DetectedField, profile: Profile) {
const question = field.attributes.label;
const profileSummary = this.summarizeProfile(profile);
const prompt = `
Question: "${question}"
User Profile: ${profileSummary}
Find relevant answer or generate one from context.
Return JSON: { value, confidence, reasoning }
`;
return await this.callAI(prompt);
}

Real Example:
Form: "Describe a challenging project you've worked on."
AI Response:
{
"value": "I led development of a Video-based Production Line Monitoring System using computer vision. The challenge was implementing real-time detection for cycle completion and downtime events, optimizing for low-latency inference on standard hardware. We reduced manual recording errors and improved operational visibility by 40%.",
"confidence": 0.89,
"reasoning": "Combined work experience at Tecnod8 with AeroRoute project"
}

Without AI: Field skipped With AI: Thoughtful, contextual answer



The Architecture

form-automation/
├── detector/
│ └── FormDetector.ts # Question block + input detection
├── services/
│ ├── FormClassifier.ts # Azure OpenAI
│ ├── HuggingFaceClassifier.ts # Hugging Face
│ └── AIAnswerMatcher.ts # Field mapping
├── mapper/
│ └── FieldMapper.ts # Heuristic + AI
└── config/
└── config.ts # Auto-detection


The Flow

// 1. Detect forms
const forms = formDetector.detectForms();

// 2. Classify with AI
const classified = await classifier.classifyForm(forms[0]);

// 3. Map fields
const mappings = await fieldMapper.mapFieldsWithAI(
form.fields,
profile
);

// 4. Fill form
await fillExecutor.fillForm(mappings);




Results

Before vs After

Before (Manual):
  • ⏱️ 15-20 minutes per application
  • 😫 Mental fatigue
  • ❌ Inconsistent answers
  • 🐛 Copy-paste typos
After (AI Autofill):
  • ⚡ 30 seconds per application
  • 😊 Zero cognitive load
  • ✅ Consistent answers
  • 🎯 100% accuracy

Real Statistics (2 Weeks)

  • 73 applications submitted
  • ~18 hours saved
  • 95% field match rate
  • $0.37 total cost (Azure OpenAI)



Kiro's Impact

Without Kiro (estimated):
  • Google Forms research: 6 hours
  • Question block detection: 8 hours
  • Debug edge cases: 4 hours
  • Total: ~18 hours for detection alone
With Kiro:
  • Describe problem: 2 minutes
  • Kiro analyzes + proposes: 1 minute
  • Review + build: 5 minutes
  • Total: ~8 minutes
135x faster for complex problems.

Specific Contributions

  1. Google Forms Analysis - Explained architecture, provided detection strategy
  1. AI Service Design - Created dual provider system with auto-detection
  1. Answer Matching - Designed profile summarization and prompt templates
  1. Error Handling - Added graceful degradation and timeout protection



Code Highlights

Auto-Detection

// No manual configuration!
const azureKey = process.env.AZURE_API_KEY || 'YOUR_AZURE_API_KEY_HERE';
const hfKey = process.env.HUGGINGFACE_API_KEY || 'YOUR_HUGGINGFACE_API_KEY_HERE';

function detectAIProvider() {
if (process.env.AI_PROVIDER) return process.env.AI_PROVIDER;
const hasAzure = azureKey !== 'YOUR_AZURE_API_KEY_HERE';
const hasHF = hfKey !== 'YOUR_HUGGINGFACE_API_KEY_HERE';
if (hasHF && !hasAzure) {
console.log('Using Hugging Face');
return 'huggingface';
}
if (hasAzure) {
console.log('Using Azure OpenAI');
return 'azure';
}
return 'azure';
}

export const config = {
aiProvider: detectAIProvider(),
// ...
};


Question Block Detection

private detectQuestionBlocks(): DetectedForm[] {
const blocks = document.querySelectorAll([
'[role="listitem"][data-item-id]',
'[class*="question"]'
].join(','));
blocks.forEach(block => {
const label = this.extractQuestionLabel(block);
const type = this.detectQuestionType(block);
const required = this.detectRequired(block);
fields.push({
element: block,
type,
selector: this.generateSelector(block),
attributes: { label, required }
});
});
}


AI Answer Generation

private buildMatchingPrompt(field: DetectedField, profile: Profile) {
const question = field.attributes.label;
const summary = this.summarizeProfile(profile);

return `You are an intelligent form-filling assistant.

Question: "${question}"

User Profile:
${summary}

Task: Find relevant answer or generate from context.

Respond with JSON:
{
"value": "answer",
"confidence": 0.0-1.0,
"reasoning": "brief explanation"
}`;
}




Challenges & Solutions

Challenge: Token Limits

Problem: Sending full profile for every field = expensive
Solution: Smart summarization
if (question.includes('experience')) {
return profile.experiences[0]; // Latest only
}


Challenge: API Rate Limits

Problem: Hitting free tier limits
Solution: Batch processing
// Process 3 fields at a time
const batchSize = 3;
for (let i = 0; i < fields.length; i += batchSize) {
const batch = fields.slice(i, i + batchSize);
await Promise.all(batch.map(f => aiMatcher.match(f)));
}


Challenge: Cold Starts (Hugging Face)

Problem: First request takes 20+ seconds
Solution: Timeout + fallback
try {
return await Promise.race([
aiMatcher.matchAnswer(field),
timeout(5000)
]);
} catch {
return heuristicMatch(field);
}




What I Learned

1. AI Costs Less Than You Think

Per application: ~$0.005 (Azure GPT-4o-mini) 73 applications: $0.37 total Time saved: 18 hours
My time is worth more than 37 cents.

2. Graceful Degradation Is Critical

// AI disabled? Still works
if (!config.classification.enabled) {
return forms;
}

// AI fails? Fallback
try {
return await aiMatch(field);
} catch {
return heuristicMatch(field);
}


3. TypeScript Saves Time

Type safety prevented countless runtime errors:
interface DetectedField {
element: HTMLElement;
type: FieldType;
attributes: {
label?: string;
required?: boolean;
};
}




Try It Yourself

Quick Start:
git clone https://github.com/niyatimadaan/form-automation-AI.git
cd form-automation-AI
npm install

# Add API key
echo "AZURE_API_KEY=your-key" > .env

npm run build

# Load dist/ in chrome://extensions/

Requirements:
  • Node.js 18+
  • Chrome/Edge
  • Azure OpenAI or Hugging Face API key



Conclusion

I started frustrated with repetitive form filling. I ended up learning:
  • Complex DOM parsing (Google Forms architecture)
  • Cost-effective AI integration
  • Graceful fallback systems
  • How Kiro can 135x development velocity
Most importantly: The best automations come from personal frustration.
Total Dev Time: 6 hours (vs 80+ without Kiro) Time Saved: 18 hours in 2 weeks ROI: 300%
Not bad for a "lazy" automation project.


Connect:


Week 2 Submission - AI for Bharat: Lazy Automation Challenge
Built with: TypeScript, Chrome Extensions API, Azure OpenAI, Hugging Face, Webpack Accelerated with: Kiro AI Assistant
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article