Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
.wrangler/
RankBloxTicket+/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The `proxy` Worker sits in front of the others: callers authenticate against the
| [`proxy/`](./proxy) | Shared auth gate and router. Forwards requests for known hosts to sibling Workers via service bindings; everything else falls through to a public `fetch()`. |
| [`fivem/`](./fivem) | Looks up a FiveM server by ID and resolves a Discord snowflake to a player on that server. |
| [`bloxlink/`](./bloxlink) | Resolves a Discord user to their linked Roblox account via Bloxlink, with a KV-backed cache. |
| [`googledocs/`](./googledocs) | Scaffold for writing ticket data to a Google Sheet (placeholder only; API calls not implemented yet). |

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down Expand Up @@ -98,6 +99,7 @@ New integrations are picked up automatically — no workflow edits needed.
| `proxy` | `PROXY_AUTH_KEY` | Shared token expected in that header. |
| `fivem` | `FIVEM_AUTH_KEY` | Token expected in the `Authorization` header. |
| `bloxlink` | `BLOXLINK_AUTH_KEY` | Token expected in the `X-Tickets-Auth` header. |
| `googledocs` | `GOOGLEDOCS_AUTH_KEY` | Token expected in the `X-Tickets-Auth` header. |

`SENTRY_DSN` for each Worker is configured in its `wrangler.toml` under `[vars]`.

Expand Down
74 changes: 74 additions & 0 deletions googledocs/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Google Docs (Google Sheets) User Guide

This guide is for users only.

It assumes the integration is already live and connected by your admin/developer. You do not need to deploy anything.

## What this integration does

When ticket activity happens, the system writes or updates one row in your Google Sheet.

Common ticket events that update the sheet:

1. Ticket opened
2. Ticket claimed/unclaimed
3. First response sent
4. Close requested
5. Ticket closed

## What you need to do as a user

### 1. Setting up the Google Sheet

1. Open or create a sheet, and get the id (the long string in the url)
2. Create/rename a tab, and keep this in mind (default `Tickets`).
3. Give the system editor access to the document. Email: rankblox-docs-bot@gmail-to-discord-340802.iam.gserviceaccount.com

### 2. Confirm headers are present

Your tickets tab should have these columns in row 1:

1. Ticket ID
2. Channel ID
3. Status
4. Guild ID
5. User ID
6. Claimed By
7. Close Requested By
8. Opened At
9. First Reply At
10. Closed At
11. Panel Title

The integration should write them automatically.

### 3. Use your ticket system normally

You do not manually push data to Google Sheets.

Just use the ticket bot/panel as usual:

1. Open a ticket
2. Claim or unclaim it
3. Reply to it
4. Request close or close it

The sheet should update shortly after each action.

### 4. Check if sync is working

After you perform an action in tickets:

1. Refresh the sheet.
2. Find the ticket by `Ticket ID` or `Channel ID`.
3. Confirm fields changed as expected:
- `Status` reflects the latest state (`open`, `claimed`, `close_requested`, `closed`, etc.)
- `First Reply At` fills after first staff reply
- `Closed At` fills when closed
- `Claimed By` and `Close Requested By` reflect user IDs from ticket actions

### 5. Understand expected delay

Small delay is normal.

Writes are queued and debounced to reduce spam/duplicates, so updates can take a short moment to appear.
Loading