Skip to content

(claude): GoogleCalendarCreateEventAction#1206

Open
swerner wants to merge 1 commit intomainfrom
daily-action-suggestion-claude-2025-10-27-10-02-58
Open

(claude): GoogleCalendarCreateEventAction#1206
swerner wants to merge 1 commit intomainfrom
daily-action-suggestion-claude-2025-10-27-10-02-58

Conversation

@swerner
Copy link
Copy Markdown
Contributor

@swerner swerner commented Oct 27, 2025

Creates a calendar event in Google Calendar with specified title, date/time, duration, and attendees. Useful for AI agents that need to schedule follow-ups or coordinate meetings based on conversations or tasks.

@augmentations-ai
Copy link
Copy Markdown

This is a great addition! To ensure it's working correctly and easy to debug, let's add some manual testing steps.

Manual Testing Instructions:

  1. Prerequisites:

    • Ensure you have the google-apis-calendar_v3 and googleauth gems installed (gem install google-apis-calendar_v3 googleauth).
    • Set up Google Calendar API credentials and save them in a JSON file. The path to this file should be stored in the GOOGLE_CALENDAR_CREDENTIALS environment variable.
    • Ensure you have a valid Time.zone.name configured in your Rails or Ruby environment. If not using Rails, you will need to mock this for testing.
  2. Test Cases:

    • Basic Event Creation:

      require_relative 'GoogleCalendar/google_calendar_create_event_action'
      
      # Set environment variable (replace with your actual path)
      ENV['GOOGLE_CALENDAR_CREDENTIALS'] = '/path/to/your/credentials.json'
      
      start_time = Time.now + (60 * 60) # One hour from now
      end_time = start_time + (60 * 60)   # Another hour (2 hours from now)
      
      action = GoogleCalendarCreateEventAction.new(
        title: 'Test Event',
        start_time: start_time,
        end_time: end_time,
        description: 'This is a test event created via code.',
        attendees: ['test@example.com'] #replace with valid email address
      )
      
      event_id = action.call
      
      puts "Event ID: #{event_id}"
      • Verify that an event titled "Test Event" is created in your Google Calendar with the specified start and end times. Check the description and attendee list.
      • Validate that the event ID is printed to the console.
    • Event Creation with Different Time Zones:

      • Temporarily change Time.zone.name to a different time zone (e.g., 'America/Los_Angeles').
      • Run the basic event creation test. Verify that the event is created with the correct start and end times in the specified time zone in Google Calendar.
    • Event Creation without Attendees:

      • Run the basic event creation test without specifying any attendees. Verify that the event is created successfully without any attendees.
    • Error Handling:

      • Set the GOOGLE_CALENDAR_CREDENTIALS environment variable to an invalid path.
      • Run the basic event creation test. Verify that a StandardError is raised with a descriptive error message, and that the error is logged by the Sublayer.configuration.logger.
  3. Verification:

    • Check your Google Calendar to confirm the events were created with the correct details.
    • Inspect the logs to ensure that events are logged correctly (both success and failure).

By following these steps, we can be confident that the action functions as expected in different scenarios. Including the email address of an account you have access to will allow you to verify the invite feature works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant