Settings
Google configuration is managed with Railway service variables.
Railway configuration
Values are kept private in Railway and are not displayed here.
Google spreadsheetChecking…
Service account and VisionChecking…
Google OAuth clientChecking…
Google Drive folderChecking…
Personal Google Drive
Connect your Google account so photos use your personal Drive storage.
Not connected
OAuth creates an MHC Tools Uploads folder in My Drive.
How to set up MHC Tools Google Cloud, Sheets, Drive, and Railway instructions
1. Prepare Google Cloud
- Open the Google Cloud Console and select or create a project.
- Attach a billing account to the project. Cloud Vision requires billing, although the first 1,000 receipt images each month are free.
- Open APIs & Services → Library and enable:
- Cloud Vision API
- Google Sheets API
- Google Drive API
2. Create the service account
- Open IAM & Admin → Service Accounts and create a service account.
- Open it, then choose Keys → Add key → Create new key → JSON.
- Keep the downloaded JSON file private. Never upload it to GitHub.
- Set
GOOGLE_SERVICE_ACCOUNT_EMAILin Railway to the JSON file'sclient_email. - Set
GOOGLE_PRIVATE_KEYin Railway to the complete JSONprivate_key, including the BEGIN and END lines.
3. Connect Google Sheets
- Create a Google Sheet and share it with the service account as an Editor.
- Copy the ID from the Google Sheet URL into Railway as
GOOGLE_SPREADSHEET_ID. - Deploy the Railway service. MHC Tools will create the required sheet tabs automatically.
- Add job names to the Jobs tab in column A, starting at cell A2.
- Add worker names in column E and their four-digit codes in column F, starting at row 2.
- Add work to the Task ToDo tab using: Job, Date Assigned, Assigned To, Status, Task.
4. Connect personal Google Drive
- Open APIs & Services → OAuth consent screen, configure the app, and add your Google account as a test user if the app is in testing.
- Open APIs & Services → Credentials and create an OAuth client ID with application type Web application.
- Copy the authorized redirect URI shown above into the OAuth client's Authorized redirect URIs.
- Set the client ID and client secret in Railway as
GOOGLE_OAUTH_CLIENT_IDandGOOGLE_OAUTH_CLIENT_SECRET. - Select Connect Google Drive, sign in, and approve access. MHC Tools creates its own uploads folder in My Drive.
5. Configure Railway
- Add these variables to the Railway service. The Settings page only reports whether they are present; it never displays their values:
GOOGLE_SPREADSHEET_IDGOOGLE_SERVICE_ACCOUNT_EMAILGOOGLE_PRIVATE_KEYGOOGLE_OAUTH_CLIENT_IDGOOGLE_OAUTH_CLIENT_SECRETGOOGLE_DRIVE_REFRESH_TOKENGOOGLE_DRIVE_FOLDER_IDPUBLIC_URL(for example,https://work.mhc211757.com)GOOGLE_OAUTH_REDIRECT_URI(optional exact callback override)SITE_MASTER_PINSITE_UNLOCK_SECRETAPP_TIMEZONE(for example,America/Los_Angeles)
- Add worker names and four-digit codes to the Jobs tab in columns E and F, starting on row 2.
- Deploy and test the connection.
6. Test the connection
- Return to the workspace and refresh the job list.
- Upload a clear receipt photo with the total visible.
- Confirm that the image appears in Drive and a new row appears on the Receipt tab.