This workflow follows the Gmail → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "u\u00e7ak bileti",
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://test.api.amadeus.com/v1/security/oauth2/token",
"sendBody": true,
"contentType": "form-urlencoded",
"bodyParameters": {
"parameters": [
{
"name": "grant_type",
"value": "client_credentials"
},
{
"name": "client_id",
"value": "OehBooNfwKFDmKmtcv75iTG6SNVioUDV"
},
{
"name": "client_secret",
"value": "ycIFRvkYp62xklmt"
}
]
},
"options": {}
},
"id": "59776f8b-e94b-41a4-be57-ca23ef0e3ab5",
"name": "Access Token Al",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
-840,
100
]
},
{
"parameters": {
"jsCode": "// 1. Giri\u015f item'lar\u0131n\u0131 al\nconst items = $input.all();\nconst processedFlights = [];\nlet enUcuzUcus = null;\n\nconsole.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Ba\u015flang\u0131\u00e7: Gelen toplam item say\u0131s\u0131:\", items.length);\n\n// 2. Her bir item \u00fczerinde d\u00f6n\nfor (const item of items) {\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> \u0130\u015flenen item'\u0131n yap\u0131s\u0131 (d\u00f6ng\u00fc ba\u015f\u0131):\", JSON.stringify(item, null, 2));\n\n // 3. item.json.data'n\u0131n var olup olmad\u0131\u011f\u0131n\u0131 ve string olup olmad\u0131\u011f\u0131n\u0131 kontrol et\n // Girdi verinize g\u00f6re, API yan\u0131t\u0131 item.json.data i\u00e7inde bir string olarak geliyor.\n const jsonString = item.json && item.json.data;\n\n if (jsonString && typeof jsonString === 'string') {\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> item.json.data bir string ve dolu, parse ediliyor...\");\n try {\n // 4. JSON string'ini JavaScript objesine \u00e7evir\n const apiResponse = JSON.parse(jsonString);\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> API Yan\u0131t\u0131 (Parse Edilmi\u015f):\", JSON.stringify(apiResponse, null, 2));\n\n // 5. As\u0131l u\u00e7u\u015f teklifleri dizisini al (apiResponse.data)\n const flightOffers = apiResponse.data;\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> flightOffers De\u011fi\u015fkeni (Parse Sonras\u0131):\", flightOffers === undefined ? \"undefined\" : flightOffers === null ? \"null\" : JSON.stringify(flightOffers, null, 2).slice(0, 500) + \"...\"); // \u00c7ok uzunsa k\u0131salt\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> flightOffers T\u00fcr\u00fc:\", typeof flightOffers, \" | Dizi mi?:\", Array.isArray(flightOffers));\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> flightOffers Uzunlu\u011fu:\", flightOffers ? flightOffers.length : 'Tan\u0131ms\u0131z veya null');\n\n if (flightOffers && Array.isArray(flightOffers) && flightOffers.length > 0) {\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> flightOffers ko\u015fulu sa\u011fland\u0131, i\u00e7 d\u00f6ng\u00fcye giriliyor. Teklif say\u0131s\u0131:\", flightOffers.length);\n\n // 6. Her bir u\u00e7u\u015f teklifi (offer) \u00fczerinde d\u00f6n\n for (const offer of flightOffers) {\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> --- YEN\u0130 TEKL\u0130F \u0130\u015eLEN\u0130YOR (Ham Veri) ---\", JSON.stringify(offer, null, 2));\n\n let price = null;\n let currency = null;\n\n // 7. Fiyat bilgilerini g\u00fcvenli bir \u015fekilde al\n if (offer.price && (typeof offer.price.grandTotal !== 'undefined' || typeof offer.price.total !== 'undefined')) {\n price = parseFloat(offer.price.grandTotal || offer.price.total);\n currency = offer.price.currency;\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Fiyat ve Para Birimi Al\u0131nd\u0131:\", price, currency);\n } else {\n console.warn(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Uyar\u0131: Bu teklifte ge\u00e7erli fiyat (.price.grandTotal veya .price.total) bilgisi bulunamad\u0131. Atlan\u0131yor.\", offer.price ? JSON.stringify(offer.price, null, 2) : \"offer.price tan\u0131ms\u0131z\");\n continue; \n }\n\n if (isNaN(price) || price === null) {\n console.warn(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Uyar\u0131: Ge\u00e7ersiz fiyat de\u011feri (NaN veya null). Atlan\u0131yor.\", price);\n continue;\n }\n\n // 8. Havayolu bilgisini g\u00fcvenli bir \u015fekilde al\n const airline = (offer.validatingAirlineCodes && offer.validatingAirlineCodes.length > 0) ? offer.validatingAirlineCodes[0] : \"N/A\";\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Havayolu Al\u0131nd\u0131:\", airline);\n\n // 9. G\u00fczergah ve segment bilgilerini g\u00fcvenli bir \u015fekilde al\n let departure, arrival, ucusTarihi;\n if (offer.itineraries && Array.isArray(offer.itineraries) && offer.itineraries.length > 0 &&\n offer.itineraries[0].segments && Array.isArray(offer.itineraries[0].segments) && offer.itineraries[0].segments.length > 0) {\n const itinerary = offer.itineraries[0];\n const firstSegment = itinerary.segments[0];\n const lastSegment = itinerary.segments[itinerary.segments.length - 1];\n\n if (firstSegment.departure && lastSegment.arrival &&\n firstSegment.departure.iataCode && firstSegment.departure.at &&\n lastSegment.arrival.iataCode && lastSegment.arrival.at) {\n departure = firstSegment.departure;\n arrival = lastSegment.arrival;\n ucusTarihi = departure.at.slice(0, 10); \n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Kalk\u0131\u015f, Var\u0131\u015f, U\u00e7u\u015f Tarihi Al\u0131nd\u0131:\", JSON.stringify(departure, null, 2), JSON.stringify(arrival, null, 2), ucusTarihi);\n } else {\n console.warn(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Uyar\u0131: \u0130lk veya son segmentte kalk\u0131\u015f/var\u0131\u015f detaylar\u0131 (iataCode, at) eksik. Atlan\u0131yor.\", JSON.stringify(itinerary.segments, null, 2));\n continue;\n }\n } else {\n console.warn(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Uyar\u0131: Bu teklifte ge\u00e7erli g\u00fczergah/segment bilgisi bulunamad\u0131 (itineraries veya segments dizisi eksik/bo\u015f). Atlan\u0131yor.\", offer.itineraries ? JSON.stringify(offer.itineraries, null, 2) : \"offer.itineraries tan\u0131ms\u0131z\");\n continue;\n }\n\n // 10. \u0130\u015flenmi\u015f u\u00e7u\u015f objesini olu\u015ftur\n const currentFlight = {\n fiyat: price,\n para_birimi: currency,\n havayolu: airline,\n kalkis_havaalani: departure.iataCode,\n varis_havaalani: arrival.iataCode,\n kalkis_saati_utc: departure.at,\n varis_saati_utc: arrival.at,\n ucus_tarihi: ucusTarihi,\n eklenme_timestamp_utc: new Date().toISOString()\n };\n processedFlights.push(currentFlight);\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> \u0130\u015flenmi\u015f U\u00e7u\u015f Eklendi:\", JSON.stringify(currentFlight, null, 2));\n\n // 11. En ucuz u\u00e7u\u015fu takip et\n if (enUcuzUcus === null || currentFlight.fiyat < enUcuzUcus.fiyat) {\n enUcuzUcus = currentFlight;\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Yeni En Ucuz U\u00e7u\u015f Bulundu:\", JSON.stringify(enUcuzUcus, null, 2));\n }\n } \n } else {\n console.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> API yan\u0131t\u0131nda 'data' dizisi (flightOffers) bulunamad\u0131, dizi de\u011fil veya bo\u015f.\");\n }\n } catch (e) {\n console.error(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> JSON parse edilirken veya i\u015flenirken bir hata olu\u015ftu:\", e.message, e.stack);\n console.error(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Hatal\u0131 veri (jsonString):\", jsonString ? jsonString.slice(0, 500) + \"...\" : \"jsonString tan\u0131ms\u0131z\");\n }\n } else {\n console.warn(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Gelen item'da 'item.json.data' alan\u0131 bulunamad\u0131, string de\u011fil veya bo\u015f.\", item.json ? JSON.stringify(item.json, null, 2) : \"item.json tan\u0131ms\u0131z\");\n }\n} \n\nconsole.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> T\u00fcm \u0130\u015flenmi\u015f U\u00e7u\u015flar Dizisi (Son Hali):\", JSON.stringify(processedFlights, null, 2));\nconsole.log(\"[Node: U\u00e7u\u015f Verilerini \u0130\u015fle] >> Son En Ucuz U\u00e7u\u015f Detay\u0131 (Son Hali):\", JSON.stringify(enUcuzUcus, null, 2));\n\n// 12. Hedef fiyat ve sonucu d\u00f6nd\u00fcr\nconst hedefFiyat = 200; \n\nreturn {\n json: { \n tum_islenmis_ucuslar: processedFlights,\n en_ucuz_ucus_detayi: enUcuzUcus,\n hedef_kriter_fiyati: hedefFiyat,\n fiyat_hedefe_uygun_mu: enUcuzUcus ? enUcuzUcus.fiyat <= hedefFiyat : false,\n bulunan_teklif_sayisi: processedFlights.length\n }\n};"
},
"id": "6b18d2ae-a8c9-45e6-be27-63de706dc84e",
"name": "U\u00e7u\u015f Verilerini \u0130\u015fle",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-420,
100
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 1
},
"conditions": [
{
"id": "condition-1",
"leftValue": "={{$json.fiyat_uygun_mu}}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "equal"
}
},
{
"id": "22459955-b9fa-454d-921f-dcf0059b5056",
"leftValue": "={{$json.json.en_ucuz_ucus_detayi.fiyat}} < 300",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "a8be5e7e-f108-4557-8709-0cd2e539ac2f",
"name": "Fiyat Kontrol\u00fc",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
-220,
100
]
},
{
"parameters": {
"operation": "send"
},
"id": "ab43b354-539d-4427-ba10-136436741d45",
"name": "Telegram Bildirimi G\u00f6nder",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.1,
"position": [
0,
0
],
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"sendTo": "yetisharun@gmail.com",
"subject": "\ud83c\udf89 Ucuz U\u00e7ak Bileti Bulundu!",
"message": "Merhaba,\nBug\u00fcnk\u00fc {{$json.json.en_ucuz_ucus_detayi.kalkis_havaalani}} - {{$json.json.en_ucuz_ucus_detayi.varis_havaalani}} rotas\u0131 i\u00e7in\nhedef fiyat\u0131n\u0131z\u0131n ({ {$json.json.hedef_kriter_fiyati} } { {$json.json.en_ucuz_ucus_detayi.para_birimi || 'EUR'} }) alt\u0131nda bir u\u00e7u\u015f bulunamad\u0131.\nBulunan en ucuz u\u00e7u\u015f: {{$json.json.en_ucuz_ucus_detayi.fiyat}} {{$json.json.en_ucuz_ucus_detayi.para_birimi || 'EUR'}}\nToplam { {$json.json.bulunan_teklif_sayisi} } u\u00e7u\u015f teklifi incelendi.",
"options": {}
},
"id": "f79a4ecc-c718-4cb2-92e0-dc78f27376c3",
"name": "Email Bildirimi G\u00f6nder",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
0,
200
],
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"content": "## U\u00e7ak bileti otomasyonu\n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)"
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-1160,
-440
],
"typeVersion": 1,
"id": "b9c2b13d-03e3-452d-a3cc-7775b5cf4322",
"name": "Sticky Note"
},
{
"parameters": {
"tableId": "ucak_bileti_fiyatlari",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "kalkis_sehri",
"fieldValue": "={{$json.en_ucuz_ucus_detayi.kalkis_havaalani}}"
},
{
"fieldId": "varis_sehri",
"fieldValue": "={{$json.en_ucuz_ucus_detayi.varis_havaalani}}"
},
{
"fieldId": "ucus_tarihi",
"fieldValue": "={{$json.en_ucuz_ucus_detayi.ucus_tarihi}}"
},
{
"fieldId": "fiyat",
"fieldValue": "={{$json.en_ucuz_ucus_detayi.fiyat}}"
},
{
"fieldId": "para_birimi",
"fieldValue": "={{$json.en_ucuz_ucus_detayi.para_birimi}}"
},
{
"fieldId": "havayolu",
"fieldValue": "={{$json.en_ucuz_ucus_detayi.havayolu}}"
},
{
"fieldId": "kalkis_saati_utc",
"fieldValue": "={{$json.en_ucuz_ucus_detayi.kalkis_saati_utc}}"
},
{
"fieldId": "varis_saati_utc",
"fieldValue": "={{$json.en_ucuz_ucus_detayi.varis_saati_utc}}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
-260,
340
],
"id": "0724bcd7-4c12-442c-bd69-c569ddf6c596",
"name": "Supabase",
"credentials": {
"supabaseApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 2
}
]
}
},
"id": "7c07c7d7-f603-4083-a089-bc6316aa9577",
"name": "Her 2 Saatte Bir \u00c7al\u0131\u015ft\u0131r",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
-1060,
100
]
},
{
"parameters": {
"url": "https://test.api.amadeus.com/v2/shopping/flight-offers",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "originLocationCode",
"value": "IST"
},
{
"name": "destinationLocationCode",
"value": "DBV"
},
{
"name": "departureDate",
"value": "2025-06-15"
},
{
"name": "adults",
"value": "2"
},
{
"name": "max",
"value": "10"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{$node[\"Access Token Al\"].json.access_token}}"
},
{}
]
},
"options": {}
},
"id": "fe0a1019-40f9-4488-9f5e-646179d7ae56",
"name": "U\u00e7ak Bileti Ara",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
-640,
100
]
},
{
"parameters": {
"url": "https://test.api.amadeus.com/v2/shopping/flight-offers",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "originLocationCode",
"value": "IST"
},
{
"name": "destinationLocationCode",
"value": "TGD"
},
{
"name": "departureDate",
"value": "2025-07-20"
},
{
"name": "max",
"value": "10"
},
{
"name": "adults",
"value": "2"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{$node[\"Access Token Al\"].json.access_token}}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-600,
-320
],
"id": "bf96fe4f-34cc-4bb2-b81a-2097a3b79761",
"name": "HTTP Request"
}
],
"connections": {
"Access Token Al": {
"main": [
[
{
"node": "U\u00e7ak Bileti Ara",
"type": "main",
"index": 0
}
]
]
},
"U\u00e7u\u015f Verilerini \u0130\u015fle": {
"main": [
[
{
"node": "Fiyat Kontrol\u00fc",
"type": "main",
"index": 0
},
{
"node": "Supabase",
"type": "main",
"index": 0
}
]
]
},
"Fiyat Kontrol\u00fc": {
"main": [
[
{
"node": "Telegram Bildirimi G\u00f6nder",
"type": "main",
"index": 0
},
{
"node": "Email Bildirimi G\u00f6nder",
"type": "main",
"index": 0
}
]
]
},
"Her 2 Saatte Bir \u00c7al\u0131\u015ft\u0131r": {
"main": [
[
{
"node": "Access Token Al",
"type": "main",
"index": 0
}
]
]
},
"U\u00e7ak Bileti Ara": {
"main": [
[
{
"node": "U\u00e7u\u015f Verilerini \u0130\u015fle",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "fe72c1f2-d265-4e2c-b84c-9ff90a0f7bbe",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "6whS4QPNsW4dIYmP",
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2supabaseApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
uçak bileti. Uses httpRequest, telegram, gmail, supabase. Scheduled trigger; 10 nodes.
Source: https://github.com/dermanx/my-n8n-instance/blob/294a74938150d4abad0eb1424002b5bcc0433c41/u_ak_bileti.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Template - SSL Expiry Alert System. Uses googleSheets, scheduleTrigger, httpRequest, stickyNote. Scheduled trigger; 21 nodes.
[](https://www.youtube.com/watch?v=q4d404G_OxY)
This workflow is ideal for administrators or IT professionals responsible for monitoring SSL certificates of multiple websites to ensure they do not expire unexpectedly.
url-uptime-monitor. Uses scheduleTrigger, splitOut, googleSheets, summarize. Scheduled trigger; 18 nodes.
MPE Kleinanzeigen Unified (Reminder + Poster). Uses gmail, httpRequest, telegram, googleSheets. Scheduled trigger; 15 nodes.