Skip to main content
Automations let you schedule recurring research, analysis, or content generation tasks. Khoj runs your queries automatically and delivers results to your inbox - perfect for newsletters, daily briefings, and monitoring.
Automation Creation Interface
Automation Email Result

What Can Automations Do?

Create custom newsletters tailored to your interests:Example: Weekly tech roundup
Subject: Weekly Tech Digest

Query: Compile a newsletter with:
1. Top 3 AI news stories from this week
2. Interesting GitHub projects I might like
3. Summary of articles I saved but haven't read

Schedule: Every Monday at 9:00 AM
Start your day informed:Example: Morning briefing
Subject: Today's Priorities

Query: Provide:
1. Weather forecast for my location
2. Top news headlines
3. My calendar for today from my notes
4. Motivational quote

Schedule: Every day at 7:00 AM
Track topics automatically:Example: Competition analysis
Subject: Competitor Updates

Query: Research and summarize:
1. Latest product launches from [competitors]
2. News mentions of [competitor names]
3. Industry trends in [your sector]

Schedule: Every Friday at 5:00 PM
Monitor your own data:Example: Weekly review
Subject: Week in Review

Query: Based on my notes from the past week:
1. What did I accomplish?
2. What challenges did I face?
3. What should I focus on next week?

Schedule: Every Sunday at 6:00 PM
Continuous education:Example: Daily learning
Subject: Today I Learned

Query: Teach me something interesting about [topic]. 
Include:
1. A concept explanation
2. A practical example
3. A question to test understanding

Schedule: Every day at 8:00 PM
Stay on track with health goals:Example: Workout planner
Subject: This Week's Workouts

Query: Create a workout plan for this week based on:
1. My fitness level from my notes
2. Equipment I have available
3. Time constraints (30 min sessions)

Schedule: Every Monday at 6:00 AM

Creating an Automation

1

Access Automations Page

2

Click 'New Automation'

Or use the quick-create form on the automations page
3

Configure Subject Line

Set the email subject - this helps you identify automations in your inbox
Weekly Newsletter - Tech & AI
Use clear, searchable subjects so you can filter emails later
4

Write Your Query

Craft the task you want Khoj to perform. Be specific:Good query:
Compile a message including:
1. A recap of AI news from the past week
2. An at-home workout I can do in 20 minutes
3. A quote to inspire me for the week ahead
4. Summary of any notes I tagged #important this week
Too vague:
Send me updates
5

Set Schedule

Choose when and how often the automation runs:
  • Daily at [time]
  • Weekly on [day] at [time]
  • Monthly on [date] at [time]
All times use your local timezone (detected automatically)
6

Choose Agent (Optional)

Select a specific agent to run the automation, or use the default assistant
7

Enable Tools (Optional)

Toggle capabilities for this automation:
  • Online Search: Include real-time web research
  • Document Search: Access your knowledge base
  • Image Generation: Include images in emails
  • Code Execution: Run calculations or analysis
8

Save Automation

Click “Create” - Khoj will run at the next scheduled time

Managing Automations

The automations page shows:
  • Subject & Query: What the automation does
  • Schedule: When it runs
  • Next Run: Countdown to next execution
  • Status: Active, paused, or failed

Email Delivery

What to Expect

1

Scheduled Execution

At the scheduled time, Khoj processes your query in the background
2

Email Sent

Results are sent to your account email address within a few minutes
3

Review Results

The email contains:
  • Subject line you configured
  • Full response from Khoj
  • Any images or diagrams generated
  • Links to referenced documents
  • Footer with automation management link

Email Formatting

Automation emails are formatted for readability:
  • Markdown rendered: Headings, lists, and formatting preserved
  • Images embedded: Generated images appear inline
  • Links active: Citations and references are clickable
  • Mobile-friendly: Readable on all devices

Writing Effective Automation Queries

Use numbered lists or sections:Good:
Create a weekly summary with:
1. Top 3 news stories in renewable energy
2. Summary of my journal entries this week
3. Recommended article to read based on my interests
4. Inspirational quote
Less effective:
Give me a weekly summary of stuff
Specify relevant time periods:
Summarize news from the past 7 days...
Based on my notes from yesterday...
What are this week's priorities from my calendar?
Reference your documents:
Review notes tagged #work from the past week and 
highlight action items
Based on my reading list, recommend which book to 
start next and why
Ask for practical results:
End with 3 specific actions I should take this week
Format as a checklist I can copy to my task manager

Example Automations

Subject: Daily Standup Prep

Query:
Based on my notes and calendar:
1. What did I accomplish yesterday?
2. What's on my schedule today?
3. Any blockers or issues I noted?
4. Top 3 priorities for today

Schedule: Every weekday at 8:00 AM

Best Practices

Time Zones

Automations use your local time - verify before scheduling

Test First

Run the query manually in chat before automating

Manage Email

Create filters to organize automation emails

Review & Refine

Adjust queries based on what you receive

Self-Hosting Requirements

Self-hosted Khoj requires additional setup for automations:
1

Configure Authentication

Automations require user authentication to be enabled.Authentication Setup Guide →
2

Setup Email Service

Configure Resend for email delivery:
  1. Create account at resend.com
  2. Generate API key
  3. Set environment variable:
    RESEND_API_KEY=your_api_key_here
    
  4. Configure sender email in Khoj settings
3

Restart Server

Restart Khoj to apply email configuration
4

Verify Setup

Create a test automation to confirm email delivery
Cloud Khoj users (app.khoj.dev) have automations fully configured - no setup needed.

Troubleshooting

Possible causes:
  • Email in spam folder
  • Self-hosting without Resend configured
  • Incorrect email address in account settings
Solutions:
  • Check spam/junk folders
  • Whitelist [email protected]
  • Verify account email in settings
  • Check Resend configuration (self-hosted)
Possible causes:
  • Automation paused
  • Server downtime during scheduled time
  • Timezone confusion
Solutions:
  • Check automation status (active vs paused)
  • Verify schedule in your local timezone
  • Check “Last Run” timestamp
Possible causes:
  • Query too vague
  • Required tools not enabled
  • No relevant documents in knowledge base
Solutions:
  • Make query more specific
  • Enable online search if needed
  • Verify documents are synced
  • Test query manually in chat first
Solutions:
  • Ask for summaries or bullet points
  • Limit number of items requested
  • Be more specific about scope
Example:
Summarize in 5 bullet points or less...

Privacy & Data

  • Automation emails are sent only to your account email
  • You can share automation results by forwarding emails
  • Queries run with your permissions and data access
  • Delete automations anytime to stop future runs

Next Steps

Use Agents in Automations

Assign specialized agents to automations for better results

Advanced Queries

Learn slash commands and query techniques

Share Results

Share automation insights with your team

Build docs developers (and LLMs) love