From v5.2
Jetpack CRM supports sending emails from Gmail via OAuth2.0 and the Gmail API. This provides a reliable way to send CRM emails from your WordPress install.
Gmail and Google Workspace have very sensitive outbound email policies. If you’d like to use Gmail for your main Jetpack CRM Mail delivery, you’ll need to go through some extra security steps.
If you’re sending out a lot of mail via Jetpack CRM, it’s probably best to avoid Gmail all together, as they have very fussy spam filters.
Some setup is required due to how Google provides its API support, but once set up, we’ve seen great deliverability for low-volume email sending. Please follow the steps below to get things set up.
Note: The Google user interface changes frequently and varies in different countries and languages. Because of that, the exact name and location of things may differ slightly from what is noted below. You may find it helpful to use the search function within Google Developer Console to find what you’re looking for.
Setting up Gmail OAuth Connection and Mail Delivery Method
Steps to setting up Gmail with Jetpack CRM (from v5.2
+)
- Set up your OAuth Connection in Jetpack CRM
- Create your Google API Credentials
- Setup your Mail Delivery Method
1. Set up your OAuth Connection (in Jetpack CRM settings)
- Log into your WP Admin dashboard and go to Jetpack CRM > CRM Settings > OAuth Connections.
- You should see “Google Mail” listed there. Click the “Connection Settings” button next to Google Mail.
- Copy the “Redirect URI” from the Connection Settings page. You’ll need this while creating your Google API credentials below.
2. Create your Google API Credentials
Before connecting Gmail to Jetpack CRM, you need to make an app for your website in Google API through the Google Developer Console. Don’t worry – you don’t need to be a developer or write code to do this.
2.1 Log into the Google Developer Console with your Google Account, and create a new project.
If you do not have any existing projects in your Google Developer Console, you will likely see a “Create Project” link.
You should see the current project in a dropdown menu at the top of the screen if you already have projects. Clicking the dropdown menu should open a pop-up window with an option to create a new project.
Follow the on-screen prompts to finish naming and creating the project. You can use whatever project name you’d like.
2.2. Go to Enabled APIs and services > + ENABLE API AND SERVICES, which will take you to the Google API Library.
Enter “Gmail” in the search field and select the “Gmail API” option. Click the “Enable” button.
This should bring you back to the “Enabled APIs and services” page, where you should now see Gmail API.
2.3. Go to the OAuth consent screen, where you should see “User Type” options. Select “External” and click the “Create” button.
This should bring you to an OAuth consent screen (form) where you can enter your app information.
2.3.1. Enter the following information in the respective fields (all other fields can be skipped):
- App name: use a name like “{your company} CRM Connector”
- User support email: your email address (or any other email address that you have access to and want to use)
- Authorised domains: your site domain (this should be the domain only, like
jetpack.com
, instead of a full URL, likehttps://jetpack.com
) - Developer contact information: your email address (or any other email address that you have access to and want to use)
Be sure to save the form when you’re done.
This should bring you to OAuth consent screen > Scopes.
2.3.2. Click the “Add or Remove Scopes” button to add a scope. This will bring up a list of scopes with a section where you can manually add scopes.
In the “Manually Add Scopes” section, enter https://www.googleapis.com/auth/gmail.compose
.
Click the “Add to table” button to add the scope to the list of scopes. It should be selected by default.
Click the “Update” button to save your changes.
This should bring you back to the OAuth consent screen > Scopes, where you should see https://www.googleapis.com/auth/gmail.compose
listed in the “Your Restricted Scopes” section.
2.3.3. Click the “Save and Continue” button to bring you to the OAuth consent screen > Test Users.
Add your desired Gmail address as a test user, and click the “Save and Continue” button.
This should bring you to the OAuth consent form > Summary.
Note: If you get an ineligible accounts not added
error, try adding the email address again or adding a different email address. The email address you’re adding must be tied to a Google Account.
2.4. Go to Credentials > + CREATE CREDENTIALS > OAuth Client ID.
Select “Web Application” as the application type, and enter whatever name you’d like in the “Name” field.
In the “Authorised Redirect URIs” section, add the Redirect URI you copied from Jetpack CRM > CRM Settings > OAuth Connections in step 1 of this guide.
Click the “Create” button, which should bring up the API credentials of the OAuth client you just created.
2.5. Copy the “Client ID” and “Client secret” credentials.
Return to Jetpack CRM > CRM Settings > OAuth Connections > Connection Settings, and enter the Client ID and Client secret from Google.
Click the “Save Settings” button to save your changes.
2.6. Click the “Return to OAuth Connections” button to return to the main OAuth connections settings page. Or, go to Jetpack CRM > CRM Settings > OAuth Connections.
Click the “Connect” button to open a Google window asking you to sign in and/or authorize the connection.
2.7. Select your Gmail account, which should match the account/email you added to Google Developer Console earlier.
When Google prompts you about the app not being verified, click “Continue”. You are essentially the developer that has invited the connection, so it’s safe to continue with the connection.
When Google prompts you to choose what can be accessed, make sure “Send email on your behalf” is selected.
Continue following the on-screen prompts until you see a successful completion notice.
You may need to refresh your browser window to see the latest connection status.
3. Setup your Mail Delivery Method in Jetpack CRM
After completing the steps above, you can add the new mail delivery method to Jetpack CRM.
3.1. Go to Jetpack CRM > CRM Settings > Mail > Mail Delivery.
If you have not added any mail delivery methods, click the “Start Wizard” button. Or click the “Add Another” button if you have already added a delivery method.
Follow the on-screen prompts to go through the Mail Delivery Wizard.
3.2. In the “Mail Server” section, select the “API (OAuth)” option, and choose your connected Gmail account.
Continue following the on-screen prompts to complete the Mail Delivery Wizard. Once finished, you should be able to use your Gmail with Jetpack CRM as a mail delivery method.
Read more about Gmail support on our Gmail CRM feature page.