Random Process Scheduler
Random Process Scheduler
Turn predictable automations into human-like activity with random scheduling across easily customisable time slots.
Perfect for content publishing with organic scheduling patterns, social media automation, API systems that need to avoid rate limiting, or any automation requiring randomised timing control across multiple periods.
All times are configured in local timezone with automatic UTC conversion for technical operations.
Features easy slot management with chronological ordering, gap support, and 24-hour window scheduling.
How to use
- Set
schedulerExecutionTimein Init node (match it to Schedule Trigger cron) - Define time slots with start/end hours and probability values (see below)
- Configure Execute sub-process with your own workflow ID
- Configure SMTP credentials, local time zone and optionally project paths
Step by Step Configuration
Two variables to set in the Init node's "Custom Configuration" section:
1. When the scheduler runs daily:
const schedulerExecutionTime = 1; // 1am (24h clock; must match Schedule Trigger node)
2. Your execution slots:
const subprocessTimeSlots = {
morning: { start: 6, end: 12, probability: 0.85 },
afternoon: { start: 12, end: 18, probability: 0.85 },
evening: { start: 18, end: 24, probability: 0.5 }
};
That's it. Three slots, three probabilities.
Add or remove slots, adjust times - it just works.
Real-world example with gaps:
const subprocessTimeSlots = {
night: { start: 0, end: 2, probability: 0.1 }, // Optional late activity
morning: { start: 6, end: 10, probability: 0.85 }, // Gap from 2-6am (no execution)
noon: { start: 12, end: 14, probability: 0.85 }, // Gap from 10am-12pm
afternoon: { start: 16, end: 18, probability: 0.85 }, // Gap from 2-4pm
evening: { start: 20, end: 24, probability: 0.5 } // Gap from 6-8pm
};
3. Configure Execute sub-process with your workflow ID
Your sub-workflow MUST start with a Wait node and be configured with {{ $json.executions.relativeDelaySeconds }} as “Wait Amount”.
4. Additional Configuration
- SMTP credential
- Time zone (Init node):
const LOCAL_TIMEZONE = $env.GENERIC_TIMEZONE || 'Europe/Paris';by default - Project paths (Init node):
// ⚠️ Your email here
• const N8N_ADMIN_EMAIL = $env.N8N_ADMIN_EMAIL || 'yourmail@world.com';
// ⚠️ Your projects’ ROOT folder on your mapped server here
• const N8N_PROJECTS_DIR = $env.N8N_PROJECTS_DIR || '/files/n8n-projects-data';
// ⚠️ Your project’s folder name here for logging
• const PROJECT_FOLDER_NAME = "RPS";
Requirements
- n8n instance running in Docker with file system access
- Volume mapping for persistent storage (e.g.,
/local-files:/files) - De-activate Read/Write nodes & Email sends if you do not want to use logging features (file system access optional)
- SMTP server for notifications
- n8n API credentials for error handling
- Target sub-workflow with Wait node to handle relativeDelaySeconds
IMPORTANT: Your sub-workflow MUST start with a Wait node and be configured with {{ $json.executions.relativeDelaySeconds }} as “Wait Amount”.
How it works
- 24-Hour Window Algorithm: Schedules executions from current time until next scheduler run, handling timezone conversions and cross-midnight scenarios
- Automatic Validation: Checks for overlaps, invalid time ranges, and probability values on every run
- Chronological Processing: Processes slots in order regardless of how you define them
- Inclusive/Exclusive Boundaries: 6-12 slot runs from 6:00:00 to 11:59:59 (start inclusive, end exclusive)
- Chained Execution: Each subprocess receives a relativeDelaySeconds value for sequential execution with calculated intervals
- Comprehensive Monitoring: Tracks planned vs actual execution times with delay calculations and detailed logging
Configuration Rules
- No Overlap: Slots cannot overlap (6-10 and 9-12 is invalid)
- Valid Ranges: Start 0-23, end 0-24, start < end
- Valid Probability: 0 to 1 (0.85 = 85% chance)
- Gaps Allowed: Skip hours completely (e.g., no execution 2-6am)
- Emoji Support: Use "night", "morning", "noon", "evening" keywords in slot names for visual logs
Use Cases:
- Content publishing with organic scheduling patterns
- Social media automation with human-like posting intervals
- API systems avoiding rate limits through unpredictable timing
- Business hours automation with precise timing control
n8n Workflow: Random Process Scheduler
This n8n workflow provides a robust framework for scheduling and executing processes, with built-in error handling and the ability to run sub-workflows. It's designed to manage a series of tasks, allowing for conditional logic and email notifications in case of failures.
What it does
This workflow orchestrates a series of actions, including:
- Scheduled Trigger: The workflow is initiated by a schedule, allowing for regular execution of the defined processes.
- Code Execution: A
Codenode is used to define and manage the processes to be scheduled. This allows for dynamic generation or selection of tasks. - Loop Over Items: The workflow iterates through each defined process, ensuring that each task is handled individually.
- Execute Sub-workflow: For each process, a sub-workflow is executed. This modular approach allows for complex tasks to be encapsulated and reused.
- Error Handling:
- If the sub-workflow execution fails, the workflow uses a
Switchnode to detect the failure. - Upon failure, an email notification is sent, providing details about the error.
- The workflow then stops with an error, preventing further execution of potentially faulty processes.
- If the sub-workflow execution fails, the workflow uses a
- Success Path (Placeholder): The workflow includes a placeholder for successful execution, where additional actions could be added.
- File Operations (Unconnected): The workflow contains
Read/Write Files from Disk,Extract from File,Aggregate, andSplit Outnodes, which are currently unconnected but indicate potential future functionality for file-based data processing within the scheduled tasks.
Prerequisites/Requirements
- n8n Instance: An active n8n instance to host and execute the workflow.
- SMTP Credentials: Configured SMTP credentials in n8n for sending email notifications in case of errors.
- Sub-workflows: The sub-workflows that are intended to be executed by the
Execute Sub-workflownode must exist and be accessible within your n8n instance.
Setup/Usage
- Import the Workflow: Import the provided JSON into your n8n instance.
- Configure Schedule Trigger: Adjust the
Schedule Triggernode to your desired execution frequency (e.g., daily, hourly, specific cron schedule). - Customize Code Node: Modify the
Codenode to define the processes you want to schedule. This node will output the items that theLoop Over Itemsnode will process. - Configure Execute Sub-workflow:
- Select the specific sub-workflow you wish to execute for each item.
- Ensure the data passed to the sub-workflow is correctly mapped.
- Configure Send Email:
- Set up the recipient email address(es) for error notifications.
- Customize the email subject and body to include relevant error information (e.g., using expressions to pull data from the
Stop and Errornode).
- Define Success Actions (Optional): Add any desired nodes to the "Success" branch of the
Switchnode if you want to perform actions after a successful sub-workflow execution. - Activate the Workflow: Once configured, activate the workflow in n8n.
Related Templates
Daily cash flow reports with Google Sheets, Slack & Email for finance teams
Simplify financial oversight with this automated n8n workflow. Triggered daily, it fetches cash flow and expense data from a Google Sheet, analyzes inflows and outflows, validates records, and generates a comprehensive daily report. The workflow sends multi-channel notifications via email and Slack, ensuring finance professionals stay updated with real-time financial insights. 💸📧 Key Features Daily automation keeps cash flow tracking current. Analyzes inflows and outflows for actionable insights. Multi-channel alerts enhance team visibility. Logs maintain a detailed record in Google Sheets. Workflow Process The Every Day node triggers a daily check at a set time. Get Cash Flow Data retrieves financial data from a Google Sheet. Analyze Inflows & Outflows processes the data to identify trends and totals. Validate Records ensures all entries are complete and accurate. If records are valid, it branches to: Sends Email Daily Report to finance team members. Send Slack Alert to notify the team instantly. Logs to Sheet appends the summary data to a Google Sheet for tracking. Setup Instructions Import the workflow into n8n and configure Google Sheets OAuth2 for data access. Set the daily trigger time (e.g., 9:00 AM IST) in the "Every Day" node. Test the workflow by adding sample cash flow data and verifying reports. Adjust analysis parameters as needed for specific financial metrics. Prerequisites Google Sheets OAuth2 credentials Gmail API Key for email reports Slack Bot Token (with chat:write permissions) Structured financial data in a Google Sheet Google Sheet Structure: Create a sheet with columns: Date Cash Inflow Cash Outflow Category Notes Updated At Modification Options Customize the "Analyze Inflows & Outflows" node to include custom financial ratios. Adjust the "Validate Records" filter to flag anomalies or missing data. Modify email and Slack templates with branded formatting. Integrate with accounting tools (e.g., Xero) for live data feeds. Set different trigger times to align with your financial review schedule. Discover more workflows – Get in touch with us
Track and score contact engagement with Zoho CRM, PDL, News & Reddit
Zoho CRM – Social Media Engagement Tracker This workflow automatically monitors new or updated Contacts in Zoho CRM, enriches them using People Data Labs, checks public visibility across News + Reddit, calculates an engagement score and updates Zoho CRM fields accordingly. When a Contact shows high online engagement, the workflow automatically opens a Deal and logs a note to help sales teams act quickly. 🚀 Quick Implementation Import this workflow JSON into n8n. Add Zoho OAuth2 credentials & set webhook URL. Add People Data Labs API Key & GNews API Key. Ensure CRM custom fields exist-SocialProfiles,EngagementScore,MentionsCounts,SocialStatus Update a Contact in Zoho → watch automation fire! 🔍 What It Does This automation transforms a simple Zoho CRM instance into a proactive intelligence system that detects which contacts are gaining public attention online. When a Contact is created or updated in Zoho CRM, n8n automatically retrieves verified profile data such as LinkedIn, Twitter, Facebook and GitHub using People Data Labs — eliminating manual research and spreadsheet maintenance. Next, the workflow checks whether the contact is appearing in global News platforms (via GNews) or being discussed on Reddit. It analyzes the volume and context of these public mentions to estimate how relevant, visible or influential the person may be online. Each discovered activity contributes to a calculated Engagement Score. That score and all enrichment details are written back to Zoho CRM, helping sales and marketing teams instantly identify high-potential contacts. When the score exceeds a defined threshold, the workflow even creates a Deal automatically — meaning your CRM will notify your team of hot prospects before someone else reaches them. This safeguards missed opportunities, speeds outreach and improves your entire pipeline efficiency. 🎯 Who’s It For B2B sales teams & SDRs. CRM admins improving data quality. Marketing analysts tracking brand mentions. Growth teams targeting public-facing prospects. Lead scoring, enrichment & prioritization automation. 🧩 Requirements | Tool | Purpose | |------|---------| | n8n | Workflow automation | | Zoho CRM | Contact data and CRM updates | | PDL API Key | Social profiles enrichment | | GNews API Key | Public news mention search | | Internet Access | API communication | Zoho CRM must contain these custom Contact fields: Social_Profiles Engagement_Score Mentions_Counts Social_Status ⚙️ How It Works — Setup & Configuration Steps 1️⃣ Install and Import Open n8n → Import from File Import this workflow JSON 2️⃣ Configure Authentication Assign Zoho OAuth2 credentials to all Zoho nodes Add PDL API Key in header x-api-key Add GNews API Key in query param apikey 3️⃣ Configure Zoho CRM Webhook Zoho CRM → Developer Space → Webhooks Module: Contacts URL: https://YOUR-N8N-URL/webhook/zoho-crm-new-contact Method: POST Trigger: Create + Update Test by modifying a Contact. 4️⃣ Validate CRM Field Mappings Ensure custom fields exist and allow updates 🛠 Customize Nodes | Node | Customization Options | |------|----------------------| | Engagement Scoring | Adjust weights for likes/comments/news | | IF High Engagement | Change threshold (default ≥ 200) | | Deal Creation | Customize Deal name, stage, pipeline | | Social Profiles | Add more sites: TikTok, Instagram, etc. | | Notes | Include full mention breakdown | ➕ Add-Ons / Optional Improvements | Feature | Benefit | |--------|---------| | Slack notifications | Real-time alerts for hot contacts | | Google Sheets logging | Trend reports across engagements | | Weekly re-scans | Detect new mentions automatically | | UTM tracking | Monitor marketing effectiveness | | AI sentiment scoring | Prioritize positive vs negative mentions | 💡 Use Case Examples Automatic lead prioritization for outbound sales. Identify influencers or public figures inside CRM. Detect PR opportunities from sudden news mentions. Track competitor engagement through contacts. Increase CRM intelligence without manual data entry. (And many more real-world CRM automation use cases) 🧯 Troubleshooting Guide | Issue | Reason | Solution | |------|--------|----------| | No workflow execution | Webhook not triggered | Check Zoho webhook config | | No social profiles | Contact lacks digital footprint | Test with a known public profile | | Deal not created | Score below limit | Reduce score threshold | | HTTP 401 errors | Invalid API credentials | Re-connect Zoho / update keys | | Reddit search empty | Rate limiting or mismatch | Retry + adjust keyword logic | 🤝 Need Help? This workflow is built by n8n automation developers at WeblineIndia. We can help you: Deploy this workflow into production, Integrate more CRMs & intelligence providers, Add reporting dashboards & alerts, Build custom scoring and automation logic, And so much more.
Curate and post AI news to X, Bluesky, Threads and more with GPT-5 mini and Cue
Curate & post AI news to X, Bluesky, Threads & more via GPT-5 mini & Cue This n8n template automatically curates AI news from RSS feeds and generates platform-tailored social media posts using GPT-5 mini. Posts are saved as drafts in Cue for review before publishing to X, Bluesky, Threads, Mastodon, and Facebook. Use cases include: Daily automated AI/tech news curation Multi-platform social media content creation Building thought leadership with consistent posting Staying on top of industry news without manual effort Who is this for? This workflow is ideal for: Tech content creators who want to share AI news across multiple platforms Social media managers handling multiple accounts Anyone building an audience around AI/tech topics Teams who want consistent daily content without manual curation What problem does this workflow solve? Manually curating news, writing platform-specific posts, and publishing across 5 different social networks is time-consuming. This workflow automates the entire process: Curation - Pulls from 4 trusted AI/tech RSS feeds daily Deduplication - Tracks posted articles in Google Sheets so you never share the same story twice Content creation - GPT-5 mini writes posts tailored to each platform's style and character limits Review workflow - Creates drafts in Cue so you can review before publishing How it works Schedule Trigger - Runs daily at 9am (configurable) RSS Feeds - Fetches articles from TechCrunch AI, Ars Technica AI, The Verge AI, and MIT Tech Review Filter & Merge - Combines all feeds and filters to articles from the last 7 days Deduplication - Compares against Google Sheets to find unposted articles Random Selection - Picks one random article from available stories AI Generation - GPT-5 mini generates 5 platform-specific posts with appropriate tone and length Save to Cue - Creates a draft post with all 5 platform variations Log to Sheet - Records the article URL to prevent future duplicates Setup Requirements Cue account with connected social accounts OpenAI API key Google account for Sheets Step 1: Install the Cue community node Go to Settings → Community Nodes Click Install Enter @cuehq/n8n-nodes-cue Step 2: Create tracking spreadsheet Create a new Google Sheet named "AI News Tracker" Add these column headers in row 1: article_url title source processed_at Step 3: Configure credentials Google Sheets - Add OAuth2 credentials and connect to the "Get Recent Posts" node OpenAI - Add your API key and connect to the "GPT-5 mini" node Cue - Add your API key from Cue Settings Step 4: Configure the Cue node Open the Create Draft in Cue node Select your Profile For each platform slot, select your social account: Slot 1 → X/Twitter Slot 2 → Bluesky Slot 3 → Threads Slot 4 → Mastodon Slot 5 → Facebook Don't have all 5 platforms? Simply delete the unused slots. Step 5: Publish Save and click Publish to activate the workflow. Customizing this workflow Change the schedule Edit the Daily 9am Trigger node to run at a different time or frequency. Use different RSS feeds Replace the feed URLs with sources relevant to your niche. The workflow handles any standard RSS feed. Keep 3-6 feeds for best results. Auto-publish instead of drafts To publish immediately instead of creating drafts, enable Publish Immediately in the Cue node settings. Adjust the AI tone Modify the system prompt in the Write Social Posts node to match your brand voice or adjust platform-specific guidelines. Good to know Cost - Each run uses one OpenAI API call. With GPT-5 mini, this costs approximately $0.01-0.02 per execution. Draft review - Posts are created as drafts in Cue, giving you a chance to review and edit before publishing. Deduplication - The Google Sheet tracks all posted URLs, so the same article is never shared twice. About Cue Cue is a social media scheduling platform that lets you manage and publish content across X, Bluesky, Threads, Mastodon, Facebook, LinkedIn, TikTok, and Instagram from a single dashboard. Key features: Multi-platform publishing - Schedule once, publish everywhere Platform-specific content - Tailor each post for different audiences Draft workflow - Review and edit before publishing API & integrations - Connect with n8n, Zapier, Make, and custom apps Get started free · Documentation · n8n Community Node