Conference meeting with attendees standing around the table, smiling whilst focusing on a single screen presented on the table

The Challenge

Premier UK Events Ltd, a Leicester-based event management company, faced operational inefficiencies in calculating travel distances for event delegates attending venues across the United Kingdom. The existing process relied on manual execution of Python scripts to determine distances and journey times between delegates' home addresses and event locations—a time-consuming approach that required technical intervention for each calculation request.

This manual methodology created bottlenecks in event planning workflows, as team members needed to prepare text files with postcode data, execute scripts independently, and manually distribute results to requesting colleagues. The lack of automation meant that simple distance calculations—critical for delegate communications, logistics planning, and venue selection decisions—consumed valuable staff time that could be redirected toward higher-value event coordination activities.

Premier UK Events recognised that their Google Workspace infrastructure and existing Google Maps API access provided the foundation for a more efficient solution. The challenge lay in transforming this manual, script-dependent process into a seamless, trigger-based automation that would enable non-technical team members to request distance calculations through familiar spreadsheet interfaces whilst receiving automated notifications upon completion.

Project Objectives

The primary objective was to replace the manual Python script execution process with a fully automated, trigger-based workflow that would enable Premier UK Events staff to obtain delegate distance calculations through simple Google Sheets data entry, eliminating technical barriers and reducing processing time.

Specific measurable goals included implementing automated Google Maps Distance Matrix API calculations triggered by new row additions to standardised Google Sheets templates, with validation of origin and destination postcodes to ensure data quality. The solution needed to automatically calculate both distance in miles and journey duration in minutes, updating spreadsheet fields with unique ID references for tracking purposes.

A critical success criterion was establishing an automated email notification system that would alert requesting team members immediately upon calculation completion, removing the need for manual result distribution. Additionally, the project required comprehensive error handling infrastructure with dedicated Slack or Microsoft Teams notifications for API failures, invalid postcodes, or authentication issues, ensuring system reliability and providing visibility into workflow performance for ongoing operational monitoring.

  1. Replace the manual Python script execution process with a fully automated, trigger-based workflow
  2. Implement automated Google Maps Distance Matrix API calculations triggered by new row additions to standardised Google Sheets templates with validation of origin and destination postcodes
  3. Automatically calculate both distance in miles and journey duration in minutes, updating spreadsheet fields with unique ID references for tracking purposes
  4. Establish an automated email notification system that alerts requesting team members immediately upon calculation completion
  5. Deploy comprehensive error handling infrastructure with dedicated Slack or Microsoft Teams notifications for API failures, invalid postcodes, or authentication issues
  6. Ensure system reliability and provide visibility into workflow performance for ongoing operational monitoring
  7. Enable non-technical team members to request distance calculations through familiar spreadsheet interfaces

Our Approach

Our implementation strategy centred on leveraging Premier UK Events' existing n8n automation platform at premier-ltd.com to build a robust, event-driven distance calculation system. We designed the Event_Delegate_Distance_Calculator_Template workflow with new row detection triggers in Google Sheets, enabling team members to initiate calculations simply by entering delegate postcodes into standardised template spreadsheets.

The workflow architecture incorporated conditional validation logic to verify the presence of required origin_postcode and destination_postcode fields before processing, preventing incomplete data from consuming API quota. We implemented HTTP request nodes to make direct calls to the Google Maps Distance Matrix API, processing location pairs in batches to respect rate limiting whilst maintaining processing efficiency. Distance values returned in kilometres were automatically converted to miles to align with UK business reporting preferences, and duration calculations were extracted in minutes for immediate usability.

To ensure operational resilience, we deployed a dedicated Error Handling workflow that captures failures from the primary distance calculation process and routes detailed error notifications to Slack channels, providing the Premier UK Events team with immediate visibility into issues such as invalid postcodes, API authentication failures, or quota limitations. We complemented this with the Retry Failed Executions workflow, which automatically attempts recovery from transient failures through n8n API integration.

For the email notification system, we configured Gmail API integration through Google Cloud Console, enabling automated completion alerts to be sent to requesting team members. We standardised the Google Sheets template structure with defined input fields including unique_id, origin_postcode, destination_postcode, and optional delegate_name fields, alongside output fields for distance_miles, duration_minutes, and calculation_timestamp to create comprehensive audit trails.

Technical Stack

The solution was built on n8n as the core automation platform, hosted on Premier UK Events' existing infrastructure at n8n.premier-ltd.com. Google Sheets served as both the trigger mechanism and data repository, providing familiar spreadsheet interfaces for non-technical team members whilst enabling programmatic access through Google Drive API integration.

Distance and duration calculations were performed through direct HTTP requests to the Google Maps Distance Matrix API, leveraging Premier UK Events' existing API credentials. This approach provided granular control over request formatting, response parsing, and error handling compared to pre-built integration nodes. The workflow implemented batch processing logic with rate limit handling to remain within Google Maps API standard limitations whilst processing multiple delegate calculations efficiently.

Email notifications were delivered through Gmail API services configured within Google Cloud Console, with authentication established through OAuth credentials. This integration enabled automated sending of completion confirmations to requesting team members without manual intervention. For monitoring and error management, we integrated Slack notifications through the dedicated Error Handling workflow, providing real-time alerts for API failures, invalid postcode entries, or authentication issues.

The technical architecture also incorporated the Email Templates workflow pattern for Gmail automation with document attachments from Google Drive, demonstrating extensibility for future enhancements such as attaching calculation summaries or venue information documents. All workflows shared common authentication credentials and logging standards, creating a cohesive automation ecosystem within Premier UK Events' Google Workspace environment.

Technologies Used:

  • n8n
  • Google Sheets
  • Google Drive API
  • Google Maps Distance Matrix API
  • Gmail API
  • Google Cloud Console
  • OAuth
  • Slack
  • Google Workspace
  • HTTP Request Nodes
  • n8n API

Final Output & Results

The completed solution transformed Premier UK Events' distance calculation process from a manual, script-dependent operation into a seamless, self-service automation system. The Event_Delegate_Distance_Calculator_Template workflow now automatically detects new entries in standardised Google Sheets templates, validates postcode data, queries the Google Maps Distance Matrix API, and populates calculated distance and duration fields—all without human intervention.

Team members can now simply enter delegate postcodes into the designated Google Sheets template and receive automated email notifications when calculations complete, typically within seconds of submission. The workflow processes origin-destination pairs in batches with intelligent rate limiting, converting kilometre distances to miles and extracting journey durations in minutes for immediate business use. Each calculation includes unique ID references and timestamps, creating comprehensive audit trails for event planning documentation.

The supporting Error Handling infrastructure provides operational resilience through dedicated Slack notifications for workflow failures, whilst the Retry Failed Executions system automatically recovers from transient issues. This monitoring framework gives Premier UK Events visibility into system performance and immediate awareness of data quality issues such as invalid postcodes or API authentication problems.

By eliminating manual Python script execution and automating result distribution, the solution has freed Premier UK Events staff from technical dependencies, enabling them to focus on core event coordination activities. The standardised Google Sheets template approach ensures consistency across all distance calculation requests, whilst the trigger-based architecture scales effortlessly with increasing calculation volumes during peak event planning periods. The automation has transformed a time-consuming manual task into a streamlined, reliable process that enhances operational efficiency across the event management workflow.

Key Metrics:

  • Time Saved: Calculations now complete within seconds compared to manual script execution and distribution
  • Efficiency Gain: Eliminated technical dependencies and manual intervention, freeing staff to focus on core event coordination activities