Automatically process notes in watched folders using OpenAI's GPT-5 API with custom slash commands. Monitor specific folders, detect new notes, run them through configurable command chains, and save processed outputs for review.
- 🤖 GPT-5 Powered - Uses OpenAI's latest GPT-5 models (mini, nano, or full)
- 📁 Folder Watching - Automatically process new notes in specified folders
- ⛓️ Command Chains - Run up to 3 commands in sequence with reasoning context preservation
- 💰 Cost Tracking - Monitor API costs with monthly budget alerts
- 🎯 Custom Commands - Parse and use your own slash command library from markdown
- ⚙️ Flexible Configuration - Per-folder settings for model, reasoning effort, and verbosity
- Download the latest release from the releases page
- Extract files to
<vault>/.obsidian/plugins/auto-processor/ - Reload Obsidian
- Enable the plugin in Settings → Community Plugins
-
Clone this repository into your vault's plugins folder:
cd <vault>/.obsidian/plugins git clone https://github.com/yourusername/obsidian-auto-processor.git
-
Install dependencies:
cd obsidian-auto-processor npm install -
Build the plugin:
npm run build
-
Reload Obsidian and enable the plugin
- Go to Settings → Auto-Processor
- Enter your OpenAI API key (starts with
sk-) - Click "Test" to verify connection
- Create or use an existing slash command markdown file
- Format commands like this:
### /script60
**Label:** 60-second Explainer
**Category:** Structure
**Prompt:**
> Transform {{insert idea}} into a compelling 60-second explainer script.
> Focus on clarity and engagement.
---
### /punchup
**Label:** Add Punch
**Category:** Enhancement
**Prompt:**
> Add rhythm and punch to {{paste}}. Make it more engaging and dynamic.- In settings, set "Library File Path" to your markdown file
- Click "Reload" to import commands
-
Click "+ Add Watch Folder"
-
Configure:
- Input Folder: Where to watch for new files (e.g.,
Inbox/Raw Scripts) - Output Folder: Where to save processed files (e.g.,
Processed/Review) - Command Chain: Comma-separated command names (e.g.,
script60, punchup, qprompt) - Enabled: Toggle to activate/deactivate
- Input Folder: Where to watch for new files (e.g.,
-
Save settings
When enabled, any new markdown file added to a watched folder will be automatically processed through its command chain.
Use the command palette (Ctrl/Cmd + P):
- Process current file - Run the active file through configured commands
- Reload command library - Refresh command definitions
- Toggle auto-processing - Enable/disable automatic processing
Processed files are saved with _processed.md suffix and include:
---
source: original-filename
processed: 2025-10-09T12:00:00.000Z
commands: script60 → punchup → qprompt
total_cost: $0.0124
status: success
---
# original-filename (Processed)
[Final output from last command in chain]
---
## Processing Details
### Step 1: /script60
**Cost:** $0.0042
**Tokens:** 150 input → 450 output (120 reasoning)
<details>
<summary>View Output</summary>
[Step 1 output]
</details>
[Additional steps...]- Model: Choose between gpt-5, gpt-5-mini (default), or gpt-5-nano
- Reasoning Effort: minimal, low (default), medium, high
- Verbosity: low, medium (default), high
- Max Output Tokens: Maximum response length (default: 2000)
- View current month spending vs. budget
- Set monthly budget limit for warnings
- Per-command cost breakdown in outputs
- Auto-process new files: Enable/disable automatic processing
- Show completion notifications: Display notices when processing completes
Target cost per note: $0.003-0.008
Tips:
- Use
gpt-5-minifor most tasks (75% cheaper than gpt-5) - Set reasoning effort to
lowfor simple transformations - Use
mediumverbosity to balance detail and cost - Limit command chains to 3 steps or fewer
# Development mode (watch for changes)
npm run dev
# Production build
npm run buildsrc/
├── main.ts # Plugin entry point
├── settings.ts # Data models & defaults
├── watcher.ts # Folder monitoring
├── processor.ts # Command chain execution
├── commandLibrary.ts # Markdown parser
├── ui/
│ └── settingsTab.ts # Settings interface
└── utils/
├── gpt5Client.ts # API wrapper
└── templateParser.ts # Variable replacement
- Verify your API key is correct
- Check internet connection
- Ensure you have OpenAI API credits
- Check library file path is correct
- Verify markdown format matches expected structure
- Look for console errors in Developer Tools (
Ctrl/Cmd + Shift + I)
- Confirm folder path uses forward slashes (e.g.,
Inbox/RawnotInbox\Raw) - Check that command names in chain match library exactly
- Ensure auto-processing is enabled
- Verify file is markdown (
.md)
- Review cost tracking in settings
- Consider using
gpt-5-nanofor lower costs - Reduce
max_output_tokenssetting - Lower reasoning effort to
minimalorlow
MIT
For issues, feature requests, or questions:
- GitHub Issues: yourusername/obsidian-auto-processor
Built with ❤️ for Obsidian