🔗 1. Webhook Entry & Initial Decryption Block
Configured with Respond To Webhook, Switch, Webhook. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Code
- Routing
- Web / API
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Webhook1 | Trigger | Webhook | See node parameters |
| Json Parser | Code | Code | See node parameters |
| Switch | Routing | Switch | See node parameters |
| Respond to Webhook1 | Web / API | Respond To Webhook | See node parameters |
| Data Extraction Code | Code | Code | See node parameters |
| Respond to Webhook2 | Web / API | Respond To Webhook | See node parameters |
| Data Extraction Code1 | Code | Code | See node parameters |
| move to base64 | Code | Code | See node parameters |
| Decryption Code | Code | Code | See node parameters |
| Encrypt Return | Code | Code | See node parameters |
| Encrypt Return1 | Code | Code | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
None declared. HTTP requests and Code nodes may still need configuration.
Workflow notes
Try it out
Try it out
🔗 1. Webhook Entry & Initial Decryption Block
Nodes involved:
Webhook1move to base64[partially visible node for decryption using RSA + AES]
Description:
The workflow begins with the Webhook1 node, which listens for incoming HTTP POST requests. These requests typically contain encrypted data that needs to be decoded to proceed with processing.
Once received, the move to base64 node reformats the incoming encrypted components (encrypted_flow_data, encrypted_aes_key, and initial_vector) into binary buffers. These are required inputs for decryption.
Then, the custom JavaScript code (cut off in your snippet) uses a private RSA key to decrypt the AES key, which in turn is used to decrypt the actual data payload (likely using AES-GCM). This is a secure hybrid encryption method—RSA for key exchange, AES for data encryption.
🧠 2. Payload Parsing & Preprocessing Block
Node involved:
Json Parser
Description:
Here, we take the decrypted JSON payload from Whatsapp Flows and parse key elements from it. This helps standardize and clean the input before deciding what kind of logic or response should follow based on user interaction.
🔀 3. Flow Decision Block
Node involved:
Switch
Description:
This decision-making node routes the workflow depending on the screen context extracted earlier.
E.g., If the screen where the user is exchanging information is appointment date:
"APPOINTMENT"→ follow the logic that handles scheduling data.
This allows dynamic routing within the workflow, making it adaptable to different user journey steps or screens.
📆 4. Appointment Data Handling Block
Nodes involved:
Data Extraction CodeRespond to Webhook1
Description:
When the screen is "APPOINTMENT", the Data Extraction Code node processes appointment data—typically grouping appointment slots by date. This is useful for summarizing available times, perhaps to show a user a calendar view of options.
The results are then sent back as a plain text response using Respond to Webhook1, which finalizes the API call and ensures a secure end-to-end interaction using Whatsapp Flows.
🧩 Summary
This n8n workflow handles encrypted user interactions and adapts dynamically based on the screen or step the user is currently in. Here's the general pattern:
- Webhook receives encrypted data
- Data is decrypted using hybrid RSA-AES encryption
- Parsed to extract the current step (
screen) - Conditional logic decides which path to follow
- Extracts relevant information (e.g., appointments)
- Returns response back to the user interface or chatbot
🔗 1. Webhook Entry & Initial Decryption Block
🔗 1. Webhook Entry & Initial Decryption Block
Purpose and structure
This folder contains the 🔗 1. Webhook Entry & Initial Decryption Block workflow. Its executable nodes use code, respondToWebhook, switch, webhook. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Webhook1
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/0924_Code_Respondtowebhook_Process_Webhook.json MIT; preserve source notices.