Enabling Direct Mail Injection and Directory Sync for Google
In this guide you will learn how to enable Direct Mail Injection and Directory Sync for Google in order to schedule campaigns.
Click below for a full screen walkthrough video.
▶️ Enabling Direct Mail Injection and Directory Sync for Google
Part 1: Google Cloud Console
1. Enabling Direct Mail Injection and Directory Sync for Google
Let's set up Direct Mail Injection and connect Directory Sync for Google with the CyberNut Admin Portal together. I'll guide you through each step.
2. First, let's access the Google Cloud Console. Login to http://console.cloud.google.com and click the Project button in the top menu.

3. Now click New Project to create a dedicated space for our CyberNut integration.

4. Enter CyberNut as your project name so it's easy to identify later.

5. Click Create to set up your new project.

6. Select the newly created CyberNut project from your projects list.

7. In the search box, type and select Gmail API - this will allow CyberNut to connect with your Gmail service.

8. Click the Enable button to activate the Gmail API for your project.

9. Search and select Cloud Identity. (Note: Only needed for those that use Dynamic Groups). Tip: might try typing cloudidentity without any spaces.

10. Select Enable.

11. We also need the Admin SDK. Search for Admin SDK API and click Enable when found.

12. Click the hamburger menu button (three horizontal lines) in the top left corner to access more options.

13. Hover over APIs & Services in the menu, then click Credentials from the submenu.

14. Click +Create credentials to set up credentials we'll need.

15. Select Service Account from the options menu.

16. Complete the Service Account details with the following information and click Done:
Service Account Name: CyberNut
Description: Service Account for CyberNut Administration

17. On the Service Accounts page, click on the blue hyperlink for the Service Account you just created.

18. Click the Keys tab to manage authentication keys for this service account.

19. Click Add key and then select Create new key from the dropdown menu.

20. Click Create to generate a new key. A JSON file will download automatically - keep this safe, we'll need it later.
Caution: Do not open the .json file or the file may become corrupt.

21. Click the Details tab to view more information about your service account.

22. Click Advanced settings to access additional configuration options.

23. Locate and copy the Client ID. We'll use this in the Google Admin Console shortly.

24. Now let's switch to the Google Admin Console. Login at http://admin.google.com and click Security in the left navigation.

25. Click Access and data control and then select API controls from the submenu.

26. Look for and click Domain wide delegation to manage service account access.

27. Click the Add new button to connect a new service account.

28. Paste in the Client ID you copied earlier from the service account details.

29. Add the 11 scopes below. Copy and paste the entire comma separated list together.
https://www.googleapis.com/auth/admin.reports.audit.readonly, https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.group.member.readonly, https://www.googleapis.com/auth/admin.directory.user.readonly, https://www.googleapis.com/auth/gmail.insert, https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.modify,https://mail.google.com/,https://www.googleapis.com/auth/admin.directory.user,https://www.googleapis.com/auth/admin.directory.user.security,https://www.googleapis.com/auth/cloud-identity.groups.readonly

30. Click Authorize.

Part 2: Google Admin Console
31. Log in to the CyberNut Admin Portal at http://admin.cybernut.com. Then click Settings in the main navigation.

32. Select the Integrations tab.

33. Select the Upload JSON key instead button and upload the file you downloaded from the Google cloud project. This will fill in the Service account email and Service account private key.

34. Type in the email used in the Google cloud console in the box labeled Google Workspace admin email.

35. Select the General tab to review the settings.

36. Click "Direct Mail Injection" to choose how emails get delivered.

37. Click here and select the time zone.

38. Click "Save" to lock in these settings.
