flexport-webhooks-events
Implement Flexport webhook event handling for shipment milestones, booking updates, purchase order events, and invoice notifications. Trigger: "flexport webhooks", "flexport events", "flexport milestones", "flexport shipment tracking webhook".
Best use case
flexport-webhooks-events is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Implement Flexport webhook event handling for shipment milestones, booking updates, purchase order events, and invoice notifications. Trigger: "flexport webhooks", "flexport events", "flexport milestones", "flexport shipment tracking webhook".
Teams using flexport-webhooks-events should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/flexport-webhooks-events/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How flexport-webhooks-events Compares
| Feature / Agent | flexport-webhooks-events | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Implement Flexport webhook event handling for shipment milestones, booking updates, purchase order events, and invoice notifications. Trigger: "flexport webhooks", "flexport events", "flexport milestones", "flexport shipment tracking webhook".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Flexport Webhooks & Events
## Overview
Flexport sends webhook notifications for shipment milestones, booking confirmations, PO updates, invoice events, and document availability. Webhooks are configured in Portal > Settings with a secret token for HMAC-SHA256 signature verification via the `X-Hub-Signature` header.
## Webhook Event Types
| Category | Events | Use Case |
|----------|--------|----------|
| Milestones | `cargo_ready`, `departed`, `arrived`, `customs_cleared`, `delivered` | Shipment tracking |
| Transit | `estimated_departure`, `estimated_arrival`, `actual_departure` | ETA updates |
| Bookings | `booking_confirmed`, `booking_amended` | Booking lifecycle |
| Purchase Orders | `po_created`, `po_updated`, `po_archived` | PO management |
| Invoices | `invoice_created`, `freight_invoice_ready` | Billing |
| Documents | `document_uploaded`, `bill_of_lading_ready` | Document management |
| Container | `container_loaded`, `container_unloaded` | Container tracking |
## Instructions
### Step 1: Create Webhook Endpoint in Flexport
Navigate to Portal > Settings > Webhooks > Add Endpoint:
- URL: `https://your-app.com/webhooks/flexport`
- Secret: Generate a strong random string
- Events: Select event types to subscribe to
### Step 2: Implement Webhook Handler
```typescript
import crypto from 'crypto';
import express from 'express';
const app = express();
// IMPORTANT: Use raw body for signature verification
app.post('/webhooks/flexport', express.raw({ type: '*/*' }), async (req, res) => {
// Step 1: Verify signature
const signature = req.headers['x-hub-signature'] as string;
const expected = 'sha256=' + crypto
.createHmac('sha256', process.env.FLEXPORT_WEBHOOK_SECRET!)
.update(req.body)
.digest('hex');
if (!crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))) {
console.error('Invalid webhook signature');
return res.status(401).send('Invalid signature');
}
// Step 2: Parse and route event
const event = JSON.parse(req.body.toString());
console.log(`Webhook: ${event.type} | ID: ${event.data?.id}`);
try {
await routeEvent(event);
res.status(200).send('OK');
} catch (err) {
console.error('Webhook processing failed:', err);
res.status(500).send('Processing error');
// Dead letter: store for retry
}
});
// Step 3: Route events to handlers
async function routeEvent(event: { type: string; data: any }) {
switch (event.type) {
case 'shipment.milestone':
await handleMilestone(event.data);
break;
case 'shipment.eta_updated':
await handleETAUpdate(event.data);
break;
case 'booking.confirmed':
await handleBookingConfirmed(event.data);
break;
case 'invoice.created':
await handleInvoice(event.data);
break;
case 'document.uploaded':
await handleDocument(event.data);
break;
default:
console.log(`Unhandled event type: ${event.type}`);
}
}
```
### Step 3: Handle Shipment Milestones
```typescript
async function handleMilestone(data: {
shipment_id: string;
milestone: string;
occurred_at: string;
location?: { name: string; country: string };
}) {
console.log(`Milestone: ${data.milestone} for ${data.shipment_id}`);
console.log(` At: ${data.occurred_at} | Location: ${data.location?.name}`);
// Update your database
await db.shipments.update({
where: { flexportId: data.shipment_id },
data: {
status: data.milestone,
lastMilestoneAt: new Date(data.occurred_at),
currentLocation: data.location?.name,
},
});
// Notify stakeholders for key milestones
if (['departed', 'arrived', 'delivered'].includes(data.milestone)) {
await notifyStakeholders(data.shipment_id, data.milestone);
}
}
```
### Step 4: Idempotent Processing
```typescript
// Flexport may retry webhooks — ensure idempotent handling
async function processWebhookIdempotently(event: any) {
const eventId = event.id || crypto.createHash('sha256')
.update(JSON.stringify(event)).digest('hex');
// Check if already processed
const exists = await db.webhookLog.findUnique({ where: { eventId } });
if (exists) {
console.log(`Duplicate webhook ${eventId}, skipping`);
return;
}
await db.$transaction([
db.webhookLog.create({ data: { eventId, type: event.type, processedAt: new Date() } }),
routeEvent(event),
]);
}
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| 401 signature mismatch | Wrong secret or body parsing | Use `express.raw()`, verify secret matches Portal |
| Duplicate events | Flexport retries on timeout | Implement idempotency with event ID dedup |
| Missing events | Endpoint unreachable | Monitor uptime, use dead letter queue |
| Slow processing | Complex handler logic | Acknowledge fast (200), process async |
## Resources
- [Flexport Webhook API](https://apidocs.flexport.com/v2/tag/Webhook-Endpoints/)
- [Flexport Developer Portal](https://developers.flexport.com/)
## Next Steps
For performance optimization, see `flexport-performance-tuning`.Related Skills
workhuman-webhooks-events
Workhuman webhooks events for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman webhooks events".
wispr-webhooks-events
Wispr Flow webhooks events for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr webhooks events".
windsurf-webhooks-events
Build Windsurf extensions and integrate with VS Code extension API events. Use when building custom Windsurf extensions, tracking editor events, or integrating Windsurf with external tools via extension development. Trigger with phrases like "windsurf extension", "windsurf events", "windsurf plugin", "build windsurf extension", "windsurf API".
webflow-webhooks-events
Implement Webflow webhook registration, signature verification, and event handling for form_submission, site_publish, ecomm_new_order, page_created, and more. Use when setting up webhook endpoints, implementing event-driven workflows, or handling Webflow notifications. Trigger with phrases like "webflow webhook", "webflow events", "webflow webhook signature", "handle webflow events", "webflow notifications".
vercel-webhooks-events
Implement Vercel webhook handling with signature verification and event processing. Use when setting up webhook endpoints, processing deployment events, or building integrations that react to Vercel deployment lifecycle. Trigger with phrases like "vercel webhook", "vercel events", "vercel deployment.ready", "handle vercel events", "vercel webhook signature".
veeva-webhooks-events
Veeva Vault webhooks events for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva webhooks events".
vastai-webhooks-events
Build event-driven workflows around Vast.ai instance lifecycle events. Use when monitoring instance status changes, implementing auto-recovery, or building event-driven GPU orchestration. Trigger with phrases like "vastai events", "vastai instance monitoring", "vastai status changes", "vastai lifecycle events".
twinmind-webhooks-events
Handle TwinMind meeting events including transcription completion, action item extraction, and calendar sync notifications. Use when implementing webhooks events, or managing TwinMind meeting AI operations. Trigger with phrases like "twinmind webhooks events", "twinmind webhooks events".
together-webhooks-events
Together AI webhooks events for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together webhooks events".
techsmith-webhooks-events
TechSmith webhooks events for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith webhooks events".
supabase-webhooks-events
Implement Supabase database webhooks, pg_net async HTTP, LISTEN/NOTIFY, and Edge Function event handlers with signature verification. Use when setting up database webhooks for INSERT/UPDATE/DELETE events, sending HTTP requests from PostgreSQL triggers, handling Realtime postgres_changes as an event source, or building event-driven architectures. Trigger with phrases like "supabase webhook", "database events", "pg_net trigger", "supabase LISTEN NOTIFY", "webhook signature verify", "supabase event-driven", "supabase_functions.http_request".
stackblitz-webhooks-events
WebContainer lifecycle events: server-ready, port changes, error handling. Use when working with WebContainers or StackBlitz SDK. Trigger: "webcontainer events".