Deep Links & Automation
Magimail registers the native macOS magimail:// URL scheme, allowing you to trigger navigation, compose drafts, search inboxes, and execute triage actions from Apple Shortcuts, Raycast, Alfred, Stream Deck buttons, terminal scripts, or custom web links.
Supported Actions & Parameters
Section titled “Supported Actions & Parameters”| URL Pattern | Parameters | Description |
|---|---|---|
magimail://inbox |
account |
Focuses Magimail and opens the inbox for the specified account. |
magimail://compose |
to, su, body, account |
Opens a compose window pre-filled with recipient, subject, and body text. |
magimail://share |
files (repeated), text, url, to |
Opens a compose window with attached files staged from Finder or external scripts. |
magimail://search |
q or query, account |
Runs a search query directly in Gmail. |
magimail://thread/<id> |
account, action |
Opens the thread, or executes an action (open, archive, trash, markRead, markUnread). |
Examples
Section titled “Examples”Compose an Email with Pre-filled Details
Section titled “Compose an Email with Pre-filled Details”open "magimail://compose?to=team@example.com&su=Weekly%20Update&body=Hi%20team,%0A%0AHere%20is%20the%20report."Search an Account’s Inbox
Section titled “Search an Account’s Inbox”open "magimail://search?q=is:unread%20from:github&account=work"Archive a Thread in the Background
Section titled “Archive a Thread in the Background”open "magimail://thread/18fa24b91ac051?action=archive"Using Deep Links in Automations
Section titled “Using Deep Links in Automations”Apple Shortcuts
Section titled “Apple Shortcuts”- Open the Shortcuts app on macOS.
- Create a new shortcut and add the Open URL action.
- Enter your formatted
magimail://link (for example,magimail://inbox?account=work). - Assign a global keyboard shortcut in the shortcut details pane.
Raycast & Alfred
Section titled “Raycast & Alfred”- In Raycast, create a Quicklink with the URL
magimail://search?q={query}to search Gmail directly from your command bar. - In Alfred, create a Web Search keyword configured to open
magimail://compose?to={query}.
Opening Links
Section titled “Opening Links”Emails frequently include links to external tools such as Todoist, Notion, Linear, Figma, GitHub, or Slack.
Magimail strips redirect and tracking wrappers before routing a link, then opens it in the browser chosen in Settings → General → Opening links, in the Chromium profile for the account it came from. See Settings Reference.