Hi guys
I am fairly new to n8n - because i wanted to host my integromat flow on my own server.
However, i am struggling to find out how to iterate properly.
This is how the flow looks in integromat, as you can see i use the Iterator a lot
This is the HTTP GET output, that i Iterate over:
{
"recordLocator": "AE7KCV",
"groupBooking": false,
"pointOfSale": {
"userId": "93742",
"umUserId": 6392,
"userName": "Web Sales",
"userLogin": "Ecommerce",
"userEmail": "[email protected]",
"travelAgentName": "Ecommerce",
"location": "CPH"
},
"createdDateTime": "2020-12-07T08:26:35Z",
"modifiedDateTime": "2020-12-07T08:29:31",
"modifiedAt": "2020-12-07T08:29:31Z",
"comments": "",
"reservationControls": [
{
"reservationNumber": "XXXXX1",
"airline": "XX",
"cityCode": "CPH"
}
],
"segments": [
{
"rph": 1,
"statusCode": "HK",
"count": 2,
"departureAirportCode": "CPH",
"arrivalAirportCode": "AAL",
"departureDate": "2021-07-15",
"departureTime": "09:30:00",
"arrivalDate": "2021-07-15",
"arrivalTime": "10:30:00",
"rbd": "T",
"marketingRbd": "T",
"flightDesignator": "6I0XXX",
"marketingFlightDesignator": "6I0XXX",
"waitlistRank": 0,
"fareBasisCode": "TPLURT",
"ticketing": [
{
"passengerRph": 1,
"ticketNumber": "2482100356814",
"coupon": 1
},
{
"passengerRph": 2,
"ticketNumber": "2482100356815",
"coupon": 1
}
],
"tenant": "airalsie",
"links": []
},
{
"rph": 2,
"statusCode": "HK",
"count": 2,
"departureAirportCode": "CPH",
"arrivalAirportCode": "AAL",
"departureDate": "2021-07-22",
"departureTime": "11:00:00",
"arrivalDate": "2021-07-22",
"arrivalTime": "12:00:00",
"rbd": "T",
"marketingRbd": "T",
"flightDesignator": "6I0XXX",
"marketingFlightDesignator": "6I0XXX",
"waitlistRank": 0,
"fareBasisCode": "TPLURT",
"ticketing": [
{
"passengerRph": 1,
"ticketNumber": "2482100356814",
"coupon": 2
},
{
"passengerRph": 2,
"ticketNumber": "2482100356815",
"coupon": 2
}
],
"tenant": "airalsie",
"links": []
}
],
"passengers": [
{
"rph": 1,
"title": "Mr.",
"firstName": "Morten",
"lastName": "Test",
"sex": "M",
"passengerTypeGroup": "ADT",
"passengerTypeCode": "1",
"mobile": {
"number": "29904567",
"country": "45"
},
"phone": {},
"address": {},
"documents": [
{
"birthday": "1966-08-26"
}
],
"links": []
},
{
"rph": 2,
"title": "Mrs.",
"firstName": "Mortine",
"lastName": "Test",
"sex": "F",
"passengerTypeGroup": "ADT",
"passengerTypeCode": "1",
"mobile": {
"number": "12345678",
"country": "45"
},
"phone": {},
"address": {},
"documents": [
{
"birthday": "1990-10-13"
}
],
"links": []
}
],
"infants": [],
"ssrs": [],
"remarks": [
{
"segmentRph": 1,
"passengerRph": 1,
"code": "BAGS",
"additionalInfo": "HK1 BAG PC ALLOW 1",
"status": "CONFIRMED"
},
{
"segmentRph": 1,
"passengerRph": 2,
"code": "BAGS",
"additionalInfo": "HK1 BAG PC ALLOW 1",
"status": "CONFIRMED"
},
{
"segmentRph": 2,
"passengerRph": 1,
"code": "BAGS",
"additionalInfo": "HK1 BAG PC ALLOW 1",
"status": "CONFIRMED"
},
{
"segmentRph": 2,
"passengerRph": 2,
"code": "BAGS",
"additionalInfo": "HK1 BAG PC ALLOW 1",
"status": "CONFIRMED"
}
],
"osi": [],
"seats": [],
"contacts": [
{
"person": {
"lastName": "Test",
"firstName": "Morten",
"title": "Mr."
},
"addressContact": {
"address": "Street 123",
"postalCode": "6200",
"city": "City",
"countryCode": "DK"
},
"billingAddressContact": {},
"email": "[email protected]",
"phoneContact": {},
"mobileContact": {
"number": "12345678",
"country": "45"
},
"preferredLanguage": "da"
}
],
"delegates": [],
"currencyCode": "DKK",
"childBookings": [],
"links": []
}
Goal is to get all the data[], then the data in the segments[], and then the data in the ticketing[].
As i need: ticketNumber, departureDate, flightDesignator and recordLocator to be put into Google Sheets.
I sincerely hope, that someone can help me get started here
Best regards
Bill