{"product_id":"fortigate-sd-wan-monitor-n8n-workflow-gmail-alerts-top-user","title":"FortiGate SD-WAN Monitor n8n Workflow: Gmail Alerts \u0026 Top User","description":"\u003ch3\u003eFortiGate SD-WAN monitoring that emails you real-time health, bandwidth, and “top user” insights\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow continuously monitors your FortiGate SD-WAN link health and bandwidth usage, then sends automated Gmail alerts and HTML reports for WAN outages, congestion, and slow connections—plus an optional, passphrase-verified command flow to identify (and clear) the top bandwidth user via SSH.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTriggers by email or schedule:\u003c\/strong\u003e Runs when a matching Gmail message is received or automatically every \u003cstrong\u003e10 minutes\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eParses the newest allowed email command:\u003c\/strong\u003e Determines whether to generate a \u003cstrong\u003eread-only report\u003c\/strong\u003e or request a \u003cstrong\u003esession clear\u003c\/strong\u003e action.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eVerifies the command sender:\u003c\/strong\u003e Loads the full email to validate the sender before any kill\/session-clear operation is performed.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eQueries FortiGate via REST API:\u003c\/strong\u003e Retrieves SD-WAN member health-check status, interface bandwidth capacity, and \u003cstrong\u003eFortiView top sources and destinations\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eClassifies WAN quality:\u003c\/strong\u003e Labels each WAN as \u003cstrong\u003eOK \/ SLOW \/ CHOKED \/ DOWN\u003c\/strong\u003e using capacity, latency, and packet loss thresholds, and selects an eligible top private-IP bandwidth user that is not in a protected list.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOptional automated remediation:\u003c\/strong\u003e If the verified command requests it, the workflow connects to FortiGate via \u003cstrong\u003eSSH\u003c\/strong\u003e, clears sessions for the selected top source, waits \u003cstrong\u003e10 seconds\u003c\/strong\u003e, then re-queries results.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends Gmail reports:\u003c\/strong\u003e Sends an HTML email report on every valid command, or only during WAN problems and once on recovery for scheduled monitoring.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eGet Gmail alerts when SD-WAN links move to \u003cem\u003eDOWN\u003c\/em\u003e or \u003cem\u003eCHOKED\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003eInvestigate sudden bandwidth spikes by automatically identifying the \u003cstrong\u003etop bandwidth user\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eRun controlled, passphrase-verified “clear sessions” commands to accelerate troubleshooting without manual FortiGate CLI work.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e FortiGate REST API (SD-WAN + FortiView top sources\/destinations), \u003cstrong\u003eGmail\u003c\/strong\u003e, \u003cstrong\u003eSSH\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes\/logic:\u003c\/strong\u003e \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, \u003ccode\u003essh\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003ewait\u003c\/code\u003e, \u003ccode\u003egmail\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAuthentication:\u003c\/strong\u003e Uses a FortiGate API admin plus an \u003cstrong\u003en8n HTTP Header Auth\u003c\/strong\u003e credential with a \u003cstrong\u003eBearer token\u003c\/strong\u003e for the FortiGate API.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46289141465267,"sku":"N8N-21634","price":15.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/VEEr94FkFcSiFCFIOPdwT_ZnpBBs6W.png?v=1793006402","url":"https:\/\/buyflowscripts.com\/products\/fortigate-sd-wan-monitor-n8n-workflow-gmail-alerts-top-user","provider":"N8N Commerce","version":"1.0","type":"link"}