Strip secrets from JSON file via AI Formatter + Merge node&send mail report
Ready for 3.0What this workflow does
This AI workflow has 11 nodes and runs when someone submits an n8n form (“Upload Json file to convert to Sanitized JSON version”). Along the way it connects OpenAI and Gmail.
How it runs
Trigger: When someone submits an n8n form (“Upload Json file to convert to Sanitized JSON version”).
- Extract JSON content (Extract from File): extracts data from a file (from json)
- Prepare Original Workflow Structure (Edit Fields (Set)): sets 1 field: originalWorkflowJson
- Format Original Workflow(JS) (Code): runs custom JavaScript code
- AI Sanitize Workflow JSON (OpenAI): uses OpenAI
- Combine Original & Sanitized JSON (Merge): merges the data from its input branches
- Format Sanitized Workflow (JS) (Code): runs custom JavaScript code
- Generate Workflow Change log (AI) (OpenAI): uses OpenAI
- Create Sanitized JSON File (Convert to File): converts data to a file (to text)
- Assemble Email Content & Attachment (Merge): merges the data from its input branches
- Email Sanitized Workflow + Report (Gmail): uses Gmail
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Extract from File
n8n-nodes-base.extractFromFile - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - OpenAI
@n8n/n8n-nodes-langchain.openAi - Merge
n8n-nodes-base.merge - Convert to File
n8n-nodes-base.convertToFile - Gmail
n8n-nodes-base.gmail
From the author
Description This workflow sanitizes any uploaded n8n workflow JSON by removing credentials, webhook IDs, and sensitive metadata. Using AI and structured comparison, it generates a clean, secure workflow version, creates a downloadable sanitized file, and…