From geotab-skills
Builds n8n workflows for Geotab fleet monitoring, automating scheduled API queries and alerts to Slack, Discord, email for events like speeding or faults.
npx claudepluginhub fhoffa/geotab-vibe-guideThis skill uses the workspace's default tool permissions.
- Building automated monitoring that runs on a schedule
Guides Geotab fleet management development with Python API, JavaScript Add-Ins, React Zenith styling, OData Data Connector, and Ace AI natural language queries.
Provides proven architectural patterns for n8n workflows: webhook processing, HTTP API integration, database operations, AI agents, batch processing, scheduled tasks. Use when building, designing, or automating with n8n.
Manages n8n workflows via REST API: lists/activates/deactivates workflows, checks/monitors executions, triggers manually, debugs issues. For n8n automation tasks.
Share bugs, ideas, or general feedback.
n8n is a visual workflow builder. Workflows consist of nodes connected together:
[Trigger] → [Action] → [Action] → [Action]
| Node | Purpose |
|---|---|
| Schedule Trigger | Run workflow on interval (every 5 min, hourly, etc.) |
| HTTP Request | Call any API (including Geotab) |
| IF | Branch based on condition |
| Filter | Only pass items matching criteria |
| Slack | Send Slack messages |
| Discord | Send Discord messages |
| Send Email | Send email alerts |
| Code | Custom JavaScript logic |
HTTP Request node: {% raw %}
Method: POST
URL: https://my.geotab.com/apiv1
Body (JSON):
{
"method": "Authenticate",
"params": {
"database": "{{ $vars.GEOTAB_DATABASE }}",
"userName": "{{ $vars.GEOTAB_USERNAME }}",
"password": "{{ $vars.GEOTAB_PASSWORD }}"
}
}
{% endraw %}
HTTP Request node (after Authenticate): {% raw %}
Method: POST
URL: https://my.geotab.com/apiv1
Body (JSON):
{
"method": "Get",
"params": {
"typeName": "Trip",
"credentials": {{ JSON.stringify($json.result.credentials) }},
"search": {
"fromDate": "{{ $now.minus({hours: 1}).toISO() }}",
"toDate": "{{ $now.toISO() }}"
}
}
}
{% endraw %}
| TypeName | Data |
|---|---|
Device | Vehicles |
Trip | Completed trips |
User | Users and drivers |
DeviceStatusInfo | Current location/status |
ExceptionEvent | Rule violations (speeding, etc.) |
FaultData | Engine fault codes |
Zone | Geofences |
LogRecord | GPS breadcrumbs |
Schedule (15 min)
→ HTTP Request (Authenticate)
→ HTTP Request (Get Trips)
→ Filter (speedingDuration > 30)
→ Slack (Send message)
Filter node condition: {% raw %}
{{ $json.result.speedingDuration > 30 }}
{% endraw %}
Slack message: {% raw %}
🚨 *Speeding Alert*
*Vehicle:* {{ $json.result.device.name }}
*Duration:* {{ $json.result.speedingDuration }} seconds
{% endraw %}
Schedule (5 min)
→ HTTP Request (Authenticate)
→ HTTP Request (Get FaultData, last hour)
→ Filter (severity == "Critical")
→ Slack + Email (parallel)
Schedule (5 min)
→ HTTP Request (Authenticate)
→ HTTP Request (Get ExceptionEvent for zone rules)
→ Filter (new events only)
→ Discord (Send notification)
Schedule (daily at 8am)
→ HTTP Request (Authenticate)
→ HTTP Request (Get Trips, last 24h)
→ Code (calculate totals)
→ Email (send summary)
Code node for summary:
const trips = $input.all();
const totalDistance = trips.reduce((sum, t) => sum + (t.json.result?.distance || 0), 0);
const totalTrips = trips.length;
return [{
json: {
totalTrips,
totalDistanceKm: (totalDistance / 1000).toFixed(1),
date: new Date().toISOString().split('T')[0]
}
}];
Never hardcode credentials. Use n8n Variables:
GEOTAB_DATABASEGEOTAB_USERNAMEGEOTAB_PASSWORDReference in nodes: {% raw %}{{ $vars.GEOTAB_DATABASE }}{% endraw %}
n8n Cloud includes email sending. Self-hosted needs SMTP config.
Don't poll every second. Use 5-15 minute intervals for most cases.
Track what you've already alerted on. Use a Code node to filter:
// Store last run timestamp in static data
const lastRun = $getWorkflowStaticData('global').lastRun || 0;
$getWorkflowStaticData('global').lastRun = Date.now();
// Filter to only new items
return $input.all().filter(item => {
const itemTime = new Date(item.json.result?.start).getTime();
return itemTime > lastRun;
});
Geotab sessions expire. Always authenticate at the start of each workflow run.
geotab-api-quickstart - Geotab API basics for Pythongeotab-addins - Building MyGeotab Add-Ins