Route Planner From Address Photos

Saves ~30 min65 credits

Automates multi-stop route planning from photos of addresses. Collects the user's starting address, time needed at each stop, and departure time. Processes uploaded images through OCR to extract addresses, compiles them into a CSV, optimizes the route order, calculates arrival and departure times for each location, and delivers the final plan with a map image, detailed schedule, and Google Maps link.

firef1ie
by firef1ie
1 use
Step 1 of 13
Prompt1

Prompt

Make sure the user has entered the following information: 1. Your starting address 2. How long you need at each stop (in minutes) 3. What time you are leaving 4. Upload images containing the addresses you need to visit.

For Each2

Upload Each Image

For each image, For each image the user provided, upload it to cloud storage. Collect the returned file storage IDs for use in the OCR step.

Tool3

Upload Image to Storage

Upload the current image to cloud storage. Set expiration to 7 days. Save the returned file storage ID for the OCR batching step.

Upload Image to Storage

Workflow preview

What the agent will follow (tools, prompts, and workflow steps).

1. Apply the following prompt: Make sure the user has entered the following information:
1. Your starting address
2. How long you need at each stop (in minutes)
3. What time you are leaving
4. Upload images containing the addresses you need to visit.

2. For each image, complete the steps in this section once. For each image the user provided, upload it to cloud storage. Collect the returned file storage IDs for use in the OCR step.

3. Call tool: File Storage - 10MB or less (Upload Image to Storage).

Instructions:
Upload the current image to cloud storage. Set expiration to 7 days. Save the returned file storage ID for the OCR batching step.

Parameters:
{}

4. Apply the following prompt: Goal:
Group all uploaded file storage IDs into batches of up to 10 for OCR processing

Inputs:
List of file storage IDs returned from the upload step for all images

Outputs:
An array of batches, where each batch is an array of up to 10 file storage IDs. Example: [[id1, id2, ..., id10], [id11, id12, ...]]

Constraints:
Each batch must contain no more than 10 file storage IDs. The last batch may have fewer than 10. Preserve the original order of the files.

Success criteria:
All uploaded file IDs are included in exactly one batch, with no batch exceeding 10 items

5. For each batch, complete the steps in this section once. For each batch of up to 10 file storage IDs, send them all to the Document OCR Agent in a single call to extract addresses from all images in the batch at once.

6. Call tool: Document OCR Agent (OCR Batch of Images).

Instructions:
Send all file storage IDs in this batch (up to 10) to the OCR tool in a single call. The tool supports up to 10 pages per request. Extract all addresses found across all images in the batch. Focus on structured entities: addresses, street names, city, state, and zip codes.

Parameters:
{}

7. Apply the following prompt: Goal:
Parse all OCR results from every batch and compile a clean, structured list of addresses

Inputs:
Raw OCR output from each batch containing extracted addresses and entities

Outputs:
A JSON array of objects, each with fields: address (full street address), city, state, zip, stop_duration_minutes (from the user's specified time at each location). Include the starting address as the first entry with stop_duration_minutes set to 0.

Constraints:
Deduplicate any addresses that appear more than once. Normalize address formatting (proper capitalization, standard abbreviations). If the user specified a single duration for all stops, apply it uniformly. If different durations were specified, match them to the correct addresses.

Success criteria:
All addresses from all OCR batches are captured in a clean, structured format ready for CSV conversion

8. Call tool: Web Data Convertor (Create Address CSV).

Instructions:
Convert the structured address JSON array into CSV format. The CSV should have columns: address, city, state, zip, stop_duration_minutes. This CSV serves as the organized record of all stops.

Parameters:
{}

9. Call tool: Multi-Location Route Optimizer W Map (Optimize Route Order).

Instructions:
Use the starting address as the origin and all other addresses as waypoints. Optimize the route to minimize total travel time. Request a map image to be generated and a Google Maps URL for the route. Use driving mode. Do not include a return to origin unless the user requested a round trip.

Parameters:
{}

10. Apply the following prompt: Goal:
Calculate the complete schedule of arrival and departure times for each stop using the optimized route order

Inputs:
Optimized route with travel durations between each stop, user's departure time, and stop duration at each location

Outputs:
For each stop in route order: stop number, address, travel time from previous stop, arrival time, stop duration, departure time. Format times clearly (e.g., 10:30 AM).

Constraints:
Start with the user's stated departure time from the starting address. For each subsequent stop: arrival time = previous departure time + travel time. Departure time = arrival time + stop duration. Use the travel durations from the route optimizer results.

Success criteria:
A complete, accurate timeline showing when the user arrives at and leaves each stop, with no gaps or overlaps in the schedule

11. Call tool: Date and Time Calculator (Calculate Arrival and Leave Times).

Instructions:
Use date/time addition to calculate precise arrival and departure times for each stop. Start from the user's departure time and add travel durations and stop durations sequentially through the optimized route. Return times in a clear, readable format.

Parameters:
{}

12. Apply the following prompt: Goal:
Compile the final route plan into a clear, actionable summary for the user

Inputs:
Optimized route order, arrival/departure times for each stop, signed URL of the route map image, Google Maps route link

Outputs:
A formatted route plan containing: 1) The optimized stop order with full addresses, 2) A schedule table showing arrival time, stop duration, and departure time for each location, 3) A signed URL link to the route map image, 4) A Google Maps link for turn-by-turn navigation

Constraints:
Do not include any information about gas stations, fuel stops, or fuel costs. Keep the format clean and easy to read. Present times in 12-hour format with AM/PM.

Success criteria:
The user receives a complete, actionable route plan they can follow immediately, with direct links to the map and navigation

13. Notify my human (other) (Send Route Plan to User).

Your optimized route plan is ready. The notification includes your complete route with stop order, arrival and departure times for each location, a link to the route map image, and a Google Maps link for navigation. Include the signed map URL.

Agent Reviews