
Track Free Udemy Courses Automatically with RapidAPI and Google Sheets
描述
分类
📊 Productivity🤖 AI & Machine Learning
使用的节点
n8n-nodes-base.ifn8n-nodes-base.coden8n-nodes-base.emailSendn8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNote
价格免费
浏览量0
最后更新11/28/2025
workflow.json
{
"meta": {
"instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "c0dd2da3-624a-4730-8711-dc495ed587d0",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "5f323b68-04ad-4dd6-bdd9-58de3b01dbef",
"name": "Fetch Udemy Coupons",
"type": "n8n-nodes-base.httpRequest",
"position": [
208,
0
],
"parameters": {
"url": "https://udemy-coupons-and-courses.p.rapidapi.com/featured.php",
"method": "POST",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
},
"sendBody": true,
"contentType": "multipart-form-data",
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "page",
"value": "1"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "x-rapidapi-host",
"value": "udemy-coupons-and-courses.p.rapidapi.com"
},
{
"name": "x-rapidapi-key",
"value": "your key"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "6c2dc08a-8ee6-4865-b29a-d43b25c5d303",
"name": "Check API Success",
"type": "n8n-nodes-base.if",
"position": [
448,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "f251122a-946f-4d41-a0fc-f5ecd3fa03f3",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.body.success }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "b6e4ffb5-a99a-452e-be88-371f97857a35",
"name": "Filter Free Courses",
"type": "n8n-nodes-base.code",
"position": [
688,
-16
],
"parameters": {
"jsCode": "const courses = $input.first().json.courses;\nconst freeCourses = courses.filter(course => course.sale_price === 0);\nreturn freeCourses;\n"
},
"typeVersion": 2
},
{
"id": "b9789ce1-8fe2-4e11-a22c-83d59b3e5c83",
"name": "Send Error Notification",
"type": "n8n-nodes-base.emailSend",
"position": [
688,
336
],
"webhookId": "ef72fbe3-7945-4511-982e-8b5da3fde9a3",
"parameters": {
"html": "=Hello,\n\nAn error occurred while trying to fetch Udemy coupons from the API.\n\nPlease check the API and the workflow to resolve the issue.\n",
"options": {},
"subject": "Udemy Coupons Fetch Error - Immediate Attention Required",
"toEmail": "[email protected]",
"fromEmail": "[email protected]"
},
"credentials": {
"smtp": {
"id": "nPwKPPgVavimTJX4",
"name": "SMTP account"
}
},
"typeVersion": 2.1
},
{
"id": "b0cafa14-748d-4e5a-aa7c-5bbb6b32dbc3",
"name": "Sync Courses to Google Sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
992,
-16
],
"parameters": {
"columns": {
"value": {
"id": "={{ $json.id }}",
"name": "={{ $json.name }}",
"slug": "={{ $json.slug }}",
"image": "={{ $json.image }}",
"price": "={{ $json.price }}",
"store": "={{ $json.store }}",
"views": "={{ $json.views }}",
"rating": "={{ $json.rating }}",
"category": "={{ $json.category }}",
"language": "={{ $json.language }}",
"lectures": "={{ $json.lectures }}",
"sale_price": "={{ $json.sale_price }}",
"sale_start": "={{ $json.sale_start }}",
"subcategory": "={{ $json.subcategory }}"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "id",
"defaultMatch": true,
"canBeUsedToMatch": true
},
{
"id": "name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "image",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "image",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "price",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "sale_price",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "sale_price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "lectures",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "lectures",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "views",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "views",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "rating",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "language",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "language",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "category",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "category",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "subcategory",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "subcategory",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "slug",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "slug",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "store",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "store",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "sale_start",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "sale_start",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "",
"cachedResultName": "Courses"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": ""
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "Rt0RWApx8PL9t0RF",
"name": "Google Docs account"
}
},
"typeVersion": 4.7
},
{
"id": "4f577854-770c-46f2-b477-6f7c6a0cc522",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-96,
-144
],
"parameters": {
"height": 304,
"content": "### Schedule Trigger \nTriggers the workflow on an hourly schedule. \nStarts the process of fetching Udemy coupons automatically."
},
"typeVersion": 1
},
{
"id": "4813d9c9-db84-49a3-b037-d95f73d7869a",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-144
],
"parameters": {
"height": 304,
"content": "### Fetch Udemy Coupons \nSends a POST request to fetch featured Udemy courses via API. \nIncludes necessary headers and form-data for the API call."
},
"typeVersion": 1
},
{
"id": "139c1e96-3220-4e02-b736-f52dcb7614a3",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
416,
-144
],
"parameters": {
"height": 304,
"content": "### Check API Success \nChecks if the API response indicates a successful fetch. \nRoutes workflow either to filter courses or send an error notification.\n"
},
"typeVersion": 1
},
{
"id": "ce832f7f-34c1-40fe-bdea-ef35e9904f0d",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
672,
-144
],
"parameters": {
"height": 304,
"content": "\n### Filter Free Courses \nFilters out only free courses where sale price is zero. \nPrepares data for syncing with Google Sheets."
},
"typeVersion": 1
},
{
"id": "e9259da8-1aae-45b1-b5fb-40b369e99136",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
208
],
"parameters": {
"height": 272,
"content": "### Send Error Notification \nSends an email alert if the API fetch fails. \nNotifies the admin to check the workflow or API."
},
"typeVersion": 1
},
{
"id": "306c4dda-14aa-4bc8-8956-bcc2d950da37",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
928,
-144
],
"parameters": {
"height": 304,
"content": "### Sync Courses to Google Sheet \nAdds or updates filtered courses into the Google Sheet. \nEnsures the sheet is always up-to-date with latest free courses."
},
"typeVersion": 1
},
{
"id": "4fd417e8-389d-43b3-98f8-cc1178c9c6a4",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-912,
-288
],
"parameters": {
"width": 608,
"height": 592,
"content": "## Automated Udemy Coupon Fetching & Google Sheets Sync\n\n### Description\n\nFetches free Udemy courses hourly via API and syncs them with Google Sheets, sending error alerts if needed.\n\n### Summary\n\nAutomates fetching featured Udemy coupons, filters only free courses, and updates a Google Sheet. Sends email notifications on API errors for quick fixes.\n\n### Node Overview\n\n1. **Schedule Trigger:** Runs workflow hourly.\n2. **Fetch Udemy Coupons:** Requests featured courses via API.\n3. **Check API Success:** Confirms successful data fetch.\n4. **Filter Free Courses:** Selects courses with sale price zero.\n5. **Send Error Notification:** Emails admin on API failure.\n6. **Sync Courses to Google Sheet:** Updates Google Sheet with free courses.\n\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Fetch Udemy Coupons",
"type": "main",
"index": 0
}
]
]
},
"Check API Success": {
"main": [
[
{
"node": "Filter Free Courses",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Error Notification",
"type": "main",
"index": 0
}
]
]
},
"Fetch Udemy Coupons": {
"main": [
[
{
"node": "Check API Success",
"type": "main",
"index": 0
}
]
]
},
"Filter Free Courses": {
"main": [
[
{
"node": "Sync Courses to Google Sheet",
"type": "main",
"index": 0
}
]
]
}
}
}