CanIPhish can integrate directly with Google Workspace through the Gmail API. Using this API we can inject simulated phishing and notification emails directly into employee inboxes, bypassing the need for traditional email allowlisting!
Note: CanIPhish uses one service account for your workspace. If email quarantine is already connected to Google Workspace, this setup shows the same client ID, and you give its existing domain-wide delegation entry both scopes. See Already using email quarantine?
Table of contents:
- Step 1. Specify The Integration Name
- Step 2. Assign Permissions To The CanIPhish Service Account
- Step 3. Test The Connection
- Frequently Asked Questions
Step 1. Specify The Integration Name
1.1. Log in to your CanIPhish account, open Platform Settings > Email Delivery Settings, click New Email Provider and select Google Workspace:
1.2. In Set up Direct Email Injection for Google Workspace, enter a unique name under Name the integration. You can set up more than one integration, and the name tells them apart:
Step 2. Assign Permissions To The CanIPhish Service Account
2.1. Under Grant access, the dialog shows the client ID of the service account CanIPhish manages for your workspace (shown in the screenshot above). Copy it with the copy button: you'll need it in Google Admin.
2.2. Open a new browser tab and log in to the Google Admin Console.
2.3. Go to Security > Access and data control > API Controls:
2.4. Click MANAGE DOMAIN WIDE DELEGATION at the bottom of the page:
2.5. Click Add new next to API clients:
Note: If email quarantine already uses this client ID, it's already in the API clients list. Find its row and click Edit instead. Clicking Add new and ticking Overwrite existing client ID also works, as long as you enter both scopes in step 2.7.
2.6. In the Client ID field, enter the client ID you copied in step 2.1.
2.7. In the OAuth scopes field, enter the following scope and click AUTHORIZE:
https://www.googleapis.com/auth/gmail.insertIf you've setup email quarantine (inside phish triage), enter both scopes instead, so quarantine keeps working:
https://www.googleapis.com/auth/gmail.insert,https://www.googleapis.com/auth/gmail.modifyStep 3. Test The Connection
3.1. Go back to the CanIPhish browser tab.
3.2. Under Test the connection, enter the address of a Google Workspace mailbox and click Test connection. CanIPhish checks that it has the access it needs in that mailbox, and changes nothing. A message tells you whether the test passed.
Note: Google can take a while to apply new delegation, usually a few minutes. If the test fails straight after you authorise, wait and test again.
3.3. When the test passes, click Save:
3.4. As a final and optional step, set the new integration as your default delivery provider: open the actions menu (⋮) on its row and choose Set as default. The default is selected whenever a new campaign is created and is used for notifications. Existing campaigns keep the mail server they were created with; see Troubleshooting: Direct Email Injection.
Frequently Asked Questions
What happens if a user doesn't exist within the Google Workspace Tenant?
If the user is sent a simulated phishing email, the campaign shows Failure - Employee Not Found In Google Workspace next to their email address. If the user is sent a notification, then a fallback to use CanIPhish email servers will occur to ensure the notification is still sent.
Why does email quarantine show the same client ID?
CanIPhish manages one service account per workspace for Google Workspace. Whichever feature you connect first, direct email injection or email quarantine, sets it up, and the other uses the same one. Its domain-wide delegation entry lists the scopes for the features you use: gmail.insert for direct email injection and gmail.modify for email quarantine. Workspaces that got two service accounts before 25 October 2026 keep both, each with its own client ID and entry.
Comments
0 comments
Please sign in to leave a comment.