Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions examples/whatsapp-calendar-automation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# WhatsApp to Google Calendar Automation (DroidRun Example)

This example demonstrates how to use DroidRun / MobileRun to:

- Open WhatsApp on Android
- Scan recent chat messages for meeting info (date, time, intent)
- Extract relevant details
- Create Google Calendar events automatically
- Repeat the process periodically

## Tech Stack

- Python
- DroidRun (MobileRun)

## How to Run

1. Install requirements:
```bash
pip install -r requirements.txt
40 changes: 40 additions & 0 deletions examples/whatsapp-calendar-automation/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import asyncio
from droidrun import DroidAgent, DroidrunConfig

WHATSAPP_CALENDAR_GOAL = """
Open the WhatsApp app on the Android device.
Scan recent chat messages to identify messages that contain meeting-related
information such as date, time, or meeting intent.

When such information is detected:
- Extract the relevant details (date, time, title, description)
- Open the Google Calendar app
- Create a new calendar event with the extracted meeting information

After creating the event:
- Return to WhatsApp
- Continue scanning other messages
- Repeat the process until all important messages are covered

If no meeting-related messages are found:
- Wait for a while
- Repeat the scanning process periodically
"""

async def main():
config = DroidrunConfig()

agent = DroidAgent(
goal=WHATSAPP_CALENDAR_GOAL,
config=config,
)

result = await agent.run()

print("\n===== AUTOMATION RESULT =====")
print(f"Success: {result.success}")
print(f"Reason: {result.reason}")
print(f"Steps taken: {result.steps}")

if __name__ == "__main__":
asyncio.run(main())