navan-core-workflow-b
Manage Navan expense reporting, transaction data, and ERP synchronization. Use when building expense pipelines, automating approval workflows, or syncing transactions to accounting systems. Trigger with "navan expense management", "navan expense workflow", "navan transaction sync".
Best use case
navan-core-workflow-b is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Manage Navan expense reporting, transaction data, and ERP synchronization. Use when building expense pipelines, automating approval workflows, or syncing transactions to accounting systems. Trigger with "navan expense management", "navan expense workflow", "navan transaction sync".
Teams using navan-core-workflow-b 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/navan-core-workflow-b/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How navan-core-workflow-b Compares
| Feature / Agent | navan-core-workflow-b | 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?
Manage Navan expense reporting, transaction data, and ERP synchronization. Use when building expense pipelines, automating approval workflows, or syncing transactions to accounting systems. Trigger with "navan expense management", "navan expense workflow", "navan transaction sync".
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.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Navan — Expense Management
## Overview
This skill covers the Navan expense reporting workflow through the REST API. The Expense Transaction API requires separate enablement from Navan support — it is not available by default. Once enabled, you can retrieve transaction data incrementally (the TRANSACTION table is append-only, unlike BOOKING which re-imports weekly). This skill provides patterns for expense data retrieval, approval workflow automation, and synchronization with ERP systems including NetSuite, Sage Intacct, Xero, and QuickBooks.
## Prerequisites
- Navan account with OAuth 2.0 API credentials (see `navan-install-auth`)
- Expense Transaction API enabled by Navan support (submit request via help center)
- For ERP sync: active integration configured in Navan Admin > Integrations
- Environment variables: `NAVAN_CLIENT_ID`, `NAVAN_CLIENT_SECRET`, `NAVAN_BASE_URL`
- Node.js 18+ or Python 3.8+
## Instructions
### Step 1: Request Expense API Enablement
The Expense Transaction API is not self-service. To enable it:
1. Navigate to [Navan Help Center](https://app.navan.com/app/helpcenter)
2. Submit a support request for "Expense Transaction API access"
3. Provide your company ID and the OAuth client_id that needs access
4. Navan support will enable the expense endpoints (typically 1-3 business days)
5. Verify access by calling the transaction endpoint after enablement
### Step 2: Authenticate
```typescript
const tokenRes = await fetch(`${process.env.NAVAN_BASE_URL}/ta-auth/oauth/token`, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
grant_type: 'client_credentials',
client_id: process.env.NAVAN_CLIENT_ID!,
client_secret: process.env.NAVAN_CLIENT_SECRET!,
}),
});
const { access_token } = await tokenRes.json();
const headers = { Authorization: `Bearer ${access_token}` };
```
### Step 3: Retrieve Expense Transactions
```typescript
// Expense transactions are incremental — use date ranges for efficient pulls
// Note: The bookings endpoint is the primary data endpoint; expense data
// may require separate enablement from Navan support
const txnRes = await fetch(
`${process.env.NAVAN_BASE_URL}/v1/bookings` +
`?createdFrom=2026-03-01&createdTo=2026-03-31&page=0&size=50`,
{ headers }
);
const { data: transactions } = await txnRes.json();
transactions.forEach((txn: any) => {
console.log(`ID: ${txn.transaction_id}`);
console.log(` Employee: ${txn.employee_name} (${txn.employee_id})`);
console.log(` Amount: ${txn.currency} ${txn.amount}`);
console.log(` Category: ${txn.category}`);
console.log(` Status: ${txn.approval_status}`);
console.log(` Merchant: ${txn.merchant_name}`);
});
```
### Step 4: Build Approval Workflow Logic
```typescript
// Route expenses based on amount thresholds and department policies
interface ApprovalRule {
maxAmount: number;
approverLevel: 'manager' | 'director' | 'vp' | 'cfo';
}
const approvalRules: ApprovalRule[] = [
{ maxAmount: 100, approverLevel: 'manager' },
{ maxAmount: 500, approverLevel: 'director' },
{ maxAmount: 5000, approverLevel: 'vp' },
{ maxAmount: Infinity, approverLevel: 'cfo' },
];
function getRequiredApprover(amount: number): string {
const rule = approvalRules.find(r => amount <= r.maxAmount);
return rule?.approverLevel ?? 'cfo';
}
// Process pending transactions
const pending = transactions.filter(
(t: any) => t.approval_status === 'pending'
);
for (const txn of pending) {
const approver = getRequiredApprover(txn.amount);
console.log(`${txn.transaction_id}: $${txn.amount} -> route to ${approver}`);
}
```
### Step 5: Map Expense Categories to GL Codes
```typescript
// Map Navan expense categories to your chart of accounts
const categoryToGL: Record<string, string> = {
'airfare': '6200-10',
'hotel': '6200-20',
'meals': '6200-30',
'ground_transport': '6200-40',
'car_rental': '6200-50',
'other_travel': '6200-90',
'office_supplies': '6300-10',
'software': '6400-10',
};
function mapToGLCode(category: string): string {
return categoryToGL[category] ?? '6900-00'; // default: miscellaneous
}
transactions.forEach((txn: any) => {
const gl = mapToGLCode(txn.category);
console.log(`${txn.transaction_id}: ${txn.category} -> GL ${gl}`);
});
```
### Step 6: ERP Sync Pattern (NetSuite Example)
```typescript
// Build journal entry payload for NetSuite sync
// Navan integrates natively with NetSuite, Sage Intacct, Xero, QuickBooks
const journalEntries = transactions.map((txn: any) => ({
tranDate: txn.transaction_date,
subsidiary: txn.cost_center,
lineItems: [
{
account: mapToGLCode(txn.category),
debit: txn.amount,
memo: `Navan: ${txn.merchant_name} - ${txn.employee_name}`,
department: txn.department,
class: txn.project_code,
},
{
account: '2000-00', // Accounts Payable
credit: txn.amount,
memo: `Navan expense reimbursement`,
},
],
}));
console.log(`Prepared ${journalEntries.length} journal entries for NetSuite sync`);
```
## Output
Successful execution produces:
- Expense transaction records with employee, amount, category, and approval status
- Approval routing decisions based on configurable threshold rules
- GL-coded transaction records ready for ERP import
- Journal entry payloads formatted for target accounting system
## Error Handling
| Error | HTTP Code | Cause | Solution |
|-------|-----------|-------|----------|
| Unauthorized | 401 | Expired or invalid bearer token | Re-authenticate via POST /ta-auth/oauth/token |
| Forbidden | 403 | Expense API not enabled | Contact Navan support to enable Expense Transaction API |
| Bad Request | 400 | Invalid date range or parameters | Verify date format is YYYY-MM-DD |
| Rate Limited | 429 | Too many requests | Implement exponential backoff (start at 1s) |
| Server Error | 500 | Navan platform issue | Retry with backoff; check Navan status page |
| No Data | 200 (empty) | No transactions in date range | Widen date range or verify expense API enablement |
## Examples
**Python — Expense retrieval with category breakdown:**
```python
import requests
import os
from collections import defaultdict
base_url = os.environ.get('NAVAN_BASE_URL', 'https://api.navan.com')
auth = requests.post(f'{base_url}/ta-auth/oauth/token', data={
'grant_type': 'client_credentials',
'client_id': os.environ['NAVAN_CLIENT_ID'],
'client_secret': os.environ['NAVAN_CLIENT_SECRET'],
})
headers = {'Authorization': f'Bearer {auth.json()["access_token"]}'}
resp = requests.get(
f'{base_url}/v1/bookings',
params={'createdFrom': '2026-03-01', 'createdTo': '2026-03-31', 'page': 0, 'size': 50},
headers=headers,
).json()
txns = resp['data']
# Category breakdown
by_category = defaultdict(float)
for t in txns:
by_category[t['category']] += t['amount']
for cat, total in sorted(by_category.items(), key=lambda x: -x[1]):
print(f' {cat}: ${total:,.2f}')
```
## Resources
- [Navan Help Center](https://app.navan.com/app/helpcenter) — Support and documentation
- [Navan Integrations](https://navan.com/integrations) — NetSuite, Sage Intacct, Xero, QuickBooks connectors
- [Booking Data Integration](https://app.navan.com/app/helpcenter/articles/travel/admin/other-integrations/booking-data-integration) — Data export configuration
## Next Steps
After setting up expense management, proceed to `navan-data-sync` for incremental sync strategies or `navan-entity-management` for user and department configuration.Related Skills
calendar-to-workflow
Converts calendar events and schedules into Claude Code workflows, meeting prep documents, and standup notes. Use when the user mentions calendar events, meeting prep, standup generation, or scheduling workflows. Trigger with phrases like "prep for my meetings", "generate standup notes", "create workflow from calendar", or "summarize today's schedule".
workhuman-core-workflow-b
Workhuman core workflow b for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman core workflow b".
workhuman-core-workflow-a
Workhuman core workflow a for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman core workflow a".
wispr-core-workflow-b
Wispr Flow core workflow b for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr core workflow b".
wispr-core-workflow-a
Wispr Flow core workflow a for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr core workflow a".
windsurf-core-workflow-b
Execute Windsurf's secondary workflow: Workflows, Memories, and reusable automation. Use when creating reusable Cascade workflows, managing persistent memories, or automating repetitive development tasks. Trigger with phrases like "windsurf workflow", "windsurf automation", "windsurf memories", "cascade workflow", "windsurf slash command".
windsurf-core-workflow-a
Execute Windsurf's primary workflow: Cascade Write mode for multi-file agentic coding. Use when building features, refactoring across files, or performing complex code tasks. Trigger with phrases like "windsurf cascade write", "windsurf agentic coding", "windsurf multi-file edit", "cascade write mode", "windsurf build feature".
webflow-core-workflow-b
Execute Webflow secondary workflows — Sites management, Pages API, Forms submissions, Ecommerce (products/orders/inventory), and Custom Code via the Data API v2. Use when managing sites, reading pages, handling form data, or working with Webflow Ecommerce products and orders. Trigger with phrases like "webflow sites", "webflow pages", "webflow forms", "webflow ecommerce", "webflow products", "webflow orders".
webflow-core-workflow-a
Execute the primary Webflow workflow — CMS content management: list collections, CRUD items, publish items, and manage content lifecycle via the Data API v2. Use when working with Webflow CMS collections and items, managing blog posts, team members, or any dynamic content. Trigger with phrases like "webflow CMS", "webflow collections", "webflow items", "create webflow content", "manage webflow CMS", "webflow content management".
veeva-core-workflow-b
Veeva Vault core workflow b for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva core workflow b".
veeva-core-workflow-a
Veeva Vault core workflow a for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva core workflow a".
vastai-core-workflow-b
Execute Vast.ai secondary workflow: multi-instance orchestration, spot recovery, and cost optimization. Use when running distributed training, handling spot preemption, or optimizing GPU spend across multiple instances. Trigger with phrases like "vastai distributed training", "vastai spot recovery", "vastai multi-gpu", "vastai cost optimization".