Manage AWS S3 with GPT-4 Agent and Google Sheets Audit Logging via Slack
AI-Powered AWS S3 Manager with Audit Logging in n8n (Slack/ChatOps Workflow) > This n8n workflow empowers users to manage AWS S3 buckets and files using natural language via Slack or chat platforms. Equipped with an OpenAI-powered Agent and integrated audit logging to Google Sheets, it supports operations like listing buckets, copying/deleting files, managing folders, and automatically records every action for compliance and traceability. ๐ฅ Whoโs it for This workflow is built for: DevOps engineers who want to manage AWS S3 using natural chat commands. Technical support teams interacting with AWS via Slack, Telegram, etc. Automation engineers building ChatOps tools. Organizations that require audit logs for every cloud operation.
Users donโt need AWS Console or CLI access โ just send a message like โCopy file from dev to prodโ. โ๏ธ How it works / What it does This workflow turns natural chat input into automated AWS S3 actions using an OpenAI-powered AI Agent in n8n. ๐ Workflow Overview: Trigger: A user sends a message in Slack, Telegram, etc. AI Agent: Interprets the message Calls one of 6 S3 tools: ListBuckets ListObjects CopyObject DeleteObject ListFolders CreateFolder S3 Action: Performs the requested AWS S3 operation. Audit Log: Logs the tool call to Google Sheets using AddAuditLog: Includes timestamp, tool used, parameters, prompt, reasoning, and user info.
๐ ๏ธ How to set up Step-by-step Setup: Webhook Trigger Slack, Telegram, or custom chat platform โ connects to n8n.
OpenAI Agent Model: gpt-4 or gpt-3.5-turbo Memory: Simple Memory Node Prompt: Instructs agent to always follow tool calls with an AddAuditLog call.
AWS S3 Nodes Configure each tool with AWS credentials. Tools: getAll: bucket getAll: file copy: file delete: file getAll: folder create: folder
Google Sheets Node
Sheet: AWS S3 Audit Logs
Operation: Append or Update Row
Columns (must match input keys):
timestamp, tool, status, chat_prompt, parameters, user_name, tool_call_reasoning
Agent Tool Definitions Include AddAuditLog as a 7th tool. Agent calls it immediately after every S3 action (except when logging itself).
โ Requirements [ ] n8n instance with AI Agent feature [ ] OpenAI API Key [ ] AWS IAM user with S3 access [ ] Google Sheet with required columns [ ] Chat integration (Slack, Telegram, etc.)
๐งฉ How to customize the workflow | Feature | Customization Tip | |----------------------|--------------------------------------------------------------| | ๐ Multi-region S3 | Let users include region in the message or agent memory | | ๐ก๏ธ Restricted actions| Use memory/user ID to limit delete/copy actions | | ๐ Folder filtering | Extend ListObjects with prefix/suffix filters | | ๐ค Upload file | Add PutObject with pre-signed URL support | | ๐งพ Extra logging | Add IP, latency, error trace to audit logs | | ๐ Reporting | Link Google Sheet to Looker Studio for audit dashboards | | ๐จ Security alerts | Notify via Slack/Email when DeleteObject is triggered |
Related Templates
Track OpenAI Token Usage and AI Agent Metrics with Google Sheets Dashboard
What it does Captures token usage and cost from your AI Agent/LLM. Logs model, tokens, cost, tool use, and conversation ...
Lookup IP Geolocation Details with IP-API.com via Webhook
This n8n template enables you to instantly retrieve detailed geolocation information for any given IP address by simply ...
Send Hourly Crypto Market Analysis from Binance to Telegram
๐ Daily Crypto Market Summary Bot (Binance to Telegram) This workflow fetches 24h price change data from Binance for s...
๐ Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments