Simple Encryption and Decryption Workflow
detail.loadingPreview
Securely encrypt and decrypt sensitive data using a simple XOR-based algorithm. This workflow allows you to perform these operations triggered by other n8n workflows, ensuring data privacy and integrity.
About This Workflow
This n8n workflow provides a straightforward solution for encrypting and decrypting data. It's designed to be triggered by another workflow, accepting an action type ('encrypt' or 'decrypt'), a secret key, and the data to be processed. The workflow intelligently routes the request to either the encryption or decryption node based on the provided action type. The encryption process uses a XOR cipher with a given key, then encodes the result in Base64. The decryption reverses this process, taking Base64 encoded input, decoding it, and then applying the XOR cipher with the same key to retrieve the original data. This makes it ideal for scenarios where sensitive information needs to be protected during transit or storage.
Key Features
- Triggered Execution: Integrates seamlessly with other n8n workflows.
- Dual Functionality: Supports both encryption and decryption operations.
- XOR-Based Security: Utilizes a simple yet effective XOR encryption algorithm.
- Base64 Encoding: Encodes encrypted data for easy handling and transmission.
- Customizable Key: Allows you to define your own secret key for robust security.
How To Use
- Trigger Setup: Configure the "When Executed by Another Workflow" node to accept inputs for
action-type(either 'encrypt' or 'decrypt'),key, anddata. - Conditional Routing: The "If" node checks the
action-type. If it's 'encrypt', it proceeds to the encrypt node; otherwise, it routes to the decrypt node. - Encryption Node: In the "encrypt" node, the
jsCodeencrypts the provideddatausing thekeyvia XOR and then Base64 encodes it. The output will be{ encrypted: "your_encrypted_data" }. - Decryption Node: In the "decrypt" node, the
jsCodetakes Base64 encodeddata, decodes it, and then decrypts it using the providedkeyvia XOR. The output will be{ decrypted: "your_original_data" }. - Workflow Integration: Connect this workflow to your main automation flow to trigger encryption or decryption as needed.
Apps Used
Workflow JSON
{
"id": "0b7471b4-90ed-435c-9eb0-131a058580aa",
"name": "Simple Encryption and Decryption Workflow",
"nodes": 11,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 0b7471b4-90ed...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.