```diff
--- test_files/152-original.txt	2025-03-07 19:06:27
+++ test_files/152-modified.txt	2025-03-07 19:06:27
@@ -1,17 +1,17 @@
 # Import necessary libraries
-import os  # For accessing environment variables
+import os
+import time  # For accessing environment variables
 import dotenv  # For loading environment variables from a .env file
 # Import modules from Composio and LlamaIndex
 import re
 from datetime import datetime
-from composio_llamaindex import App, ComposioToolSet, Action
+from composio_llamaindex import App, ComposioToolSet, Action, Trigger
 from llama_index.core.agent import FunctionCallingAgentWorker
 from llama_index.core.llms import ChatMessage
 from llama_index.llms.openai import OpenAI
 
 from composio.client.collections import TriggerEventData
 
-
 # Load environment variables from a .env file
 dotenv.load_dotenv()
 
@@ -20,7 +20,7 @@
 
 # Retrieve tools from Composio, specifically the EMBEDTOOL app
 # Define the tools
-schedule_tool = composio_toolset.get_actions(
+schedule_tool = composio_toolset.get_tools(
     actions=[
         Action.GOOGLECALENDAR_FIND_FREE_SLOTS,
         Action.GOOGLECALENDAR_CREATE_EVENT,
@@ -34,42 +34,16 @@
 date_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
 timezone = datetime.now().astimezone().tzinfo
 
-# Define the tools
-tools = composio_toolset.get_actions(
-        actions=[
-        Action.GITHUB_GET_CODE_CHANGES_IN_PR,
-        Action.GITHUB_PULLS_CREATE_REVIEW_COMMENT,
-        Action.GITHUB_ISSUES_CREATE,
-        Action.SLACKBOT_CHAT_POST_MESSAGE,
-        ]
-)
-
-def extract_sender_email(payload):
-    delivered_to_header_found = False
-    for header in payload["headers"]:
-        if header.get("name", "") == "Delivered-To" and header.get("value", "") != "":
-            delivered_to_header_found = True
-    print("delivered_to_header_found: ", delivered_to_header_found)
-    if not delivered_to_header_found:
-        return None
-    for header in payload["headers"]:
-        if header["name"] == "From":
-            # Regular expression to extract email from the 'From' header value
-            match = re.search(r"[\w\.-]+@[\w\.-]+", header["value"])
-            if match:
-                return match.group(0)
-    return None
-
 # Create a trigger listener
 listener = composio_toolset.create_trigger_listener()
-@listener.callback(filters={"trigger_name": "github_pull_request_event"})
-def review_new_pr(event: TriggerEventData) -> None:
+@listener.callback(filters={"trigger_name": Trigger.GMAIL_NEW_GMAIL_MESSAGE})
+def callback_new_message(event: TriggerEventData) -> None:
     # Using the information from Trigger, execute the agent
     print("here in the function")
     payload = event.payload
     thread_id = payload.get("threadId")
-    message = payload.get("snippet")
-    sender_mail = extract_sender_email(payload["payload"])
+    message = payload.get("messageText")
+    sender_mail = payload.get("sender")
     if sender_mail is None:
         print("No sender email found")
         return
@@ -81,7 +55,7 @@
         content=(
             f"""
                 You are an AI assistant specialized in creating calendar events based on email information. 
-                Current DateTime: {date_time}. All the conversations happen in IST timezone.
+                Current DateTime: {date_time} and timezone {timezone}. All the conversations happen in IST timezone.
                 Pass empty config ("config": {{}}) for the function calls, if you get an error about not passing config.
                 Analyze email, and create event on calendar depending on the email content. 
                 You should also draft an email in response to the sender of the previous email  
@@ -91,7 +65,7 @@
         )
     ]
     agent = FunctionCallingAgentWorker(
-    tools=tools,  # Tools available for the agent to use
+    tools=schedule_tool,  # Tools available for the agent to use # type: ignore
     llm=llm,  # Language model for processing requests
     prefix_messages=prefix_messages,  # Initial system messages for context
     max_function_calls=10,  # Maximum number of function calls allowed
@@ -116,5 +90,5 @@
     print(response)
 
 print("Listener started!")
-print("Create a pr to get the review")
-listener.listen()
+print("Waiting for email")
+listener.wait_forever()
```
