🚀 Tutorial: Using the GLPI Pack in Coda
This guide explains how to install, configure, and use your GLPI Pack inside Coda.
1. 🔧 GLPI Setup Requirements
Before using the Pack, make sure your GLPI instance is ready:
Log in as an administrator in GLPI. Go to Setup → General → API. Ensure Enable Rest API is turned ON ✅. Give it a name (e.g., Coda Pack). ⚠️ Disable IP restriction or allow the Coda server IP (e.g., 52.37.21.175). In your GLPI user profile, copy your Remote access key (called the User-Token). These two tokens (App-Token and User-Token) are required to authenticate Coda.
2. 🧩 Copy and Install the Pack in Coda
3. 🔑 Connect the Pack
On first use:
Coda will ask you to create a connection. App-Token = from your API Client. User-Token = from your GLPI user profile. Save → your connection is ready 🎉. 4. 📊 Using Sync Tables
Your Pack provides several sync tables to import GLPI data:
GLPIComputers → Computers GLPILicenses → Software licenses GLPIPhoneLines → Phone lines GLPISuppliers → Suppliers GLPIContracts → Contracts GLPIDataCenters → Data centers GLPIUsers → Users (login, names, email, entity, active status) 📌 Example: Import computers
In your Coda doc, type /GLPIComputers. A table will appear with computers from GLPI. Click Sync now to update. 👉 You can adjust the limit parameter to control how many rows are fetched.
Example: Import computers
In your Coda doc, type /GLPIComputers. A table will appear with computers from GLPI. Click Sync now to update. You can adjust the limit (limit) parameter to control how many rows are fetched.
5. 🎛️ Ticket Actions
The Pack includes buttons/formulas to manage the full ticket lifecycle.
Open a ticket
CreateTicket("Broken PC", "John's laptop won’t start", 4, 1)
Update a ticket
UpdateTicket(ticketId, "New Title", "Updated content", 3, 2)
Change status
SetTicketStatus(ticketId, 6) // e.g., 6 = Closed
Add a follow-up (comment)
AddTicketFollowup(ticketId, "Reboot attempted, still failing", true)
Create a recurring ticket
CreateRecurringTicket("Weekly backup check", "Verify backups", "weekly")
⚠️ This may depend on GLPI version/configuration — might require TicketRecurrent or Templates.
6. 👥 User Administration
The Pack now supports full user management directly from Coda.
🔹 Create a user
CreateUser("jdoe", "Doe", "John", "jdoe@acme.com", 0, true, "password123")
🔹 Update a user
UpdateUser(userId, "newlogin", "Doe", "Johnny", "johnny@acme.com", 1, true)
🔹 Delete a user (move to trash)
DeleteUser(userId)
🔹 Purge a user (permanent)
DeleteUser(userId, true)
🔹 Bulk import users
Prepare a Coda table with columns:
name, realname, firstname, email, entities_id, is_active. UsersTable.ToJSON()
Pass the JSON string to the formula: ImportUsers(UsersTable.ToJSON())
✅ Each user will be created in GLPI.
7. 🔍 Utility Formulas
Additional helper formulas:
GetTicket(ticketId) → fetch a specific ticket. GetUser(userId) → fetch a specific user. 8. 💡 Tips
Use Sync Tables to build dashboards in Coda (ticket tracking, asset management, budgets, etc.). Use Action buttons in Coda tables to let end users open, update, or delete tickets and users directly. Adjust Itemtypes (ITEMTYPES constants in code) if your GLPI uses different naming. Combine CreateUser + UpdateUser with Coda automations to streamline onboarding/offboarding.