Logos for Codex (blue cloud with terminal symbols) and Gmail separated by a bar on a gradient blue background.

Codex, from OpenAI, can answer emails for you. Here's how.

Diego Amorim's avatar
ChatGPT's complementary tool can be installed on Windows PCs and Macs and accesses Gmail, detects unanswered messages, and drafts messages in your preferred tone. Learn how to set it up in less than 5 minutes.

O Codex, desktop application of OpenAIaccess the gmailIt identifies unanswered emails and creates drafts ready for review and sending. The tool works like an AI agent connected to your account. ChatGPT and runs on Windows PCs and Macs. In addition to generating responses, the Codex It also analyzes your sent email history to learn your writing style and replicate it in future drafts. For those dealing with a busy inbox, it's even possible to schedule a daily automation that repeats the entire process on a recurring basis. The complete setup takes less than five minutes. Here's how:

What is the Codex?

The Codex interface shows a home screen with the text "let's build", the project selection "weather app", and a prompt field with the example "add exponential backoff to the notifications api".
Codex home screen (Image: OpenAI/Press Release)

O Codex is an application of OpenAI which functions as an artificial intelligence agent on the computer, primarily designed as a code assistant, but which can do much more for non-developers.

Different from ChatGPT In the browser, it runs locally and has access to files, folders, and plugins that connect to external services such as gmail, Slack, Google Calendar e Google Drive.

The app works through projects. Each project is basically a folder on the computer, where the Codex It can read, create, and edit files. From this structure, it can perform tasks ranging from code generation to productivity automation.

O Codex It also features a scheduled automation system, which allows you to program recurring tasks without manual intervention.

The download is free and the app is included in all plans. ChatGPTincluding Free and Go. Integration plugins, such as the one for gmail The features used in this tutorial are also available across all tiers. The difference between the plans lies in the usage limits and access to more advanced models.

The tool is available for Windows and macOS. For Linux users, the OpenAI It only offers the CLI (command-line interface) version, installable via the terminal using the command. npm install -g @openai/codex.

Installing the Codex on Windows or Mac

Official page of the Codex on the OpenAI website, showing the logo, description of the AI ​​agent and "download for Windows" button, with a screenshot of the interface editing code in the footer.
Download the Codex from the OpenAI website (Image: OpenAI/Screenshot)

To get started, download the Codex for Windows ou Codex for MacsThe website automatically detects the operating system and displays the corresponding download button.

On Windows, when you run the installer, a window will appear. Microsoft Store Open and start the download, which takes up about 400 MB on disk. On a Mac, the downloaded file is a .dmg, which follows the standard macOS installation process: simply open and drag the app to the Applications folder. In both cases, after installation, the Codex It opens automatically.

On the welcome screen, click on Continue with ChatGPT to log in with your account. If you don't already have one, click on "Register" To create it, the login redirects you to the browser, where you connect your account and return to the app.

Step-by-step guide to replying to your emails with AI.

Once logged in, the Codex You can request to configure the "agent restricted area". Just click on "Set up" and accept the execution.

The main interface displays the side menu with options for New chat, Search, Plugins, Automations e ProjectIn addition to suggested tasks on the main screen, such as "Summarize my unread emails and draft replies," what we're going to do here is set up an assistant to respond to your emails.

Connect your Gmail

Codex interface in dark mode displaying the "new project" context menu and suggestions for connecting Gmail, Slack, and GitHub plugins.
Project start screen in Codex and creation of a new project. (Image: Codex/Screenshot)

The first step is to create a project to work on. Click on "Working on a project" and select “start from scratch”. The Codex Creates a new folder on your computer. To find where it's saved on your computer, right-click on the project and select... "Open in File Explorer" (on Windows) or "Reveal in Finder" (on Mac).

With the project now open, it's time to connect the... gmailThe most practical way is through the menu of Plugins in the sidebar menu. When you open this section, you will find several options organized by category, such as Productivity e coding.

Locate the plugin for gmail and click the "+" icon next to it, or go to the plugin page and click on "Add to Codex"Take the opportunity to explore the other options available, such as Google Calendar, Slack e Google Drivewhich can be useful for other automations.

Codex interface with the "plug-ins" tab active and the Gmail plugin highlighted in red in the productivity list.
Configuration: Select “Plugins” from the menu and add the Gmail connector to allow AI to manage your emails. (Image: Codex/Screenshot)

It's possible that when you click to install the plugin, you'll see a message stating that the app is unavailable. This problem is relatively common and, in most cases, Simply restart your computer to resolve the issue..

When the installation is working, the Codex This redirects to your browser, where you connect your Google account. On the permissions screen, it's important to check the box. "Read, write, and send emails from your Gmail account" so that the Codex You can access your inbox and create drafts. If all goes well, a notification confirms that the gmail It's ready in the app.

Gmail plugin installation window in the Codex, showing privacy permission options and the "Install Gmail" button.
When you click “Install Gmail”, the app will request permission to access your Google account to perform automated responses (Image: Codex/Screenshot)

About privacy, the OpenAI It states that it does not train its models with data from gmail and that the synchronized data follows Google's own privacy policies. Each external service connected to Codex It maintains its own authentication and data protection rules.

Even if at some point you decide you don't want to maintain this integration with the gmailTo remove access at any time, simply uninstall the plugin directly in the app.

The initial prompt

Codex typing interface showing the "@" symbol in the prompt and the dropdown menu with the "gmail" option highlighted.
The “@” symbol in the text field allows you to manually select the Gmail plugin to ensure the AI ​​uses the correct tool.

With gmail Once that's configured, go back to the chat in your project and send a prompt asking... Codex to draft responses. The most direct way is to start the prompt with @Gmail to manually specify which plugin to use. This ensures that the Codex Access the correct tool, especially when you have multiple plugins installed. An example of a prompt:

"@Gmail Create draft replies to my unread emails. Do not reply without my permission."

It can be something straightforward like that, but the more context you add, the better the result will likely be. You can specify filters (like ignoring newsletters) or request a specific tone directly in the prompt.

In the test performed for this tutorial, the Codex He worked for about a minute. He identified the connector of gmail, located the unread emails and read the content of each conversation before generating the drafts.

The codex interface displays the command prompt and detailed execution log, where AI confirms reading 5 emails and creating the corresponding drafts.
The Codex provides step-by-step information on which emails have been read and justifies the creation of drafts based on context and sender.

Four of the messages were personal test emails I sent from another account, which required a response, and one was a newsletter from... NVIDIA/LinkedIn. O Codex He identified on his own that the newsletter had a "noreply" sender and flagged that the draft should probably not be sent.

Review and send the drafts.

Gmail interface in dark mode showing the "drafts" folder with "in:draft" search and a list of emails automatically generated by Codex, including messages from Diego and Nvidia about events and meetings.
After the Codex process, the drafts appear in the inbox ready for review and manual submission by the user.

When opening the gmail After the process, the drafts appear in your inbox ready for review. Each draft is linked to the original conversation, and you just need to click to check the content before sending.

In the test, the responses were natural in tone and demonstrated an understanding of the context of each message.

Gmail interface showing a reply window with a draft generated by Codex for an academic event invitation, maintaining a professional and contextual tone.
Draft created by Codex: AI understood the context of the call for papers and drafted a natural response, awaiting only human review and deadline confirmation before submission.

In an email about a call for papers for a conference, for example, the Codex He drafted a reply thanking them for the invitation, mentioning that he had ongoing projects that could fit the theme, and requesting more information about format and deadlines. With a quick review and minor adjustments, all drafts are ready for submission in just a few minutes.

It's important to reiterate that no emails were sent automatically. Codex It simply creates the drafts, and you decide what to do with each one. This is one of the instructions the prompt itself provides ("Do not respond without my permission"), and I recommend you include this in your prompt as well.

With that, the basics are already done. If all you need is to draft quick replies to unread emails, the process ends here.

But the Codex It allows you to go further: in the following sections, you'll learn how to teach AI to write in your style and schedule the entire process to run automatically every day.

Teaching Codex to write in your style.

Text editor displaying the email-response-style.md file created by Codex with guidelines for tone, structure, greetings, and closings to standardize responses.
AI analyzes your history and generates an editable document so that drafts retain your voice and communication style.

O Codex You can already generate responses with a natural tone on your own, but if you want your drafts to be even more like your own writing style, you can teach them. This is an extra, non-mandatory step that refines the quality of your responses over time. There are two ways to do this.

The first is to include an instruction directly in the prompt whenever you request drafts. Something like, "Analyze my response pattern in the last emails sent to maintain the same style in the drafts." It works, but requires repeating the instruction every time.

The second way, which is more practical in the long term, is to ask... Codex To analyze the history of submitted responses and save a style guide within the project. The prompt might be:

"Analyze my email response style and use that information to create and store a standard response style in the project."

The Codex interface displays the processing log where AI reports the analysis of sent emails, the filtering of automatic messages, and confirmation of the creation of the style guide file "docs/email-response-style.md".
The Codex examines the message history, ignores noise such as unsubscribe emails, and generates a guidelines file to standardize future responses.

In the test, the Codex It worked for about a minute and a half. It analyzed the emails sent, automatically ignored automated unsubscribe messages, and focused on genuine responses to people. It identified patterns such as greeting, tone, and closing structure and generated a file called email-response-style.md inside the project folder.

This file maps the overall tone (cordial, direct, without excessive embellishment), the standard structure of responses (short greeting, objective in the first paragraph, short closing), and variations in register between professional and academic contexts.

The strength of this approach is that the file remains accessible for editing. You can open it in any text editor and adjust details manually, or discuss it with the... Codex and ask him to change the style himself. For example, it's possible to set all responses to end with "Hugs" followed by an emoji, if that's your default.

From then on, the next times you request drafts for this project, simply indicate in the prompt that the Codex Use the style file as a reference. Or specify this in the automation prompt, which we will see next.

Create daily automation

Codex interface showing the "automations" section with a highlighted side menu and pre-configured automation cards organized by categories such as "repo maintenance" and "growth & exploration," with a "new automation" button at the top.
Automation hub: Codex offers ready-made templates for different tasks, but you can create custom automations, such as daily unread email checks. (Image: Codex/Screenshot)

For the Codex Repeat this entire process repeatedly, click on "Automation" in the side menu and then in "New automation".

On the creation screen, select the project you used in the previous steps (the same folder where the file was located). email-response-style.md (It was saved, if you created it).

Project selection menu in the Codex showing "Gmail Automation" configured to run daily at 9 AM.
Automation configuration: select the project and set the task execution time.

Next, define the execution environment. Codex It offers three options: Local News, which runs directly in the project folder and can read the files that are there (it is the most direct and recommended way to do this task); Worktree, which creates an isolated copy of the folder to avoid mixing automatic changes with manual edits, but requires the project to be a Git repository; and Chat, which functions as a standalone conversation with access to plugins, without being tied to any local folder.

Automation configuration menu displaying execution options: local, worktree, and chat.
Select the execution environment: use “Local” so that the AI ​​can access the project files and style guide.

In any of these options, The computer and the Codex need to be switched on at the scheduled time. Therefore, it's worth setting it for a time when you know you'll be on your PC. 9 AM, for example, is a good choice for those who want to start the day with their drafts ready.

In the icons next to the cube and the brain, you can choose the AI model and level of reasoningFor this type of automation, it's not necessary to use the most advanced model; average, or perhaps even less advanced, reasoning is sufficient.

AI model selection dropdown menu displaying GPT options, with the GPT-5.4 version selected.
Choosing a template: For email automations, it's not necessary to use the most advanced version; a standard template is sufficient.

With everything configured, define the automation prompt. You can reuse the previously used prompt and add more context. If you created the style file previously, mention it in the prompt. A complete example:

"Every day at 9 AM, check my @Gmail and look for unread emails that need a response."

Use the email-response-style.md file as a reference for writing in my style.

Ignore newsletters, advertisements, automated notifications, unsubscribe emails, and messages that clearly don't require a response.

For each email that requires a reply, create a draft response in Gmail.

"Do not send any emails without my permission."

By clicking on "To create"The automation appears in the list and is immediately active. Clicking on it allows you to edit the parameters or execute manuallyin case the computer was turned off during the scheduled time.

The Codex interface, in the "automations" tab, shows the "scheduled automatic draft" task configured to run daily at 9:00 AM.
The Codex interface, in the "Automations" tab, shows the "Scheduled Automatic Draft" task configured to run daily at 9:00 AM.

By completing all these steps, you already have the Codex Configured as a personal assistant to answer your unread emails. You can create your own prompts with customized instructions that make sense for your work, or even change the frequency of the automation.

If you don't have a very active inbox, for example, you can set the automation to run every week at the start of Monday. In addition, of course, you can explore other automation options using the... Codex.

But what about you? Would you use AI to answer your emails? Tell us in the comments and on our social media! showmetech!

See also:

Text revised by Alexandre Marques in 11 / 05 / 2026.

With information: OpenAI Developers | OpenAI | OpenAI Academy | Paul J. Lipsky via YouTube.


Discover more about Showmetech

Sign up to receive our latest news via email.

Related Posts