-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcopy-email-to-notion.sh
More file actions
executable file
·30 lines (21 loc) · 936 Bytes
/
copy-email-to-notion.sh
File metadata and controls
executable file
·30 lines (21 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/zsh
# @raycast.schemaVersion 1
# @raycast.title Reply with AI (Notion)
# @raycast.mode silent
# @raycast.icon 📓
# @raycast.packageName Notion
# @raycast.currentDirectoryPath /Users/jorritharmamny/Documents/Raycast-scripts
# @raycast.needsConfirmation false
# @raycast.argument1 { "type": "text", "placeholder": "Instructions (tone, key points, language)", "optional": true }
# @raycast.argument2 { "type": "text", "placeholder": "Recipient name (optional)", "optional": true }
instructions="$1"
recipient_name="$2"
# Read email content from clipboard
email_content=$(pbpaste)
if [ -z "$email_content" ]; then
echo "Clipboard is empty. Copy the email content first." >&2
exit 1
fi
# Delegate to Notion launcher which copies the composed prompt and opens Notion AI
node ./notion.js "$email_content" "$instructions" "$recipient_name"
echo "Prepared reply context for Notion AI (prompt copied and sent if possible)."