{"id":19447714,"url":"https://github.com/YanivHaliwa/Email-Terminal","last_synced_at":"2026-07-18T16:30:18.366Z","repository":{"id":258767507,"uuid":"867853955","full_name":"YanivHaliwa/email-ai","owner":"YanivHaliwa","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-07T20:01:33.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-07T23:17:09.537Z","etag":null,"topics":["automation","command-line","cron","cronjob","email-scheduling","email-sender","gmail","google-api","gpt","oauth","openai"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/YanivHaliwa.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}},"created_at":"2024-10-04T21:21:56.000Z","updated_at":"2024-12-07T20:01:36.000Z","dependencies_parsed_at":"2024-12-07T21:27:07.092Z","dependency_job_id":null,"html_url":"https://github.com/YanivHaliwa/email-ai","commit_stats":null,"previous_names":["yanivhaliwa/email-ai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YanivHaliwa%2Femail-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YanivHaliwa%2Femail-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YanivHaliwa%2Femail-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YanivHaliwa%2Femail-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YanivHaliwa","download_url":"https://codeload.github.com/YanivHaliwa/email-ai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240636665,"owners_count":19832922,"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","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":["automation","command-line","cron","cronjob","email-scheduling","email-sender","gmail","google-api","gpt","oauth","openai"],"created_at":"2024-11-10T16:19:15.512Z","updated_at":"2026-07-18T16:30:18.327Z","avatar_url":"https://github.com/YanivHaliwa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":" \n# Gmail Automation Interaction Toolkit: \n\n## Automated Emailing with OpenAI Integration and Command-Line Email Management\n\n\n### `emi.py` - Email Interaction Tool\n\nThis script allows users to read from and send emails via the command line, offering functionality to interact with their Gmail in a more flexible manner.\n\n#### Key Features:\n- **Read Emails**: Can fetch and display emails with options to specify how many emails to read.\n- **Send Emails**: Provides a command-line interface to send emails, allowing users to input the recipient, subject, and body.\n- **Argument Parsing**: Uses argparse to handle input options, making it easy to integrate into other scripts or workflows.\n\nfor more scripts using GPT for translation and subtitle check here: [Subtitle Management Tools section in the main README](https://github.com/YanivHaliwa/Linux-Stuff/tree/master?tab=readme-ov-file#subtitle-management-tools).\n\n#### Usage:\n- **Read Emails**: Use the `-r` flag to read emails. You can specify the number of emails to read as an argument.\n- **Send Emails**: Use the `-s` flag followed by the recipient's email address to send an email. The script will prompt for the subject and message body.\n\n#### Example Command:\n```bash\n# Read the latest 5 emails\npython emi.py -r 5\n\n# Send an email\npython emi.py -s example@example.com\n```\n\n\n### `autogmail.py` - Automated Email Sender with OpenAI Integration\n\nThis script automates sending emails using Gmail through a scheduled task (like a cron job). It uses the Google API to authenticate and send emails, and OpenAI's API to generate dynamic email content.\n\n#### Key Features:\n- **OpenAI Content Generation**: Leverages OpenAI's GPT model to create email content based on a predefined prompt.\n- **Automated Email Dispatch**: Configured to send emails at specific intervals using scheduling tools like crontab.\n- **Custom Email Configuration**: Users can set their email address, subject, and utilize dynamic content in the body.\n\n#### Usage:\n- **Setup**: Ensure `credentials.json` and `token.pickle` are placed in the same directory as the script.\n- **Configuration**: Modify the email parameters within the script to match your sender and recipient details.\n- **Scheduling**: Add the script to your crontab or another scheduler to run at your desired frequency.\n\n#### Example Cron Setup:\n```bash\n# Run every day at 9 AM\n0 9 * * * /usr/bin/python3 /path/to/autogmail.py\n```\n\n# Google API Authentication Setup\n\nThis guide provides a step-by-step process for setting up Google API authentication for your Python projects using `credentials.json` and `token.pickle`.\n\n## Prerequisites\n\n- A Google Cloud account\n\n\n### Step 1: Google Cloud Project Setup\n\n1. **Open Google Cloud Console**: Visit the [Google Cloud Console](https://console.cloud.google.com/apis/dashboard).\n2. **Create or Select a Project**: If you haven't already created a project:\n    - Click on the project dropdown next to the Google Cloud Platform logo.\n    - Click **New Project**, give it a name, and click **Create**.\n\n### Step 2: Enable APIs\n\n1. **Enable Gmail API**:\n   - Navigate to the [Gmail API page](https://console.cloud.google.com/apis/library/gmail.googleapis.com?project=email-392618).\n   - Click **Enable** to activate the Gmail API for your project.\n\n### Step 3: Configure Credentials\n\n1. **Navigate to Credentials**:\n   - Go to the **Credentials** tab on the left sidebar in the Google Cloud Console.\n2. **Create OAuth Client ID**:\n   - Click **Create credentials** and select **OAuth client ID**.\n   - Choose **Desktop app** as the Application type.\n   - Click **Create**.\n   - In the window that appears, click **Download JSON**.\n   - Rename the downloaded file to `credentials.json`.\n   - Move this file to the same folder location as your Python script.\n\n## Security Note\n\nKeep your `credentials.json` and `token.pickle` secure, especially if you are using shared machines or deploying your application publicly. Consider using environment variables or other methods to protect sensitive information.\n\n\n\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYanivHaliwa%2FEmail-Terminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYanivHaliwa%2FEmail-Terminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYanivHaliwa%2FEmail-Terminal/lists"}