Turn your iPhone into a powerful automation hub using email triggers and Val Town! This template lets you schedule iOS shortcuts to run at specific times by simply sending an email.
🎯 What This Does
This Val creates a system where:
You send an email with a specific subject/sender to your iCloud email
iOS Mail filters detect the email instantly (via push notifications)
An iOS Shortcut automatically triggers
The shortcut calls this Val Town endpoint to schedule an action
Val Town sends you a notification email when it's time to run your automation
Your iOS Shortcut triggers again to perform the scheduled action
🔑 Key Insight: iCloud Push Email
Why iCloud email? iCloud email supports push notifications, meaning emails arrive instantly on your iPhone. This makes it perfect for real-time automation triggers, unlike Gmail which uses periodic polling.
📋 Setup Instructions
Step 1: Set Up Val Town
Fork this Val or copy the code
Update sendEmail.ts to use your email address
Note your HTTP endpoint URL (found in schedule.ts file details)
Step 2: Create iOS Mail Filter
Open Mail app on iPhone
Go to an email from the sender you want to filter (or send yourself a test email)
Tap the sender's email address at the top
Tap "Create VIP" or use a filter app like Mail Rules
Alternatively, create a filter based on subject line containing specific text
Pro Tip: Use a unique subject prefix like [AUTOMATE] to make filtering reliable.