🎯 Apple Shortcuts Repository

WhatsApp Photo Capture Automation

Welcome to Our Shortcuts Collection

This repository contains a sophisticated automation system that integrates with WhatsApp to automatically capture photos from your device's front camera and save them to your Photos library.

The system combines Apple Shortcuts automation, web-based camera access, and base64 encoding to create a seamless photo capture experience.

Key Features

🤖 Automation

Automatically triggers when WhatsApp is opened

📸 Photo Capture

Front camera photo capture with automatic encoding

💾 Auto Save

Seamlessly saves photos to your Photos library

🔒 Privacy

Full control over photos and permissions

📱 Available Shortcuts

📸

WhatsApp Photo Capture

Automatically captures a photo from your front camera when WhatsApp is opened.

What it does:

  • Detects WhatsApp opening
  • Displays camera interface
  • Captures front camera photo
  • Encodes as base64
  • Sends to photo processor

ReceivePhoto

Receives the base64-encoded photo data and processes it for storage.

What it does:

  • Receives base64 data
  • Decodes the image
  • Saves to Photos library
  • Optional notifications
  • Ready for further actions

⚡ How It Works

Step 1: Automation Trigger

When you open WhatsApp, an automation routine triggers and launches snap-on-open-wapp.html in Safari.

Step 2: Camera Access

The webpage requests permission to access your device's camera and displays a WhatsApp-themed loading interface.

Step 3: Photo Capture

After 1.5 seconds, a photo is automatically captured from the front camera and converted to a base64-encoded JPEG (60% quality).

Step 4: Shortcut Invocation

The system sends the base64 data to the ReceivePhoto shortcut via the Shortcuts URL scheme.

shortcuts://run-shortcut?name=ReceivePhoto&input=text&text=[BASE64_DATA]

Step 5: Photo Processing

The ReceivePhoto shortcut decodes the base64 data back into an image and saves it to your Photos library.

📁 Project Files

snap-on-open-wapp.html

The web interface that handles camera access and photo capture. Displays a WhatsApp-styled UI while capturing your photo.

index.html

This landing page with documentation and quick reference for setting up and using the shortcuts system.

Readme.md

Comprehensive documentation including setup instructions, troubleshooting, and customization options.

🚀 Quick Start Guide

1. Open Shortcuts App

Launch the Apple Shortcuts app on your iOS device.

2. Import Shortcuts

You'll need to manually create two shortcuts:

  • WhatsAppAutoCapture - Automation trigger
  • ReceivePhoto - Photo processor

3. Host the Webpage

Deploy snap-on-open-wapp.html to a web server or use a file:// URL if serving locally.

4. Grant Permissions

When prompted, allow:

  • Camera access to Safari
  • Photos library access to Shortcuts

5. Test the System

Open WhatsApp and verify that the camera interface appears and captures a photo successfully.

📚 Resources & Links

✅ Requirements

📱 Device

iPhone 6S+ or iPad (2nd gen)+

🍎 iOS Version

iOS 14 or later

📲 Apps

WhatsApp & Shortcuts app installed

🔐 Permissions

Camera & Photos library access