lucidchart-webhooks-events
Webhooks Events for Lucidchart. Trigger: "lucidchart webhooks events".
What this skill does
# Lucidchart Webhooks & Events
## Overview
Lucidchart delivers real-time webhook notifications when documents, shapes, and collaboration states change across your organization's diagramming workspace. These events power integrations such as auto-archiving diagrams to Confluence when finalized, notifying Slack channels when collaborators join a shared document, triggering CI pipelines when architecture diagrams are updated, and maintaining audit logs of all document access. Payloads are signed JSON delivered over HTTPS using a webhook signing secret.
## Prerequisites
- A Lucid developer account with an OAuth2 app registered at `developer.lucid.co`
- Webhook endpoint URL accessible over HTTPS (TLS 1.2+)
- Webhook signing secret from the Lucid app settings (`LUCID_WEBHOOK_SECRET`)
- Express.js with raw body parsing for signature verification
## Webhook Registration
```typescript
import axios from "axios";
const res = await axios.post(
"https://api.lucid.co/v1/webhooks",
{
callbackUrl: "https://your-app.com/webhooks/lucidchart",
events: ["document.created", "document.updated", "document.shared",
"shape.added", "collaborator.joined"],
scope: "account",
},
{ headers: { Authorization: `Bearer ${process.env.LUCID_ACCESS_TOKEN}`,
"Lucid-Api-Version": "1" } }
);
console.log("Webhook ID:", res.data.webhookId);
```
## Signature Verification
```typescript
import crypto from "crypto";
import { Request, Response, NextFunction } from "express";
function verifyLucidSignature(req: Request, res: Response, next: NextFunction) {
const signature = req.headers["x-lucid-signature"] as string;
const requestId = req.headers["x-lucid-request-id"] as string;
if (!signature || !requestId) return res.status(401).send("Missing signature");
const expected = crypto
.createHmac("sha256", process.env.LUCID_WEBHOOK_SECRET!)
.update((req as any).rawBody)
.digest("base64");
if (!crypto.timingSafeEqual(Buffer.from(signature, "base64"), Buffer.from(expected, "base64"))) {
return res.status(403).send("Invalid signature");
}
next();
}
```
## Event Handler
```typescript
app.post("/webhooks/lucidchart", verifyLucidSignature, (req, res) => {
const { eventType, data, timestamp } = req.body;
switch (eventType) {
case "document.created":
console.log(`New doc: "${data.title}" by ${data.creatorId} in ${data.folderId}`);
break;
case "document.updated":
console.log(`Doc updated: ${data.documentId}, pages: ${data.pageCount}`);
break;
case "document.shared":
console.log(`Doc shared: ${data.documentId} → ${data.recipientEmail} (${data.permission})`);
break;
case "shape.added":
console.log(`Shape: ${data.shapeType} on page ${data.pageId} of doc ${data.documentId}`);
break;
case "collaborator.joined":
console.log(`${data.userId} joined doc ${data.documentId} as ${data.role}`);
break;
default:
console.warn(`Unhandled event: ${eventType}`);
}
res.status(200).json({ ok: true });
});
```
## Event Types
| Event | Payload Fields | Use Case |
|---|---|---|
| `document.created` | `documentId`, `title`, `creatorId`, `folderId`, `templateId` | Index new diagrams in search or notify team channels |
| `document.updated` | `documentId`, `pageCount`, `lastEditedBy`, `editSummary` | Trigger CI when architecture diagrams change |
| `document.shared` | `documentId`, `recipientEmail`, `permission`, `sharedBy` | Audit external sharing for compliance |
| `shape.added` | `documentId`, `pageId`, `shapeType`, `shapeId`, `position` | Track diagram complexity metrics |
| `collaborator.joined` | `documentId`, `userId`, `role`, `joinedAt` | Post Slack notifications for live collaboration |
| `document.deleted` | `documentId`, `deletedBy`, `deletedAt` | Remove stale references from linked systems |
## Retry & Idempotency
```typescript
const seen = new Set<string>();
function ensureIdempotent(req: Request, res: Response, next: NextFunction) {
const requestId = req.headers["x-lucid-request-id"] as string;
if (seen.has(requestId)) {
return res.status(200).json({ duplicate: true });
}
seen.add(requestId);
next();
}
// Lucid retries failed deliveries 3 times with exponential backoff (1 min, 5 min, 30 min).
// After 3 consecutive failures the webhook is marked inactive and must be re-enabled via API.
```
## Error Handling
| Issue | Cause | Fix |
|---|---|---|
| 403 on signature check | Signing secret regenerated in Lucid dashboard | Update `LUCID_WEBHOOK_SECRET` and redeploy |
| Events arrive for wrong account | Webhook scope set to `user` instead of `account` | Re-register with `"scope": "account"` |
| `shape.added` floods endpoint | Busy diagram with many rapid edits | Debounce by `documentId` with a 5-second window |
| Webhook marked inactive | Endpoint returned errors for 3 retries | Fix endpoint, then PATCH webhook status to `active` |
| Missing `Lucid-Api-Version` header | API version not pinned | Always include `"Lucid-Api-Version": "1"` in registration |
## Resources
- [Lucid Developer Reference](https://developer.lucid.co/reference/overview)
## Next Steps
See `lucidchart-security-basics`.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.