Samuel Peter - AI Automation | ContraWork by Samuel PeterSamuel Peter
Kajabi Expert Kajabi Course Setup Kajabi Website
AI-Powered Athlete Performance Analysis & Weekly Reporting System
Project Overview
An end-to-end performance tracking and automated intelligence system built in n8n for athletic monitoring. The system ingests training session inputs, evaluates current session metrics against longitudinal historical records via custom OpenAI agents, logs structured insights back to Google Sheets, sends immediate threshold alerts, and dispatches automated weekly performance rollups across Slack and email.
Workflow Breakdown & System Architecture
1. Session Data Ingestion & Context Aggregation
Training Session Form: Captures real-time workout metrics and athlete performance data.
Workflow Configuration & Data Logging: Formats manual inputs and appends/updates raw training session records inside Google Sheets (Store Training Record).
Longitudinal Retrieval: Queries historical database records (Fetch Historical Data) and merges them with current session entries (Combine Current and Historical Data) to give the AI agent full longitudinal context.
2. Performance Analysis Agent & Alert Pipeline
Performance Analysis Agent: Leverages OpenAI models paired with chat memory and custom output parsers (Analysis Output Parser) to interpret trend performance and detect anomalies.
Database Updates: Writes structured AI insights and analysis direct into Google Sheets (Update Record with Insights).
Threshold Evaluation: Evaluates whether session metrics breach pre-configured safety or performance thresholds (Check Performance Threshold).
Real-Time Coaching Alerts: Dispatches immediate notifications via Slack (Send Slack Alert) and Email (Send Email Alert) when an athlete requires coaching attention.
3. Weekly Summary Schedule & Grouping
Automated Cron Trigger: Executes on a scheduled weekly frequency (Weekly Summary Schedule).
Data Extraction & Grouping: Reads weekly records from Google Sheets (Fetch Weekly Data) and runs custom data aggregation to group performance metrics on a per-athlete basis (Group by Athlete).
4. Weekly Summary Agent & Multi-Channel Distribution
Weekly Summary Agent: Processes grouped athlete data through OpenAI models with dedicated output parsers (Summary Output Parser) to generate comprehensive progress overviews.
Automated Multi-Channel Rollout: Delivers finished weekly performance reports directly to coaching staff and team channels via Slack (Send Weekly Summary to Slack) and Email (Send Weekly Summary Email).
Key Tools & Technologies
Workflow Automation Engine: n8n
AI & LLM Services: OpenAI Models (Structured Output Parsers, Chat Memory)
Database & Storage: Google Sheets API
Communication Platforms: Slack Webhooks/API, SMTP / Email Nodes Automated GitHub Issue Management & Contributor Assignment System
Project Overview
An automated repository management workflow built in n8n designed to streamline GitHub issue triage, auto-assign issue creators, and process contributor request comments automatically. The system routes inbound repository events, checks assignment status, updates issue metadata via GitHub's API, and maintains smooth project management without manual maintainer intervention.
Workflow Breakdown & System Architecture
1. Event Monitoring & Payload Routing
GitHub Trigger: Listens for incoming repository webhooks (harshil1712/build-discord-bot...) covering issue creation, comments, and updates.
Switch Router: Evaluates the webhook event type/action payload and branches the execution path accordingly based on event rules.
2. Auto-Assignment Strategy (New Issues)
Unassigned Check (IF no assignee?): Verifies whether a newly opened issue lacks an assigned owner.
Assign Issue Creator: Automatically sets the issue author as the assigned owner via GitHub API (edit: issue).
NoOp Path: Safely bypasses action if the issue already has an assigned team member.
3. Contributor Request Handling (Comments)
Intent Detection (IF wants to work?): Evaluates issue comments for specific intent or trigger keywords (e.g., contributor asking to be assigned).
Availability Check (IF not assigned?): Confirms if the issue is still open for assignment before granting the request.
Assign Commenter: Automatically assigns the commenting contributor to the issue (edit: issue).
Fallback & Feedback (Add Comment): Posts an automated GitHub issue comment (createComment: issue) to inform the contributor if the issue is already assigned or unavailable.
NoOp1 Path: Terminates execution cleanly if comment intent does not match contribution requests.
Key Tools & Technologies
Workflow Automation Engine: n8n
Integration Platform: GitHub Webhook API & REST API
Logic Controls: Conditional Logic (IF Nodes), Multi-Output Routing (Switch), Control Flow Handling (NoOp) AI Event Aggregator – Suffolk (Via RSS Feed)
Project Overview
An automated, AI-driven event aggregation pipeline built on Pabbly Connect. The workflow monitors regional RSS feeds for raw event listings, processes and enriches the data using OpenAI's response models, normalizes dates and timestamps, and posts the structured payload directly to a target application or database via API.
Workflow Breakdown & System Architecture
1. Data Ingestion
RSS Trigger: Listens for new items published to the designated Suffolk regional RSS feed.
Payload Capture: Automatically extracts unstructured event text, titles, links, and raw timestamps upon feed update.
2. AI Extraction & Processing
Initial OpenAI Processing: Evaluates incoming RSS feed items to extract key event details (such as event titles, descriptions, venues, and schedules).
Secondary OpenAI Structuring: Runs structured text transformation to refine the output into consistent JSON/key-value pairs for downstream use.
Asynchronous Delay & Polling: Implements a time delay to handle longer AI processing jobs, followed by an OpenAI retrieval step (Get Response By ID) to safely collect complex batch responses.
3. Date & Time Standardization
Date Formatting: Formats string timestamps into standardized ISO/date formats (Format Date Only).
Current Date Alignment: Pulls dynamic reference points to calculate event timing relative to execution time (Modify Current Date).
Time Operations: Runs date math to handle timezone adjustments and standardize event start/end windows (Add/Subtract Time).
4. External Integration & Dispatch
API Delivery: Sends the clean, AI-enriched event payload via standard HTTP API requests (API Module) to populate external dashboards, custom websites, CRMs, or event calendars.
Key Tools & Technologies
Automation Engine: Pabbly Connect
AI Processing: OpenAI (ChatGPT Response API)
Data Handling: RSS Feed Integration, Custom Date/Time Formatters
Integration Protocols: REST API (JSON payload dispatch) AI-Powered Website Research & Personalized Email Outreach Automation
Project Overview
An end-to-end automated workflow built in n8n that combines deep website scraping, LLM-based content evaluation, RAG (Retrieval-Augmented Generation), and dynamic outreach generation. The system automatically ingests target domain links, processes sitewide content into concise context, and crafts personalized outreach emails sent directly through integrated messaging channels.
System Architecture & Core Modules
1. Input Trigger & Request Management
Multi-Channel Triggers: Ingests target URLs and outreach requests via automated schedules, database logs, and Telegram messaging triggers.
Rate Limiting & Safety Controls: Validates user/ID send quotas before execution to prevent spam flags, routing excess requests to fallback notification alerts.
Database Maintenance: Automated background triggers clean and purge historical execution logs periodically to optimize database performance.
2. Sublink Extraction & Web Scraping
Sitemap & URL Parsing: Executes HTTP requests across sitemap.xml and sitemap_index.xml endpoints to construct complete target URL hierarchies.
Dynamic Web Crawling: Utilizes crawl4ai integration alongside custom HTTP fetchers to extract clean raw content from live web pages.
Link Ranking: Evaluates scraped links using OpenAI LLM nodes to filter out low-value pages and prioritize high-intent sublinks for deep processing.
3. Content Processing & Page Summarization
HTML-to-Markdown Transformation: Converts raw page HTML into lightweight Markdown to eliminate boilerplate code and optimize token limits.
Data Cleansing & Aggregation: Trims content blocks to token budgets, flattens structured payloads, and aggregates multi-page data per domain.
LLM Summarization: Runs aggregated page text through OpenAI models to generate concise summaries capturing target business offerings, value props, and messaging hooks.
4. RAG Agent & Knowledge Base Querying
Vector Search Integration: Connects directly to a Postgres Vector Store (PGVector) via OpenAI Embeddings to retrieve contextual agency knowledge and baseline templates.
Instructor Agent: Employs a dedicated RAG AI Agent with persistent conversation memory to answer queries, fetch internal references, and align outreach messaging with proven offer frameworks.
5. Automated Email Generation & Outreach Execution
Contextual Copywriting: Generates tailored pitch emails using aggregated site summaries and retrieved RAG context.
Signature & Delivery: Standardizes signatures and sender details before executing native email dispatch.
Logging & Notifications: Writes sent email metadata back to centralized tables and broadcasts execution status directly via Telegram notifications.
Key Tools & Technologies Used
Workflow Automation: n8n
AI & Machine Learning: OpenAI GPT Models, Vector Store Embeddings, RAG Architecture
Vector & Relational Databases: PostgreSQL / PGVector, Custom Database Log Tables
Web Scraping & Extraction: Crawl4ai API, Dynamic XML Parsers, HTML-to-Markdown Processors
Communication APIs: Telegram Bot API, SMTP / Native Email Integrations