Access Outlook emails via Make.com webhooks (no direct API credentials)
Access James's Outlook email through Make.com webhooks. No email credentials stored locally โ Make.com handles OAuth.
Why this is secure:
Webhook URLs are stored in ~/ClawdbotFiles/.env.makecom. Load them before use:
source ~/ClawdbotFiles/.env.makecom
Important: Use make-curl instead of curl
The make-curl wrapper restricts HTTP calls to Make.com domains only. This is a security measure that:
Location: ~/ClawdbotFiles/bin/make-curl
Available environment variables:
MAKECOM_EMAIL_SEARCH โ Search emailsMAKECOM_EMAIL_GET โ Get full email contentMAKECOM_EMAIL_DRAFT โ Create draft replyMAKECOM_EMAIL_NEW_DRAFT โ Create new email draft (not a reply)MAKECOM_EMAIL_MOVE โ Move email to folderMAKECOM_EMAIL_LIST_FOLDER_EMAILS โ List emails in a folderMAKECOM_EMAIL_LIST_FOLDERS โ List all foldersMAKECOM_EMAIL_SET_CATEGORY โ Apply categories to emailMAKECOM_LIST_CATEGORIES โ List available categoriesSearch emails by keyword, sender, subject, etc.
Inputs:
query (string, required) โ Search query (e.g., "from:sarah@kent.police.uk", "subject:budget")limit (number, optional, default: 10) โ Max results to return~/ClawdbotFiles/bin/make-curl -s -X POST "$MAKECOM_EMAIL_SEARCH" \
-H "Content-Type: application/json" \
-d '{
"query": "from:sarah@kent.police.uk",
"limit": 10
}'
Response: JSON with matching emails (id, subject, from, date, preview, webLink)
Get full email content by ID.
Inputs:
email_id (string, required) โ The Microsoft email ID (starts with "AAMkA...")~/ClawdbotFiles/bin/make-curl -s -X POST "$MAKECOM_EMAIL_GET" \
-H "Content-Type: application/json" \
-d '{
"email_id": "AAMkADU0MzE4..."
}'
Response: Full email with subject, from, to, body (plain text), attachments flag, importance, webLink
Create a draft reply to an existing email. Does NOT create new emails.
Inputs:
email_id (string, required) โ The email to reply todraft_body (string, required) โ The reply text~/ClawdbotFiles/bin/make-curl -s -X POST "$MAKECOM_EMAIL_DRAFT" \
-H "Content-Type: application/json" \
-d '{
"email_id": "AAMkADU0MzE4...",
"draft_body": "Hi Sarah,\n\nThanks for reaching out. I would be happy to discuss this further.\n\nBest regards,\nJames"
}'
Response: Draft ID and confirmation
Important:
Create a fresh email draft (not a reply to an existing email).
Inputs:
to (string, required) โ Recipient email addresssubject (string, required) โ Email subject linebody (string, required) โ Email body content (HTML supported)cc (string, optional) โ CC recipients (comma-separated)bcc (string, optional) โ BCC recipients (comma-separated)~/ClawdbotFiles/bin/make-curl -s -X POST "$MAKECOM_EMAIL_NEW_DRAFT" \
-H "Content-Type: application/json" \
-d '{
"to": "sarah@kent.police.uk",
"subject": "Meeting Follow-up",
"body": "<p>Hi Sarah,</p><p>Great speaking with you earlier...</p><p>Best regards,<br>James</p>",
"cc": "john@peel.solutions"
}'
Response: Draft ID and webLink to open in Outlook
Important:
Move email to a different folder.
Inputs:
email_id (string, required) โ The email to movetarget_folder (string, required) โ Destination folder nameValid folders: @Action, @Review, @Waiting, Archive, Inbox
~/ClawdbotFiles/bin/make-curl -s -X POST "$MAKECOM_EMAIL_MOVE" \
-H "Content-Type: application/json" \
-d '{
"email_id": "AAMkADU0MzE4...",
"target_folder": "Archive"
}'
Response: Confirmation with new email ID (email IDs change when moved)
Get emails from a specific folder.
Inputs:
folder_name (string, required) โ Folder to list fromlimit (number, optional, default: 20) โ Max emails to returnunread_only (boolean, optional) โ If true, only return unread emailsValid folders: @Action, @Review, @Waiting, Inbox, Sent, Archive, Drafts
~/ClawdbotFiles/bin/make-curl -s -X POST "$MAKECOM_EMAIL_LIST_FOLDER_EMAILS" \
-H "Content-Type: application/json" \
-d '{
"folder_name": "Inbox",
"limit": 10,
"unread_only": true
}'
Response: JSON array with emails (id, subject, from, bodyPreview, receivedDateTime, webLink, isRead, categories)
Get all email folders with counts. No inputs required.
~/ClawdbotFiles/bin/make-curl -s -X POST "$MAKECOM_EMAIL_LIST_FOLDERS" \
-H "Content-Type: application/json" \
-d '{}'
Response: JSON with all folders:
{
"success": true,
"count": 15,
"folders": [
{"id": "AAMkA...", "displayName": "Inbox", "totalItemCount": 150, "unreadItemCount": 5},
{"id": "AAMkA...", "displayName": "Archive", "totalItemCount": 500, "unreadItemCount": 0},
...
]
}
1. List unread emails from Inbox: folder_name="Inbox", unread_only=true
2. For each email:
- Check sender against HubSpot (existing skill)
- Classify priority (Urgent/Today/Week/FYI/Archive)
- If needs reply: get full content, draft response
3. Move processed emails to @Action, @Review, or Archive
4. Summarize to James via WhatsApp
User: "Find Sarah's email about the budget"
1. Search: query="from:sarah subject:budget"
2. Return matching emails with previews
3. If user asks for details, fetch full content with Get Email
User: "Reply to the last email from Kent Police"
1. Search: query="from:kent.police.uk", limit=1
2. Get the email ID from results
3. Get full email content to understand context
4. Draft reply using email_id and draft_body
5. Inform James: "Draft created. Review and send from Outlook."
Apply colored categories to emails for triage and organization.
Inputs:
email_id (string, required) โ The email to categorizecategories (array of strings, required) โ Category names to applyStandard Outlook Categories: Red Category, Orange Category, Yellow Category, Green Category, Blue Category, Purple Category (plus custom categories)
~/ClawdbotFiles/bin/make-curl -s -X POST "$MAKECOM_EMAIL_SET_CATEGORY" \
-H "Content-Type: application/json" \
-d '{
"email_id": "AAMkADU0MzE4...",
"categories": ["Blue Category", "Client"]
}'
Response: Confirmation with updated categories
Use Cases:
Get all available category definitions. No inputs required.
~/ClawdbotFiles/bin/make-curl -s -X POST "$MAKECOM_LIST_CATEGORIES" \
-H "Content-Type: application/json" \
-d '{}'
Response: JSON with all available categories:
{
"success": true,
"categories": [
{"displayName": "Red Category", "color": "preset0"},
{"displayName": "Client", "color": "preset1"},
{"displayName": "Urgent", "color": "preset2"}
]
}
All scenarios are now active and configured:
| Operation | Scenario Name | ID |
|---|---|---|
| Search Emails | Agent Tool โ Search Emails | 8271736 |
| Get Email | Agent Tool โ Get Full Email Body | 8262781 |
| Draft Reply | Agent Tool โ Draft Reply | 8260100 |
| Create New Draft | Agent Tool โ Create Email Draft | 8553975 |
| Move Email | Agent Tool โ Move Email | 8260117 |
| List Folder Emails | Agent Tool โ List Folder Emails | 8260098 |
| List Folders | Agent Tool โ List Email Folders | 8553815 |
| Set Category | Agent Tool โ Tag Email | 8260106 |
| List Categories | Agent Tool โ List Email Categories | 8553979 |
If Make.com webhook fails:
Common errors:
401 Unauthorized โ OAuth token expired, James needs to reconnect in Make.com404 Not Found โ Email ID invalid or email was deleted/moved429 Too Many Requests โ Rate limited, wait and retrySkill updated: 26 January 2026 โ Added make-curl wrapper, Create New Draft, Set Category, and List Categories operations