{"id":21269399,"url":"https://github.com/jparedesds/email-mapi-automation","last_synced_at":"2025-08-11T16:04:48.466Z","repository":{"id":239567792,"uuid":"799919430","full_name":"jparedesDS/email-mapi-automation","owner":"jparedesDS","description":"Automation of documentation entry through email(Outlook/IMAP) to excel and BBDD (ERP)","archived":false,"fork":false,"pushed_at":"2025-05-07T11:38:52.000Z","size":402,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T12:39:52.815Z","etag":null,"topics":["beautifulsoup4","imap-client","numpy","outlook","pandas","regex","shutil","timestamp","xlsxwriter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jparedesDS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-05-13T11:06:21.000Z","updated_at":"2025-05-07T11:38:55.000Z","dependencies_parsed_at":"2025-01-10T08:33:12.524Z","dependency_job_id":"e060b6db-b8b3-4a24-b69c-e65bda8c2592","html_url":"https://github.com/jparedesDS/email-mapi-automation","commit_stats":null,"previous_names":["jparedesds/email-mapi-automation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jparedesDS/email-mapi-automation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparedesDS%2Femail-mapi-automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparedesDS%2Femail-mapi-automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparedesDS%2Femail-mapi-automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparedesDS%2Femail-mapi-automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jparedesDS","download_url":"https://codeload.github.com/jparedesDS/email-mapi-automation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparedesDS%2Femail-mapi-automation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269915168,"owners_count":24495647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"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":["beautifulsoup4","imap-client","numpy","outlook","pandas","regex","shutil","timestamp","xlsxwriter"],"created_at":"2024-11-21T08:08:24.786Z","updated_at":"2025-08-11T16:04:48.423Z","avatar_url":"https://github.com/jparedesDS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Email MAPI Automation\n\n## Project Description\n**Email MAPI Automation** is a fully automated solution designed to process HTML tables embedded in the body of emails, modify the data, and update a database. Additionally, it generates and sends a new email with the updated data and includes a dynamically generated Excel file as an attachment.\n\n### Project Workflow\n1. **Email Reception:**\n   - The program captures emails from a specified address every 30 minutes, between 7:30 a.m. and 5:00 p.m.\n   - Emails include an HTML table embedded in the body.\n\n2. **Data Extraction and Modification:**\n   - Data from the HTML table is extracted and converted into a manipulable format (Pandas DataFrame).\n   - Modifications are applied to the data, and new columns are created to ensure compatibility with the database entry.\n\n3. **Automated Email Generation:**\n   - A new automated email is created, which includes:\n     - Information about the data transmitted and updated in the database.\n     - An `.xlsx` file containing the processed data attached to the email.\n     - Recipients are automatically selected based on the processed data.\n\n4. **Database Update:**\n   - After sending the email via Outlook, the processed tables are selected, and the database is updated accordingly.\n\n## Libraries Used\nThe project uses the following Python libraries:\n- **pandas**: For data manipulation and analysis.\n- **numpy**: For advanced numerical operations.\n- **shutil**: For file and directory management.\n- **os**: For operating system interactions.\n- **BeautifulSoup**: For HTML parsing and data extraction.\n- **re (Regex)**: For pattern matching and text manipulation.\n- **xlsxwriter**: For creating Excel files.\n- **timestamp**: For handling date and time.\n- **win32com.client**: For Outlook automation to manage emails.\n\n## Key Features\n- **Fully Automated:** Automatic email and data processing.\n- **Email Management:** Automated generation and sending of emails with updated data and attachments.\n- **Database Integration:** Prepares data for seamless integration into an existing database.\n- **Dynamic Processing:** Handles HTML tables of various formats dynamically.\n\n## System Requirements\n- **Operating System:** Windows (required for Outlook automation).\n- **Python 3.x**\n- Additional dependencies installed via `pip`.\n\n## How to Run\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/jparedesDS/email-mapi-automation.git\n2. Install the required dependencies:\n```\npip install -r requirements.txt\n```\n3. Configure the email address and time intervals in the configuration file.\n4. Run the main script:\n```\npython main.py\n```\n## Contributions\nContributions are welcome! If you'd like to improve this project, please:\n\n1. Fork the repository.\n2. Create a new branch (git checkout -b feature/new-feature).\n3. Make your changes and commit them (git commit -am 'Add new feature').\n4. Push your branch (git push origin feature/new-feature).\n5. Open a Pull Request.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjparedesds%2Femail-mapi-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjparedesds%2Femail-mapi-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjparedesds%2Femail-mapi-automation/lists"}