Create an AI agent that can send and manage emails through Gmail
Install the CLI
Login to Magma
Create Gmail Agent
Agent ID: XXXXX
in the output. Copy this agent id, we will need it in the next section!Create Google Cloud Project
Enable Gmail API
Enable Gmail API
Configure OAuth Consent
https://mail.google.com/
Create OAuth Credentials
AGENT_ID
in the redirect URIs with your actual agent id!Copy Client ID and Secret
Client ID
and Client Secret
values. We will need them in the next step.Configure Environment
.env
file:Local Testing
credentials.json
file in the root of your project. This means it’s working!Deploy
GOOGLE_REDIRECT_URI
in your .env
file to the production redirect uri (https://api.magmadeploy.com instead of localhost).Authentication Issues
.env
fileEmail Sending Issues
credentials.json
existsCommon Issues
https://mail.google.com/
is includedcredentials.json
to version control. Add it to your .gitignore
file!