Quick overview
This workflow runs monthly to collect SOC 2 evidence from GitHub, AWS IAM, and Google Workspace, logs checks to a Google Sheets evidence ledger, generates a summary in Google Docs, exports it to PDF in Google Drive, emails it via Gmail, and posts a Slack alert if any source fails.
How it works
- Runs on a monthly schedule (or manually for testing) and loads configuration values like org IDs, lookback windows, and notification targets.
- Queries the GitHub API for organization members without 2FA and records a pass/fail (or “evidence_unavailable” with remediation details) for CC-6.1.
- Calls AWS IAM to generate and download the credential report, reads root MFA status, and evaluates IAM user MFA and access key age against the rotation threshold for CC-6.1 and CC-6.2.
- Pulls Google Workspace Admin audit logs for the configured lookback period and directory user 2-step verification enrollment to flag privileged actions (CC-7.2) and 2FA gaps (CC-6.1).
- Merges all findings into a single evidence set, appends each row to the “Evidence” tab in Google Sheets, and builds a per-control rollup with posture and top remediation items.
- Creates a Google Docs summary document, writes the compiled evidence summary into it, exports the document as a PDF from Google Drive, and emails it to the configured recipient via Gmail.
- Posts a warning message to Slack if any evidence source failed and had to emit “evidence_unavailable” rows.
Setup
- Create a Google Sheet with a tab named “Evidence,” then add Google Sheets credentials in n8n and set the Sheet ID and Drive folder ID in the workflow configuration.
- Add a GitHub personal access token that belongs to an organization owner with the read:org scope, and set your GitHub organization name in the workflow configuration.
- Add AWS credentials with permissions iam:GenerateCredentialReport, iam:GetCredentialReport, and iam:GetAccountSummary, and confirm the region and key age threshold values.
- Add a Google OAuth2 credential with admin scopes (admin.reports.audit.readonly and admin.directory.user.readonly), and set your Google customer ID and lookback days.
- Add Gmail credentials and set the notification email address, and add Slack credentials and set the target channel ID for failure alerts.