{"id":51605908,"url":"https://github.com/harshineeshree/n8n-ai-agent-gmail-sheets","last_synced_at":"2026-07-12T02:01:43.938Z","repository":{"id":369411631,"uuid":"1289711484","full_name":"harshineeshree/n8n-ai-agent-gmail-sheets","owner":"harshineeshree","description":"n8n AI Agent workflow for automated Gmail messaging and Google Sheets data processing using OpenAI.","archived":false,"fork":false,"pushed_at":"2026-07-05T06:39:48.000Z","size":93,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T08:10:47.736Z","etag":null,"topics":["ai-agent","automation","gmail","google-sheets","n8n","no-code","openai","workflow-automation"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harshineeshree.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-05T05:24:24.000Z","updated_at":"2026-07-05T06:46:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/harshineeshree/n8n-ai-agent-gmail-sheets","commit_stats":null,"previous_names":["harshineeshree/n8n-ai-agent-gmail-sheets"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/harshineeshree/n8n-ai-agent-gmail-sheets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshineeshree%2Fn8n-ai-agent-gmail-sheets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshineeshree%2Fn8n-ai-agent-gmail-sheets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshineeshree%2Fn8n-ai-agent-gmail-sheets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshineeshree%2Fn8n-ai-agent-gmail-sheets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harshineeshree","download_url":"https://codeload.github.com/harshineeshree/n8n-ai-agent-gmail-sheets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshineeshree%2Fn8n-ai-agent-gmail-sheets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35379591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","automation","gmail","google-sheets","n8n","no-code","openai","workflow-automation"],"created_at":"2026-07-12T02:01:43.148Z","updated_at":"2026-07-12T02:01:43.927Z","avatar_url":"https://github.com/harshineeshree.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# n8n AI Agent Gmail and Google Sheets Automation\n\nAn AI-powered workflow automation built with **n8n**, **OpenAI**, **Gmail**, and **Google Sheets**. This workflow reads spreadsheet data, filters selected rows, processes the data using an AI Agent, sends an email through Gmail, and stores the final output back into Google Sheets.\n\n![n8n](https://img.shields.io/badge/n8n-Workflow_Automation-orange)\n![OpenAI](https://img.shields.io/badge/OpenAI-AI_Agent-green)\n![Gmail](https://img.shields.io/badge/Gmail-Email-red)\n![Google Sheets](https://img.shields.io/badge/Google_Sheets-Data_Storage-brightgreen)\n\n## Overview\n\nThis project demonstrates an end-to-end automation workflow created in n8n.\n\nThe workflow starts on a schedule, reads data from Google Sheets, filters the required records, sends the filtered data to an OpenAI-powered AI Agent, sends a Gmail message, and appends the processed result into Google Sheets.\n\nIt is useful for automating spreadsheet-based communication tasks where data needs to be checked, processed with AI, emailed, and stored for tracking.\n\n## Features\n\n- Scheduled workflow execution\n- Google Sheets data reading\n- Row filtering before processing\n- OpenAI AI Agent integration\n- Structured output parsing\n- Gmail message sending\n- Automatic result storage in Google Sheets\n- End-to-end no-code workflow automation\n- Easy to customize for other spreadsheet and email use cases\n\n## Workflow Architecture\n\n```mermaid\nflowchart LR\n    A[\"Schedule Trigger\"] --\u003e B[\"Get Rows in Sheet\u003cbr/\u003eGoogle Sheets\"]\n    B --\u003e C[\"Filter Rows\"]\n    C --\u003e D[\"Get Rows in Sheet 1\u003cbr/\u003eGoogle Sheets\"]\n    D --\u003e E[\"AI Agent\"]\n    E --\u003e F[\"OpenAI Chat Model\"]\n    E --\u003e G[\"Structured Output Parser\"]\n    E --\u003e H[\"Gmail: Send Message\"]\n    H --\u003e I[\"Append Row in Sheet\u003cbr/\u003eGoogle Sheets\"]\n    H --\u003e J[\"Append Row in Sheet 1\u003cbr/\u003eGoogle Sheets\"]\n```\n\n```text\nSchedule Trigger\n      |\n      v\nGet Rows in Sheet\n(Google Sheets)\n      |\n      v\nFilter\n      |\n      v\nGet Rows in Sheet 1\n(Google Sheets)\n      |\n      v\nAI Agent\n(OpenAI Chat Model)\n      |\n      v\nStructured Output Parser\n      |\n      v\nSend a Message\n(Gmail)\n      |\n      v\nAppend Row in Sheet\n(Google Sheets)\n      |\n      v\nAppend Row in Sheet 1\n(Google Sheets)\n```\n\n## Workflow Process\n\n### Step 1 - Schedule Trigger\n\nThe workflow starts automatically using a scheduled trigger.\n\n### Step 2 - Read Data from Google Sheets\n\nThe workflow retrieves rows from a Google Sheet.\n\n### Step 3 - Filter Rows\n\nThe filter node selects only the rows that match the required condition.\n\n### Step 4 - Read Additional Sheet Data\n\nThe workflow retrieves extra data from another Google Sheet node for AI processing.\n\n### Step 5 - AI Agent Processing\n\nThe AI Agent uses an OpenAI Chat Model to process the selected spreadsheet data and generate a structured result.\n\n### Step 6 - Parse Structured Output\n\nThe Structured Output Parser formats the AI response into a consistent structure that can be used by later nodes.\n\n### Step 7 - Send Gmail Message\n\nThe Gmail node sends the generated message or processed result.\n\n### Step 8 - Append Results to Google Sheets\n\nThe final output is appended back into Google Sheets for record keeping.\n\n## Tech Stack\n\n| Layer | Technology |\n| --- | --- |\n| Automation | n8n |\n| AI Model | OpenAI Chat Model |\n| AI Workflow | n8n AI Agent |\n| Email | Gmail |\n| Spreadsheet | Google Sheets |\n| Data Handling | Filter Node |\n| Output Formatting | Structured Output Parser |\n\n## Repository Structure\n\n```text\nrepository-name/\n|\n|-- README.md\n|-- .gitignore\n|\n|-- workflow/\n|   |-- workflow.json\n|\n|-- screenshots/\n|   |-- workflow-preview.png\n\n```\n\n## Installation\n\n### Prerequisites\n\nBefore using this workflow, make sure you have:\n\n- n8n account or local n8n setup\n- OpenAI API access\n- Google account\n- Google Sheets access\n- Gmail access\n- Required n8n credentials configured\n\n### Import Workflow\n\n1. Clone or download this repository.\n2. Open your n8n instance.\n3. Select **Import workflow**.\n4. Import the exported workflow JSON file.\n5. Configure the required credentials.\n6. Update spreadsheet IDs, sheet names, filters, and Gmail settings.\n7. Save and test the workflow.\n8. Activate the workflow after successful testing.\n\n## Configuration\n\nConfigure the following credentials inside n8n before running the workflow:\n\n- OpenAI API credentials\n- Google Sheets credentials\n- Gmail credentials\n\nYou may also need to update:\n\n- Google Sheet document IDs\n- Sheet/tab names\n- Filter conditions\n- AI Agent prompt\n- Structured output schema\n- Gmail recipient, subject, and message fields\n- Destination sheet for appended results\n\n## Usage\n\n1. Activate or manually test the workflow in n8n.\n2. The Schedule Trigger starts the automation.\n3. Google Sheets rows are retrieved.\n4. Matching rows are filtered.\n5. The AI Agent processes the selected data.\n6. Gmail sends the generated message.\n7. Results are appended back into Google Sheets.\n\n## Example Use Cases\n\n- Automated email generation from spreadsheet data\n- Scheduled reporting workflows\n- AI-assisted follow-up emails\n- Spreadsheet-based task reminders\n- Data processing and logging automation\n- Gmail and Google Sheets workflow automation\n\n## Security Notes\n\nBefore uploading or sharing your workflow publicly, remove private information such as:\n\n- API keys\n- Credential IDs\n- Private Google Sheet links\n- Gmail addresses you do not want public\n- Personal or customer data\n- Internal business information\n\nDo not commit real credentials to GitHub.\n\n## Future Improvements\n\n- Add Slack or Microsoft Teams notifications\n- Add error handling and retry logic\n- Add workflow execution logs\n- Add multiple email templates\n- Add approval steps before sending emails\n- Add dashboard/reporting output\n\n## Author\n\n**Harshinee Shree G**\n\nB.Tech - Artificial Intelligence \u0026 Data Science\n\n## Topics\n\n- n8n Automation\n- OpenAI\n- Gmail\n- Google Sheets\n- AI Agent\n- Workflow Automation\n\n## Support\n\nIf you found this project helpful, consider giving it a **star** on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshineeshree%2Fn8n-ai-agent-gmail-sheets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshineeshree%2Fn8n-ai-agent-gmail-sheets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshineeshree%2Fn8n-ai-agent-gmail-sheets/lists"}