Automate network checks and send results to Google Sheets using n8n + lightweight Python scripts.
- Ping host + check TCP 22/SSH reachability (from your n8n environment).
- Daily schedule or manual trigger.
- Append structured results to Google Sheets: Date, Host, Ping, SSH, Status.
network-audit-automation/
ββ README.md
ββ n8n-workflow.json # import into n8n
ββ scripts/
ββ ssh_audit.py # sample local test for SSH port
ββ firewall_audit.py # sample local firewall info (optional)
- Import
n8n-workflow.jsoninto your n8n instance. - In node Set Hosts, change the array to your target hosts.
- Create a Google Sheet with sheet name Audit and header row:
Date | Host | Ping | SSH | Status - In node Google Sheets: Append set:
- Credentials (Google API)
- Document ID (from your Google Sheets URL)
- Run Once or wait for the daily schedule (00:00 UTC).
Note: The connectivity checks run from the n8n host/container. Make sure
pingandncare available. For Debian/Ubuntu-based images:apt-get update && apt-get install -y iputils-ping netcat-openbsd
Run the sample Python script locally:
python3 scripts/ssh_audit.py 8.8.8.8
python3 scripts/firewall_audit.pyMIT