Add travel plans to TripIt by sending structured confirmation emails to plans@tripit.com. No API keys required — just email sending capability.
TripIt parses specially formatted emails ("TripIt Approved" format) into travel objects. This skill generates those emails; you send them with whatever email tool you have (MS Graph, Himalaya, gog, etc.).
Flow:
tripit-email.py generates the formatted email bodyplans@tripit.comThe sender email must be associated with the user's TripIt account. Either:
No other configuration needed.
echo '{"airline":"United Airlines","flight_number":"1234","class":"Economy",
"departure_city":"San Francisco","departure_airport":"SFO",
"departure_date":"2025-06-15","departure_time":"08:30",
"arrival_city":"New York","arrival_airport":"JFK",
"arrival_date":"2025-06-15","arrival_time":"17:05",
"passenger":"Jane Smith","confirmation":"UA1234X",
"booking_site_url":"https://www.united.com"}' \
| python3 scripts/tripit-email.py flight
echo '{"hotel_name":"Hotel & Spa Napa Valley","checkin_date":"2025-06-15",
"checkout_date":"2025-06-18","city":"Napa","state":"CA","country":"US",
"street_address":"123 Vineyard Lane","confirmation":"NV8842",
"number_of_guests":"2","rate":"189.00","currency":"USD"}' \
| python3 scripts/tripit-email.py hotel
echo '{"activity_name":"Wine Tasting Tour","location":"Sonoma Valley Vineyards",
"start_date":"2025-06-16","start_time":"10:00",
"end_date":"2025-06-16","end_time":"14:00",
"city":"Sonoma","state":"CA","country":"US"}' \
| python3 scripts/tripit-email.py activity
echo '{"items":[
{"type":"flight","airline":"United Airlines","flight_number":"1234",
"departure_city":"San Francisco","departure_airport":"SFO",
"departure_date":"2025-06-15","departure_time":"08:30",
"arrival_city":"New York","arrival_airport":"JFK",
"arrival_date":"2025-06-15","arrival_time":"17:05",
"passenger":"Jane Smith","confirmation":"UA1234X"},
{"type":"hotel","hotel_name":"The Manhattan Grand","checkin_date":"2025-06-15",
"checkout_date":"2025-06-18","city":"New York","state":"NY","country":"US",
"confirmation":"MG7890"}
]}' \
| python3 scripts/tripit-email.py multi
Add --subject to any command to get a suggested email subject:
echo '...' | python3 scripts/tripit-email.py --subject flight
The script outputs the email body. You send it using whatever email tool is available.
BODY=$(echo '...' | python3 scripts/tripit-email.py flight)
# Use your MS Graph email sending tool to send:
# To: plans@tripit.com
# Subject: United Airlines SFO-JFK 2025-06-15
# Body: $BODY (plain text)
echo '...' | python3 scripts/tripit-email.py --subject flight > /tmp/tripit-email.txt
himalaya send --to plans@tripit.com \
--subject "$(head -1 /tmp/tripit-email.txt | sed 's/Subject: //')" \
--body "$(tail -n +3 /tmp/tripit-email.txt)"
BODY=$(echo '...' | python3 scripts/tripit-email.py flight)
gog send --to plans@tripit.com --subject "Flight confirmation" --body "$BODY"
See references/template-format.md for the complete field list for each object type, including required vs optional fields and formatting rules.
| Type | Command | Key Required Fields |
|---|---|---|
| ------ | --------- | ------------------- |
| Flight | flight | airline, flight_number, departure/arrival airport+date+time |
| Hotel | hotel | hotel_name, checkin_date, checkout_date |
| Activity | activity | activity_name, start_date |
| Car Rental | car | rental_company, pickup_date, dropoff_date |
| Rail | rail | carrier, departure/arrival date+time |
| Multiple | multi | Each item needs type + that type's required fields |
After sending an email, confirm TripIt processed it by fetching the user's iCal feed:
https://www.tripit.com/feed/ical/private/
# Fetch and search the feed for a confirmation number
curl -s "https://www.tripit.com/feed/ical/private/<hash>/tripit.ics" \
| grep -A5 "UA1234X"
Tip: Store the user's iCal feed URL so you can verify future sends without asking again. The URL is stable — it doesn't change unless the user regenerates it.
2026-03-15)* on its own line (e.g., long notes or cancellation policies)共 1 个版本