A collection of Drafts actions that automate photography production workflows using Google Gemini AI.
Creates a new call sheet from email threads in Mail.app.
How it works:
- Select one or more emails in Mail.app
- Run the action from Drafts
- The script automatically finds all related thread messages (by subject)
- Gemini AI reconstructs the conversation chronologically
- Gemini AI extracts project details into a structured call sheet
- A new draft is created with the call sheet and conversation history
Features:
- Automatically discovers thread messages by normalized subject
- Strips email prefixes (
Re:,Fwd:) and bracket tags ([EXTERNAL],[EXT], etc.) - Deduplicates messages by Message-ID
- Sorts messages chronologically
- Caps at 50 messages to manage token limits
Updates an existing call sheet with new email information.
How it works:
- Open an existing call sheet draft in Drafts
- Select one or more new emails in Mail.app
- Run the action
- Gemini AI merges new information into the existing call sheet
- The draft is updated in-place
Use case: When you receive follow-up emails after creating the initial call sheet.
Generates photo metadata from shoot notes for Photo Mechanic ingestion.
How it works:
- Create a draft with your shoot notes
- Run the action
- Gemini AI generates structured metadata
- A new draft is created with the formatted output
Output format:
Slug: SubjectName
Title: Short Shoot Title
Caption: {city:UC}, {state:UC} - {iptcmonthname:UC} {day0}: [description]...
Keywords: keyword1, keyword2, keyword3, ...
The caption uses Photo Mechanic template tags for automatic date/location insertion.
- macOS with Mail.app
- Drafts app (macOS version)
- Google Gemini API key stored in Keychain
- Active internet connection
Open Terminal and run:
security add-generic-password -s "Gemini_API_Key" -a "$USER" -w "YOUR_API_KEY_HERE"Replace YOUR_API_KEY_HERE with your actual Gemini API key.
For AppleScript actions (.scpt files):
- In Drafts, go to Drafts → Settings → Actions
- Create a new Action
- Add a step: Script → AppleScript
- Copy the contents of the
.scptfile into the script field
For JavaScript actions (.js files):
- In Drafts, go to Drafts → Settings → Actions
- Create a new Action
- Add a step: Script → Script
- Copy the contents of the
.jsfile into the script field
The JavaScript action uses Drafts' built-in GoogleAI integration:
- The first time you run it, Drafts will prompt for your API key
- Or configure it in Drafts → Settings → Credentials
Edit these properties at the top of each script:
| Property | Default | Description |
|---|---|---|
geminiAPIKeyName |
"Gemini_API_Key" |
Keychain service name |
geminiModel |
"gemini-3-flash-preview" |
Gemini model to use |
draftsTags |
{"callsheet"} |
Tags applied to new drafts |
maxMessagesPerThread |
50 |
Maximum messages to process |
showAlerts |
true |
Show error dialogs |
The generated call sheet includes these sections:
| Section | Description |
|---|---|
| Location | Photography location, address, start time |
| Project Description | Key objectives, scope, style, goals |
| Team and Roles | Team members, subjects, and their roles |
| Client Information | Client name, contacts, agency details |
| Project Timeline | Deadlines, shoot dates, delivery timelines |
| Deliverables | Required outputs with quantity and format |
| Budget | All financial details, quotes, rates |
The scripts handle common errors:
- No email selected in Mail.app
- API key not found in Keychain
- Gemini API errors (rate limits, invalid responses)
- Empty or malformed responses
MIT License - See LICENSE for details.
For issues or questions, please open a GitHub issue.