Manage AWS S3 with GPT-4 agent and Google Sheets audit logging via Slack
Workflow preview
DISCOUNT 20%
Important notice
This workflow is provided as-is. Please review and test before using in production.
Overview
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:
ListBucketsListObjectsCopyObjectDeleteObjectListFoldersCreateFolder
- 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-4orgpt-3.5-turbo - Memory: Simple Memory Node
- Prompt: Instructs agent to always follow tool calls with an
AddAuditLogcall.
- Model:
AWS S3 Nodes
- Configure each tool with AWS credentials.
- Tools:
getAll: bucketgetAll: filecopy: filedelete: filegetAll: foldercreate: 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
- Sheet:
Agent Tool Definitions
- Include
AddAuditLogas a 7th tool. - Agent calls it immediately after every S3 action (except when logging itself).
- Include
β 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 |