Scrape public email addresses from any website using Firecrawl
Who's it for This template is perfect for sales professionals, marketers, and business developers who need to quickly gather contact information from company websites. Whether you're building prospect lists, researching potential partners, or collecting leads for outreach campaigns, this automation saves hours of manual email hunting. What it does This workflow automatically discovers and extracts email addresses from any website by: Taking a website URL as input through a simple form Using Firecrawl's mapping API to find relevant pages (about, contact, team pages) Batch scraping those pages to extract email addresses Intelligently handling common email obfuscations like "(at)" and "(dot)" Returning a clean, deduplicated list of valid email addresses The automation handles rate limiting, retries failed requests, and filters out invalid or hidden email addresses to ensure you get quality results. How to set up Get Firecrawl API access: Sign up at firecrawl.dev and obtain your API key Configure credentials: In n8n, create a new HTTP Header Auth credential named "Firecrawl" with: Header Name: Authorization Header Value: Bearer YOURAPIKEY Import the workflow: Copy the workflow JSON into your n8n instance Test the form: Activate the workflow and test with a sample website URL How to customize the workflow Search parameters: Modify the search parameter in the map_website node to target different page types (currently searches for "about contact company authors team") Extraction limits: Adjust the limit parameter to scrape more or fewer pages per website Retry logic: The workflow includes retry logic with a 12-attempt limit - modify the checkretrycount node to change this Output format: The set_result node formats the final output - customize this to match your preferred data structure Email validation: The JSON schema in startbatchscrape defines how emails are extracted - modify the prompt or schema for different extraction rules The workflow is designed to be reliable and handle common edge cases like rate limiting and failed requests, making it production-ready for regular use.
Automatic jest test generation for GitHub PRs with dual AI review
Workflow: Automatic Unit Test Creator from GitHub 🏗️ Architecture Overview This workflow listens for GitHub pull-request events, analyzes changed React/TypeScript files, auto-generates Jest tests via AI, has them reviewed by a second AI pass, and posts suggestions back as PR comments: GitHub Webhook → PR opened or updated Fetch & Diff → Retrieve raw diff of changed files Filter & Split → Isolate .tsx files & their diffs Fetch File Contents → Provide full context for tests Test Maker Agent → Generate Jest tests for diff hunks Code Reviewer Agent → Refine tests for style & edge-cases Post PR Comment → Sends suggested tests back to GitHub 📦 Node-by-Node Breakdown mermaid flowchart LR A[Webhook: /github/pr-events] --> B[GitHub: Get PR] B --> C[Function: Parse diff_url + owner/repo] C --> D[HTTP Request: GET diff_url] D --> E[Function: Split on "diff --git"] E --> F[Filter: /\.tsx$/] F --> G[GitHub: Get File Contents] G --> H[Test Maker Agent] H --> I[Code Reviewer Agent] I --> J[Function: Build Comment Payload] J --> K[HTTP Request: POST to PR Comments] Webhook: GitHub PR Events Type: HTTP Webhook (/webhook/github/pr-events) Subscribed Events: pullrequest.opened, pullrequest.synchronize GitHub: Get PR Node: GitHub Action: "Get Pull Request" Inputs: owner, repo, pull_number Function: Parse diff_url + owner/repo Extracts: diff_url (e.g. …/pulls/123.diff) owner, repo, mergecommitsha HTTP Request: GET diff_url Fetches unified-diff text for the PR. Function: Split on "diff --git" Splits the diff into file-specific segments. Filter: /.tsx$/ Keeps only segments where the file path ends with .tsx. GitHub: Get File Contents For each .tsx file, fetches the latest blob via GitHub API. Test Maker Agent Prompt: "Generate Jest unit tests covering only the behaviors changed in these diff hunks." Output: Raw Jest test code. Code Reviewer Agent Reads file + generated tests Prompt: "Review and improve these tests for readability, edge-cases, and naming conventions." Output: Polished test suite. Function: Build Comment Payload Wraps tests in TypeScript fences: ts // generated tests… Constructs JSON: json { "body": "<tests>" } HTTP Request: POST to PR Comments URL: https://api.github.com/repos/{owner}/{repo}/issues/{pull_number}/comments Body: Contains the suggested tests. 🔍 Design Rationale & Best Practices Focused Diff Analysis Targets only .tsx files to cover UI logic. Two-Stage AI Separate "generate" + "review" steps mimic TDD + code review. Stateless Functions Pure JS for parsing & transformation, easy to test. Non-Blocking PR Comments Asynchronous suggestions—developers aren't blocked. Scoped Permissions GitHub token limited to reading PRs & posting comments.