Skip to content

Add CinemaCon schedule → Outlook calendar agent#1

Draft
OyeThakkar with Copilot wants to merge 2 commits into
mainfrom
copilot/copy-schedule-to-outlook
Draft

Add CinemaCon schedule → Outlook calendar agent#1
OyeThakkar with Copilot wants to merge 2 commits into
mainfrom
copilot/copy-schedule-to-outlook

Conversation

Copilot AI commented Mar 29, 2026

Copy link
Copy Markdown

Implements a Python agent that scrapes the CinemaCon schedule-of-events page and writes each session as a calendar event to an Outlook account via Microsoft Graph API.

Architecture

  • scraper.py – Fetches and parses cinemacon.com/en/schedule-of-events using three strategies in priority order:
    1. Structured <table> (time + title cells)
    2. Day-section headings (Monday, March 31 …) + sibling session rows
    3. Fallback: any text node containing an AM/PM time pattern
  • outlook_client.py – Thin Graph API wrapper; authenticates via MSAL device code flow (no client secret in code), persists tokens to a local cache file, POSTs to /users/{user}/calendar/events
  • agent.py – CLI orchestrator; supports --dry-run (print events, no writes), --year, and --url overrides
  • config.py – All tunables; credentials sourced from AZURE_TENANT_ID / AZURE_CLIENT_ID env vars

Usage

# Inspect parsed events without touching the calendar
python agent.py --dry-run

# Write to harshit.thakkar@qubecinema.com's Outlook calendar
AZURE_TENANT_ID=<tenant> AZURE_CLIENT_ID=<client-id> python agent.py

First run triggers a browser-based device code prompt; subsequent runs are silent via the token cache. token_cache.json is .gitignored.

Prerequisites

Azure AD app registration needs Calendars.ReadWrite (delegated) granted and the native-client redirect URI added. Full setup steps in README.md.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.cinemacon.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

I want to create an agent which will copy the schedule from https://www.cinemacon.com/en/schedule-of-events and add it to my Outlook calendar for the account harshit.thakkar@qubecinema.com.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add functionality to copy schedule from CinemaCon to Outlook calendar Add CinemaCon schedule → Outlook calendar agent Mar 29, 2026
Copilot AI requested a review from OyeThakkar March 29, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants