2024 · Alizés Locations

Automated Bidirectional Synchronization Connector Between Two Booking Platforms

N8NNode.jsJavaScriptFTPSFTPIMAPREST APICronJSON

Key Results

100%
Automation
Fully automated synchronization
99.9%
Reliability
Synchronization success rate
<5min
Processing time
Delay between reception and integration

Challenges

  • Complex bidirectional synchronization between two systems
  • Managing different data formats
  • System reliability and resilience
  • Complete traceability of exchanges
  • Error and inconsistency management

Solutions

  • N8N architecture with automated workflows
  • Unified JSON standard for compatibility
  • Data mapping and normalization system
  • Complete archiving and historization
  • Real-time alerts and notifications

Automated Bidirectional Synchronization Connector Between Two Booking Platforms

Project Context

Alizés Locations is a car rental specialist that needed a complete integration solution to automatically synchronize its bookings with a third-party external platform. The challenge was to guarantee perfect consistency between the two systems without human intervention, while ensuring complete tracking and total traceability.

The Main Challenge

The project covered the entire booking processing cycle:

  • Extraction: Data retrieval from different sources (FTP, emails)
  • Parsing: Analysis and structuring of raw data
  • Transformation: Normalization and format mapping
  • Quality control: Validation and inconsistency detection
  • Archiving: Data retention for traceability
  • Automated integration: Real-time bidirectional synchronization

Solution Architecture

Overview

The solution is based on a complete automation architecture using N8N as the central orchestrator, enabling two distinct synchronization flows:

  1. External Platform → Alizés Locations Flow: Automatic import of bookings
  2. Alizés Locations → External Platform Flow: Export of bookings received by email

Technologies Used

  • N8N: Workflow automation platform
  • Node.js / JavaScript: Processing and transformation scripts
  • Cron: Automated task scheduling
  • FTP / SFTP: Secure file transfer
  • IMAP: Automated email retrieval
  • REST API: Inter-system communication
  • Telegram: Real-time notifications

Flow 1: Automatic Booking Import

Objective

Import into Alizés Locations' back-office all new bookings from the partner platform, with complete and automated processing.

Complete Process

1. JSON Export from External Platform

The external platform automatically generates a JSON file containing all new orders:

  • Standardized and structured format
  • Contains all essential data: dates, times, vehicle, client, locations
  • Generation triggered by cron every 5-10 minutes
  • Automatic deposit on a dedicated FTP server

2. Retrieval and Processing via N8N

The N8N workflow is triggered regularly via cron and performs:

Download and Extraction

  • Secure connection to FTP server
  • Download of the most recent JSON file
  • Extraction of key data (dates, times, vehicle, client, locations)

Format Normalization

  • Conversion of dates and times to internal format
  • Data format standardization
  • JSON structure validation

Internal Mapping

  • Application of a correspondence table for vehicles
  • Mapping of locations to Alizés Locations internal identifiers
  • Management of missing correspondences with alerts

Intelligent Archiving

  • Backup of raw files with configurable retention (10-15 days)
  • Retention of normalized versions
  • Indexing for fast search

3. API Call to Remote Script

The processed JSON is sent to a centralized script that manages:

Automatic Blocking Creation

  • Automatic generation of vehicle blocks in the system
  • Availability conflict management
  • Real-time calendar update

Integrity Checks

  • Data consistency verification
  • Reference validation (vehicles, clients, locations)
  • Duplicate detection

Alert Generation

  • Automatic notifications in case of inconsistencies
  • Telegram alerts for critical errors
  • Detailed logs for debugging

4. Digital Historization

All data is retained for complete traceability:

  • Raw data: Original JSON files
  • Normalized data: Processed versions
  • Integration statuses: Complete state tracking
  • Operation logs: Detailed processing history

Flow 2: Export of Bookings Received by Email

Objective

Automatically transfer to the external platform confirmed bookings received by email in Alizés Locations' dedicated mailbox.

Complete Process

1. Automated Email Retrieval

IMAP Connection

  • Secure connection to dedicated email box
  • Automatic retrieval of new messages
  • Filtering to keep only relevant notifications

Content Extraction

  • Retrieval of raw content (HTML and text)
  • Automatic format detection
  • Preliminary content cleaning

2. Advanced Parsing with N8N

Cleaning and Structuring

  • Removal of unnecessary HTML tags
  • Extraction of structured text
  • Space and format normalization

Useful Field Extraction

  • Client: Name, first name, email, phone
  • Vehicle: Model, category, registration
  • Dates and times: Start date, end date, pickup/return times
  • Locations: Pickup location, return location
  • Internal references: Booking number, client reference

Conversion to Structured JSON

  • Creation of a normalized JSON object
  • Structure validation
  • Optional field management

Date/Time Normalization

  • Conversion to standard format
  • Timezone management
  • Temporal consistency validation

3. Internal Mapping

Location Correspondence Table

  • Mapping of Alizés Locations locations to platform identifiers
  • Management of unreferenced locations
  • Automatic creation if necessary

Vehicle Mapping

  • Correspondence to platform internal identifier
  • Vehicle category management
  • Availability validation

Exception Management

  • Inconsistency detection
  • Alert generation for unhandled cases
  • Detailed logs for analysis

4. Final JSON Generation and Export

JSON File Creation

  • Format compatible with external platform
  • Strict schema validation
  • Format version management

Deposit via FTP or API

  • Secure transfer to partner server
  • Reception verification
  • Automatic retry in case of failure

Systematic Archiving

  • Local backup of all exports
  • Retention of source emails
  • Complete traceability

5. Historization

Complete Backup

  • Raw email: Retention of original emails
  • Provided JSON: Exported files
  • Operation logs: Detailed history

Tracking and Monitoring

  • Synchronization tracking dashboard
  • Performance metrics
  • Real-time alerts

Project JSON Standard

Format Architecture

I implemented a unified JSON format that guarantees:

Stable Compatibility

  • Versioned schema to manage evolutions
  • Strict validation before integration
  • Managed backward compatibility

Clear Mapping

  • Vehicles: Bidirectional identifier correspondence
  • Categories: Vehicle type normalization
  • Locations: Complete correspondence table

Evolution Management

  • JSON schema versioning
  • Automatic migration of old formats
  • Complete documentation of changes

Strict Validation

  • Control of all mandatory fields
  • Format validation (dates, emails, phones)
  • Inconsistency detection

Example Structure

{
  "version": "1.0",
  "reservation": {
    "id": "ALZ-2024-001234",
    "client": {
      "nom": "Dupont",
      "prenom": "Jean",
      "email": "[email protected]",
      "telephone": "+33612345678"
    },
    "vehicule": {
      "id": "VH-12345",
      "modele": "Peugeot 208",
      "categorie": "B"
    },
    "dates": {
      "debut": "2024-03-15T10:00:00+01:00",
      "fin": "2024-03-20T17:00:00+01:00"
    },
    "lieux": {
      "prise": "AEROPORT-NICE",
      "retour": "AEROPORT-NICE"
    },
    "statut": "confirme"
  }
}

Automation Architecture

Platform → Alizés Locations Flow

External Platform Side

  • JSON export via cron (every 5-10 minutes)
  • Automatic deposit on secure FTP
  • Error management and retry

N8N Side

  • Mirror cron for synchronization
  • Download, parsing, validation
  • Mapping and transformation
  • API transfer to centralized script
  • Automatic archiving

Alizés Locations → Platform Flow

N8N Side

  • Regular cron (5-10 minutes)
  • Analysis of incoming emails
  • Parsing and extraction
  • JSON generation
  • Secure FTP deposit

External Platform Side

  • Automatic import cron
  • Processing of received files
  • System integration
  • Archiving and confirmation

Security and Reliability

Security Measures

Authentication

  • Secure FTP connections (SFTP)
  • API tokens with rotation
  • Securely stored credentials

Data Validation

  • Strict input control
  • Data sanitization
  • Injection protection

Traceability

  • Complete logs of all operations
  • Audit trail for each booking
  • Data retention for compliance

System Resilience

Error Management

  • Automatic retry with exponential backoff
  • Immediate alerts in case of failure
  • Fallback to manual process if necessary

Monitoring

  • Real-time tracking dashboard
  • Performance metrics
  • Telegram alerts for incidents

Archiving

  • Automatic backup of all files
  • Configurable retention (10-15 days)
  • Possible recovery in case of problem

Results and Impact

Performance

  • Automation: 100% of synchronizations automated
  • Reliability: 99.9% success rate
  • Processing time: Less than 5 minutes between reception and integration
  • Error reduction: 95% reduction in manual errors

Business Impact

For Alizés Locations

  • Time savings: Several hours saved per day
  • Error reduction: Near elimination of data entry errors
  • Data consistency: Perfect synchronization between systems
  • Scalability: Ability to handle growing booking volume

For Clients

  • Reactivity: Immediate booking processing
  • Reliability: Always up-to-date data
  • Transparency: Complete traceability

Traceability

  • Complete history: All operations are recorded
  • Audit trail: Detailed tracking of each booking
  • Compliance: Respect of traceability requirements

Technologies and Best Practices

Development

N8N Workflows

  • Modular and reusable workflows
  • Robust error handling
  • Complete documentation

Code Quality

  • Well-structured Node.js scripts
  • Complete error handling
  • Validation tests

Monitoring

  • Structured and exploitable logs
  • Performance metrics
  • Proactive alerts

Maintenance

Scalability

  • Modular architecture
  • Easy to extend
  • Up-to-date documentation

Support

  • Troubleshooting procedures
  • Maintenance guide
  • Reactive support

Conclusion

The automated bidirectional synchronization project for Alizés Locations demonstrates how a well-designed automation architecture can transform a complex manual process into a reliable and efficient system. Using N8N as the central orchestrator, combined with a unified JSON standard and a resilient architecture, enabled achieving complete automation with an exceptional reliability rate.

This case study illustrates the importance of:

  • Thinking automation end-to-end: From retrieval to integration
  • Standardizing exchanges: Unified JSON format for compatibility
  • Guaranteeing traceability: Complete archiving for audit and compliance
  • Ensuring resilience: Error management and proactive monitoring

For Alizés Locations, this solution represents a significant productivity gain and guarantees perfect consistency of bookings between the two systems, whether they come from the website or are received by email.