Dito Legislative Solutions - Bill Tracking

Dito has partnered with Google to offer a consulting solution for bill tracking and analysis called the Google Legislation Analysis System (GLAS). It allows users to record and track their agency’s position on legislative bills using Google Workspace and Gemini AI technology

Bill tracking

Key Features

  • Provides a configurable dashboard for agency users to view and record their position on legislative bills.
  • Automated bill analysis and classification using Google Gemini AI.
  • Chat based interface for follow-on questions.
  • Multi-Agency support with each agency able to identify key interests and personnel
  • Google Drive integration
  • Automated updates from legislative APIs on a configurable schedule

Technical Overview

The following diagram shows an overview of the application:

Bill tracking technical overview

Users connect to a Legislation Dashboard. A separate dashboard is created for each agency. The dashboard uses a Google Sheet as a data source. Each agency has a separate sheet to record their position on legislative bills. The agency sheet imports values from a master sheet with bill information. The bill master sheet is updated on a regular schedule by Google Cloud functions that call Legislative APIs to assemble bill information in a Firebase collection and then updates the master and agency sheets.

The dashboard calls separate forms to

  • Interact with Google Gemini
  • Update values in the agency sheet
  • Create folders in Google Drive to store bill related files

User Guide

The GLAS application has 4 components:

  • Legislation Dashboard displays information and agency interest for every bill in the current session
  • AI Insights Screen generates a summary of an individual bill and supports chat based analysis the bill using a large language model (LLM)
  • Edit Screen displays and updates an agency’s position for each bill
  • Bill Folders stores additional files associated with a bill

Legislation Dashboard

The legislation dashboard has 3 separate regions as shown in the image below. The Report Menu on the left of the screen is used to select different views of the agency sheet. The Report Data region shows a page with values for the selected view and Report Filters are used to limit these values.

Legislation dashboard

Select the Not Reviewed option in the report menu to identify bills that have been recently introduced. Follow the AI Insights link on this page to access analysis and edit forms. Note this link does not appear on every page.

AI Insights

AI Insights Screen

This opens the AI Analysis screen and automatically triggers a review of the bill. It summarizes the bill and identifies its likely impact on different agencies.

Bill Analysis

The analysis screen includes a chat window where users can ask follow-on questions about the selected bill

Chat window for follow-on chat

Buttons at the top of the Bill Analysis screen control access to the application’s functionality:

Analysis Screen Buttons

  • Fetch Bill Text makes an HTTP request to the URL for a pdf file, converts the response to text and then calls the LLM.
  • Summarize Bill calls the LLM without making a HTTP request. It uses the text returned by the previous call.
  • Show Bill Text displays the text for the current bill
  • Create Folder/Open Folder creates or opens a Google Drive folder to store files associated with the bill
  • Edit opens a new window to record agency interest in the bill

Note: the Fetch Bill Text and Summarize Bill buttons execute features that get called automatically when the screen first opens.

Edit Screen

The Edit Screen allows users to update values in the Agency Sheet. It uses values recorded in the sheet to populate drop-down lists with agency specific values. For example, each agency can have a different list of attorneys.

Edit values

Pressing the Update button at the bottom of the screen submits the form and updates the sheet. The screen can be closed once this is done.

After the Agency Sheet has been updated the Legislation Dashboard needs to be refreshed to reflect the changes. This is done by pressing the 3 dots on the top right of the dashboard and selecting the Refresh data option.

Refreshing data after edits

Bill Folders

Bill folders can be created for any bill that the agency wants to track. A bill folder is a Google Drive location. It is pre-populated with a copy of the bill text and other pro-forma files when the Create Folder button is pressed in the AI Insights screen.

Once the folder has been created it can be accessed directly from Google Drive or by following links from the Dashboard and AI Insights screen. Documents can be created, updated and saved to the drive independently. This allows Gemini for Google Workspace to be used to create and curate agency interests across multiple bills.

GLAS Project Deployment

A GLAS deployment installs and configures the following components:

Bill tracking technical overview

  • Cloud Scheduler: a script that calls the fetch bills and populate sheets module on a regular schedule
  • Fetch Bills Module: custom code to call APIs for a given legislature and populate a Firestore DB collection
  • Firestore Database: used to store bill information
  • Populate Sheets Module: reads the Firestore DB collection and updates the Bill Master and Agency sheets
  • Google Gemini API Key: needed for calls to the Google LLM
  • Bill Master Sheet: Google Sheet with current bill statuses
  • Agency Sheets: Google Sheet recording agency interests
  • Legislation Dashboard: Google Looker Studio dashboard for user access
  • Edit and Insights Screens: Google Apps Script forms
  • Agency Folders and Templates: Google Drive location and document

Prerequisites

  1. A Google Cloud project with billing enabled for API Key registration and the Cloud Scheduler, Fetch Bills, Populate Sheets modules.
  2. Google Workspace accounts for each user
  3. REST API documentation for the legislature data including a mechanism to identify pdf file locations for each bill

Discovery

Meet with subject matter experts from each agency to review and approve:

  1. The required field list for the Bill Master Sheet
  2. The required field list for each Agency Sheet
  3. Legislation Dashboard requirements
  4. Document Template requirements
  5. Required Cloud Scheduler update cadence

Analysis

  1. Identify required changes to the Firestore Database schema. An example record from the current default schema is shown below

     {
       'billNumber': 'HB 10',
       'lcNumber': 'LC0010',
       'primarySponsor': 'Mike Hopkins (R) District 92',
       'status': 'Chapter Number Assigned',
       'statusDate': '05/22/2023',
       'statusTime': '2023-05-22T12:33:25',
       'shortTitle': 'Long-range information technology financings and appropriations',
       'committee': 'Conference Committee on HB 10',
       'subjects':  'Appropriations  (see also: State Finance), Information Technology  (see also: Communications), Money Transfer, Motor Vehicles (see also: Taxation--Trans; Traffic Regulations; Transportation)',
       'requestors': 'Office of Budget and Program Planning by Legislative Council',
       'lastUpdated': '2023-05-22T12:33:25',
       'documents': [
         {
           'fileName': 'HB0010_1.pdf',
           'folderID': 2651,
           'id': 2557,
           'url': 'https://api.legmt.gov/docs/v1/documents/getContent?documentId=2557'
         },
         {
           'fileName': 'HB0010_2.pdf',
           'folderID': 2651,
           'id': 2558,
           'url': 'https://api.legmt.gov/docs/v1/documents/getContent?documentId=2558'
         }
       ]
       'billHtml': 'https://bills.legmt.gov/#/bill/20231/LC0010',
       'billSortNumber': 'HB0010',
       'billType': 'HB',
       'hearingDate': '5/1/2023',
       'hearingDetails': '"Action: (S) Hearing\nDate: 05/01/2023\nHearing Room: 317\nHearing Time: 11:00 AM\nCommittee: Conference Committee on HB 10\nVotes Yes: \nVotes No:\nAction Comments: Conference Committee on HB 10\nReport Number: \nHearing Cancelled Date: \n"',
       'latestAmendmentDate': '5/11/2023',
     }
    
  2. Identify changes to the Populate Sheets module based on the Firestore schema changes

  3. Identify API calls to legislature site for use in the Fetch Bills module to populate the Firestore schema

Development

Create the following in a development environment:

  1. Common code:
    • Develop and test a Fetch Bills module
    • Develop and test changes to the Populate Sheets module
    • Register an API Key
    • Configure variables in the Edit and Insights Screens
  2. For each Agency
    • Create an Agency Sheet and configure its Form fields
    • Develop and configure a Legislation Dashboard
    • Develop Document Templates
    • Update the Bill Master Sheet to include entry for each agency sheet and document template

Deployment

Production code is delivered to customers via Google Workspace as a Resource Bundle. A Resource Bundle is a Google Doc with links to read-only copies of the development environment code. The resource links are copied into the customer’s environment and then configured by following installation instructions included in the bundle doc.

Copyright © Dito LLC, 2022, 2025