HowTo: Set Up AttackPhish Direct Injection for Google Workspace (Gmail)

2nd December 2026 | HowTo HowTo: Set Up AttackPhish Direct Injection for Google Workspace (Gmail)

Some phishing tests never get the chance to fool anyone. Gmail spots them, quarantines them, and your results say “great job, everyone!” when nobody ever saw the email. Direct Injection fixes that for Google Workspace.

What is Direct Injection?

Normally, AttackPhish sends simulations by email, so they pass through Gmail’s spam and phishing filters like any other message. With Direct Injection turned on, AttackPhish places the simulation straight into your Google-synced users’ inboxes using the Gmail API. The message never goes through Gmail’s inbound phishing protection, so Gmail can’t quarantine it.

Why it matters

  • Simulations actually reach the inbox. Your people see the test the way they’d see a real message.
  • Your results mean something. A click rate only tells you about behavior if the email was delivered.
  • A safety net. If a message can’t be injected, AttackPhish still sends it by email as usual.

Before you start

  • Your users are synced from Google Workspace in CyberHoot (Direct Injection applies to Google-synced users).
  • You (or your client’s admin) can sign in to the Google Admin console as a super admin.
  • You can open the Google Workspace sync Settings in CyberHoot Autopilot (Tenant > Users > Google Workspace > Settings).

Setup: Google Workspace (Gmail)

Step 1: Copy the Client ID and scope from CyberHoot

  1. In CyberHoot Autopilot, open the tenant and go to Tenant > Users > Google Workspace > Settings. Find the AttackPhish Delivery section.
  2. Copy the Client ID and the OAuth scope shown there. (The scope is https://www.googleapis.com/auth/gmail.insert, which lets CyberHoot add messages to a mailbox and nothing else.)

If you see “Gmail API delivery isn’t available on this site yet,” the option hasn’t been switched on for your site. Contact support.

Step 2: Authorize it in Google Admin

  1. Sign in to the Google Admin console as a super admin.
  2. Go to Security → Access and data control → API controls → Manage Domain Wide Delegation.
  3. Click Add new.
  4. Paste in the Client ID and the OAuth scope from Step 1, then save.

Step 3: Send a test

  1. Back in CyberHoot’s AttackPhish Delivery section, click Send test injection.
  2. Check your own mailbox. You should find a message with a subject ending in “Gmail direct injection test” in your inbox. It’s safe to delete.

If the test fails with unauthorized_client, the Client ID and scope haven’t been authorized in Google Admin yet. Re-check Step 2.

Step 4: Turn it on

  1. Tick Deliver AttackPhish via Gmail API.
  2. Save your sync settings.

From then on, AttackPhish simulations to your Google-synced users go straight to their inboxes.

Troubleshooting

  • Test fails with unauthorized_client: the Client ID or scope wasn’t added under Domain Wide Delegation, or was mistyped.
  • Test says the mailbox isn’t on your domain: the test only works for a domain your Google-synced users are on.
  • Checkbox and test button are greyed out: Gmail API delivery isn’t available on your site yet. Contact support.

Need a hand?

Stuck on a step? Contact CyberHoot support at support@cyberhoot.com.

Not using AttackPhish yet? Start there, and give your team phishing tests that actually land.

Latest Blogs

Stay sharp with the latest security insights

Discover and share the latest cybersecurity trends, tips and best practices – alongside new threats to watch out for.

Android Malware – Godfather Tech – Wants Your Financial Credentials

Android Malware – Godfather Tech – Wants Your Financial Credentials

Author: Katie Boquetti | Editorial: Craig Taylor Editorial by Craig Taylor: If Hollywood pitched a movie...

Read more
CyberHoot Advisory: AI-Powered Cyberattacks are Growing

CyberHoot Advisory: AI-Powered Cyberattacks are Growing

What Businesses Need to Know about ARTEX and Your Defenses The takeaway: AI tools like ARTEX are making...

Read more
Speed Traps vs. Safe Driver Discounts: Why Rewards Build Better Security Habits

Speed Traps vs. Safe Driver Discounts: Why Rewards Build Better Security Habits

Picture yourself on the highway, cruising about 20 over the limit with the rest of traffic. Up ahead, brake...

Read more