A comprehensive n8n workflow utilizing custom code to generate private Secret Santa assignments (derangements) and instantly notify participants via Gmail. Perfect for holiday automation.
Download this n8n workflow template and start using it instantly.
Managing Secret Santa pairings manually can be time-consuming and often risks revealing the pairings prematurely. This specialized n8n workflow solves this by providing a highly automated, private solution. It uses an input list of participants (Name and Email) and leverages a custom JavaScript n8n node to execute a derangement algorithm, ensuring perfectly randomized assignments where no one draws themselves.
Crucially, after sending the assignment via the Gmail n8n node, the workflow immediately deletes the message from the sender's 'Sent' folder. This ensures maximum privacy, making this a truly 'Secret' Santa system. This automated process saves time, guarantees fairness, and provides a consolidated verification log at the end of the n8n workflow execution.
This n8n workflow is designed to run manually using a dedicated n8n trigger, initiating the sequential steps:
[email protected]) containing the obfuscated verification summary, confirming successful execution of the entire n8n workflow.To deploy this powerful n8n workflow, follow these steps:
{"Sarah":"[email protected]"}). Ensure the keys are the names and the values are the emails.sendTo field ([email protected]) to your personal address to receive the final verification report. Run (manualTrigger n8n trigger): The starting point of the n8n workflow, used to manually initiate the Secret Santa assignment process.
Emails and name (Set n8n node): Essential configuration node. Defines the key input data structure (Name: Email). Key configuration involves updating the 'Assignments' section with all participant details.
Random (Code n8n node): The core logic engine. Function: Executes a robust JavaScript derangement algorithm to generate non-self-assigned, unique Secret Santa pairings. Key Configuration: Contains custom JS code for list processing and randomized assignment generation.
loop mails (Split In Batches n8n node): Function: Iterates through each successful pairing generated by the 'Random' code n8n node, ensuring each assignment is handled individually.
Send a message (Gmail n8n node): Function: Sends the HTML-formatted assignment email to the Giver ($json.emisor). Key Configuration: Uses Expressions ={{ $json.emisor }} for recipient and ={{ $json.nombreReceptor }} in the HTML body to personalize the message.
Delete a message (Gmail n8n node): Function: Deletes the email sent in the previous step from the sender's account to maintain secrecy. Key Configuration: Uses Expression ={{ $json.id }} to target the specific message ID for deletion.
Name to INT (Code n8n node): Function: Processes the complete log of assignments, assigns sequential numerical IDs to emails for anonymity, and consolidates the pairings into a single verification summary. Key Configuration: Contains custom JS code for email extraction and ID mapping.
Send a message results (Gmail n8n node): Function: Sends the final execution summary to the administrator, confirming the assignments were successfully delivered using the obfuscated ID system.
Automate Zendesk ticket prioritization using this n8n workflow. Analyze ticket urgency with GPT-4, update priorities, and send instant Slack alerts for critical issues directly via an n8n node.

Use this powerful n8n workflow to automatically fetch Todoist tasks, prioritize them using a structured AI agent (via OpenRouter), and deliver a comprehensive, formatted daily summary directly to Slack.

Use this robust n8n workflow to monitor competitor prices across Amazon, Best Buy, and Target, leveraging AI for structured data extraction, powerful analysis, and automated Slack alerts.

Use this powerful n8n workflow to monitor Zendesk SLAs hourly. Automatically calculate time remaining, escalate critical tickets to high priority, alert teams via Slack, and maintain a compliance log in Google Sheets.

Use this sophisticated n8n workflow to automatically catalog product images from Google Drive, generate descriptions using Azure OpenAI (GPT-4o), upload to Cloudinary, and log structured data into Google Sheets. Ideal for e-commerce automation.

Deploy this robust n8n workflow to automatically monitor Gmail, Outlook, Telegram, and WhatsApp for incoming PDF files. Leverage the power of an OpenAI n8n node to summarize documents and return concise reports to the originating channel.


Completion of a higher degree on the way to university (computer engineering)







































