Appointment Scheduling and Route Planner
Takes a CSV or spreadsheet file with addresses, asks for a starting drive time, time per stop, and starting address, then parses the addresses, optimizes the driving route, calculates estimated arrival and departure times for each location, and generates a CSV with the full schedule. Returns the optimized route map, Google Maps directions link, and the schedule CSV both locally and via notification. Ideal for field sales, service technicians, delivery planning, or any multi-stop appointment scheduling.
Parse Uploaded Spreadsheet
Parse the user's uploaded CSV or spreadsheet file containing addresses. Convert the file contents to JSON format so that all rows and columns are accessible as structured data. Accept CSV, XLSX, or ODS formats.

Extract Addresses and Parameters
Goal: Extract all addresses from the parsed spreadsheet data and collect the user's scheduling parameters | Inputs: Parsed JSON data from the spreadsheet. The user should also provide: starting address, starting drive time (when they plan to leave), and time per stop (how long they will spend at each location). | Outputs: A structured list of destination addresses extracted from the spreadsheet, the starting address, the starting drive time, the time per stop in minutes, and all original row data preserved for later CSV generation. Format as JSON with fields: starting_address, start_time, time_per_stop_minutes, destinations (array of objects with address and all original fields from the spreadsheet). | Constraints: Preserve all original columns/fields from the spreadsheet for each row. If the address is split across multiple columns (street, city, state, zip), combine them into a single full address string. Ask the user to clarify which column contains addresses if it is ambiguous. | Success criteria: All addresses from the spreadsheet are extracted, the starting address and scheduling parameters are captured, and all original data is preserved.
Optimize Route With Map
Use the multi-location route optimizer to find the optimal driving route through all destination addresses, starting from the user's specified starting address. Enable round trip mode so the route returns back to the starting address at the end. Request the optimized route order with travel times between each consecutive stop (including the final leg back to the starting address), a map image of the full round-trip route (returned as a signed URL), and a Google Maps directions URL. Ensure the map image is returned as a signed URL that can be directly viewed in a browser or embedded. Ensure the Google Maps directions link is a full clickable URL.

Workflow preview
What the agent will follow (tools, prompts, and workflow steps).
1. Call tool: File To JSON Parsing (Parse Uploaded Spreadsheet).
Instructions:
Parse the user's uploaded CSV or spreadsheet file containing addresses. Convert the file contents to JSON format so that all rows and columns are accessible as structured data. Accept CSV, XLSX, or ODS formats.
Parameters:
{}
2. Apply the following prompt: Goal:
Extract all addresses from the parsed spreadsheet data and collect the user's scheduling parameters
Inputs:
Parsed JSON data from the spreadsheet. The user should also provide: starting address, starting drive time (when they plan to leave), and time per stop (how long they will spend at each location).
Outputs:
A structured list of destination addresses extracted from the spreadsheet, the starting address, the starting drive time, the time per stop in minutes, and all original row data preserved for later CSV generation. Format as JSON with fields: starting_address, start_time, time_per_stop_minutes, destinations (array of objects with address and all original fields from the spreadsheet).
Constraints:
Preserve all original columns/fields from the spreadsheet for each row. If the address is split across multiple columns (street, city, state, zip), combine them into a single full address string. Ask the user to clarify which column contains addresses if it is ambiguous.
Success criteria:
All addresses from the spreadsheet are extracted, the starting address and scheduling parameters are captured, and all original data is preserved.
3. Call tool: Multi-Location Route Optimizer W Map (Optimize Route With Map).
Instructions:
Use the multi-location route optimizer to find the optimal driving route through all destination addresses, starting from the user's specified starting address. Enable round trip mode so the route returns back to the starting address at the end. Request the optimized route order with travel times between each consecutive stop (including the final leg back to the starting address), a map image of the full round-trip route (returned as a signed URL), and a Google Maps directions URL. Ensure the map image is returned as a signed URL that can be directly viewed in a browser or embedded. Ensure the Google Maps directions link is a full clickable URL.
Parameters:
{}
4. Call tool: Get Users Current Time / Date (Get User Timezone).
Instructions:
Get the user's current date, time, and timezone. This will be used to ensure all calculated arrival and departure times are displayed in the user's local timezone.
Parameters:
{}
5. Apply the following prompt: Goal:
Using the optimized route order and travel times, prepare a sequential list of stops with the time calculation data needed for each one, including the return trip to the starting address
Inputs:
Optimized round-trip route from the route optimizer (ordered stops with travel times between them, including the final leg back to the starting address), user's starting drive time, time per stop in minutes, and the user's timezone.
Outputs:
A JSON array of stop objects in route order. Each object should contain: stop_number, address, all original spreadsheet fields for that address (empty for the return-home entry), drive_time_from_previous_minutes, the reference departure time from the previous stop (or the starting drive time for the first stop), and the time_per_stop_minutes. Include the return to the starting address as the final entry in the array with time_per_stop_minutes of 0. This prepares the data for the Date and Time Calculator to compute exact arrival and departure times for each stop.
Constraints:
Maintain the optimized route order from the route optimizer. The first stop's drive time is from the starting address. Each subsequent stop's drive time is from the previous stop. The final entry must be the return trip back to the starting address with the drive time from the last stop. Include the user's timezone identifier for all time calculations.
Success criteria:
Every stop has its sequential drive time identified, the return-home leg is included as the final entry, and the calculation chain is clearly defined so each stop's arrival and departure time can be computed.
6. For each stop, complete the steps in this section once. Iterate over each stop in the planned schedule in route order, including the final return-home entry. For each stop, use the Date and Time Calculator to compute the exact arrival time (previous departure time plus drive time to this stop) and departure time (arrival time plus time per stop). The first stop's arrival is the user's starting drive time plus drive time to the first stop. The final return-home entry has 0 time per stop so arrival and departure are the same. Pass forward all accumulated times so each subsequent stop can reference the previous stop's departure time.
7. Call tool: Date and Time Calculator (Calculate Arrival and Departure Time).
Instructions:
For the current stop, calculate two times: 1) ARRIVAL TIME - Take the previous stop's departure time (or the user's starting drive time if this is the first stop) and add the drive time in minutes to reach this stop. 2) DEPARTURE TIME - Take the calculated arrival time and add the time per stop in minutes. For the final return-home stop, time per stop is 0 so arrival equals departure. Return both times formatted in the user's timezone. Store these results so the next iteration can use this stop's departure time as its starting reference.
Parameters:
{}
8. Apply the following prompt: Goal:
Compile all calculated arrival and departure times with the original spreadsheet data into a structured JSON array ready for CSV conversion, including the return-home leg
Inputs:
All stop data with calculated arrival and departure times from the loop (including return to starting address), original spreadsheet fields for each address, Google Maps directions URL and map image signed URL from the route optimizer.
Outputs:
A JSON array of flat objects in route order where each object contains: stop_number, all original spreadsheet fields for that row, arrival_time, departure_time, and drive_time_from_previous. The final row should be the return to the starting address with the arrival time back home. Also output separately: the Google Maps directions URL as a full hyperlink and the map image as a signed URL.
Constraints:
The JSON array must be flat with no nested objects so it converts cleanly to CSV. Times should be formatted in a human-readable format including the user's timezone (e.g. '9:30 AM EST'). Column order: stop_number, original fields, arrival_time, departure_time, drive_time_from_previous. The last row should clearly indicate it is the return to the starting address. Preserve the Google Maps directions URL as a clickable hyperlink and the map image as a signed URL for direct viewing.
Success criteria:
A clean JSON array ready for direct CSV conversion that includes all stops plus the return home, plus the Google Maps directions hyperlink and map image signed URL preserved for the final notification.
9. Call tool: Web Data Convertor (Convert Schedule to CSV).
Instructions:
Convert the JSON array of route schedule data to CSV format. The JSON contains stop numbers, original spreadsheet fields, arrival times, departure times, and drive times for each location in optimized route order, including the final return to the starting address.
Parameters:
{}
10. Call tool: File Storage - 10MB or less (Store CSV File).
Instructions:
Upload the generated CSV file to file storage with a descriptive filename like 'optimized_route_schedule.csv'. Set expiration to 7 days. Return the signed download URL for sharing with the user.
Parameters:
{}
11. Call tool: AgentPMT Send Human Request (Send Results to User).
Instructions:
Send the complete route planning results to the user as a notification (request_type: notification_only). Include: 1) A summary of the optimized round-trip route with the number of stops, estimated total time from departure to return home, and estimated return time, 2) The Google Maps directions URL as a clickable hyperlink so the user can open turn-by-turn navigation directly, 3) The route map image as a signed URL so it can be viewed directly in the browser or embedded inline, 4) The download link for the CSV file containing the full schedule with arrival and departure times for every location including the return home. Present the information clearly and organized. The directions link MUST be a hyperlink and the map image MUST be a signed URL.
Parameters:
{"request_type": "notification_only"}