Templates / Find Microsoft 365 SMTP AUTH senders with Microsoft Graph, OpenAI and Google Sheets

Find Microsoft 365 SMTP AUTH senders with Microsoft Graph, OpenAI and Google Sheets

Ready for 3.0

by Ashish Agarwal · 1 views · created 2026-10-26 · DevOps, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 20 nodes and runs on a schedule (every week at 08:00) (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Telegram and Google Sheets.

How it runs

Trigger: On a schedule (every week at 08:00) (plus 1 other trigger).

  1. Set Configuration Settings (Edit Fields (Set)): sets 3 fields: sign_in_days, usage_period, alert_only_changes
  2. If: checks a condition and branches into true / false
  3. Generate Sample Data (Code): runs custom JavaScript code
  4. Fetch SMTP App Usage (HTTP Request): calls an HTTP API
  5. Fetch SMTP Sign-Ins (HTTP Request): calls an HTTP API
  6. Parse App Usage Data (Code): runs custom JavaScript code
  7. Group Sign-Ins by User (Code): runs custom JavaScript code
  8. Merge: merges the data from its input branches
  9. Compile User Inventory (Code): runs custom JavaScript code
  10. If: checks a condition and branches into true / false

…plus 6 more steps. See the full node list below.

Services it uses

OpenAI Chat ModelTelegramGoogle Sheets

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (12)

From the author

Quick overview This workflow runs weekly to identify Microsoft 365 accounts sending via SMTP AUTH (Basic auth) using Microsoft Graph reports and sign-in logs, generates an OpenAI-based remediation plan for risky accounts, writes the inventory to Google…

Excerpt from Ashish Agarwal's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.