From ef55402802d25087a7b21e679605abdb0c015d06 Mon Sep 17 00:00:00 2001 From: code-subhash Date: Wed, 21 Jan 2026 23:53:42 +0530 Subject: [PATCH 1/2] Update README for Whatsapp to Google Calendar automation example Added a README file for WhatsApp to Google Calendar automation example. --- .../whatsapp-calendar-automation/README.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/whatsapp-calendar-automation/README.md diff --git a/examples/whatsapp-calendar-automation/README.md b/examples/whatsapp-calendar-automation/README.md new file mode 100644 index 0000000..e22cd1d --- /dev/null +++ b/examples/whatsapp-calendar-automation/README.md @@ -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 From 7036a31ad44f881131d2dc7609a24982163423a0 Mon Sep 17 00:00:00 2001 From: code-subhash Date: Wed, 21 Jan 2026 23:54:48 +0530 Subject: [PATCH 2/2] Add files via upload --- examples/whatsapp-calendar-automation/main.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 examples/whatsapp-calendar-automation/main.py diff --git a/examples/whatsapp-calendar-automation/main.py b/examples/whatsapp-calendar-automation/main.py new file mode 100644 index 0000000..7b71ebb --- /dev/null +++ b/examples/whatsapp-calendar-automation/main.py @@ -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())