n8n
Workflow
Get Top 5 Products On Product Hunt Every Hour
This n8n workflow retrieves tasks and integrates with various services. Get Top 5 Products On Product Hunt Every Hour - ready to import and run in your n8n instance.
n8n
workflow.json
About This Script
This n8n workflow retrieves tasks and integrates with various services. Get Top 5 Products On Product Hunt Every Hour - ready to import and run in your n8n instance.
Features:
- Scheduled automation with cron triggers
- Scheduled execution
- Retrieves data from external sources
Source Code
{
"nodes": [
{
"name": "Cron",
"type": "n8n-nodes-base.cron",
"position": [
459,
371
],
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyHour"
}
]
}
},
"typeVersion": 1,
"id": "4abeab3a-7199-4d71-ad86-9841c563cbd9"
},
{
"name": "Set",
"type": "n8n-nodes-base.set",
"position": [
1109,
371
],
"parameters": {
"values": {
"number": [
{
"name": "Votes",
"value": "={{$json[\"posts\"][\"node\"][\"votesCount\"]}}"
}
],
"string": [
{
"name": "Name",
"value": "={{$json[\"posts\"][\"node\"][\"name\"]}}"
},
{
"name": "Description",
"value": "={{$json[\"posts\"][\"node\"][\"description\"]}}"
}
]
},
"options": [],
"keepOnlySet": true
},
"typeVersion": 1,
"id": "9c457636-3db1-4430-86fb-ff590405de5a"
},
{
"name": "GraphQL",
"type": "n8n-nodes-base.graphql",
"position": [
700,
370
],
"parameters": {
"query": "=query PostRanking{\n posts(postedAfter:\"{{new Date(new Date(Date.now()).getTime() - (1000*60*60*1*24)).toUTCString()}}\", order:RANKING, first:5, postedBefore:\"{{new Date(Date.now()).toUTCString()}}\"){\n edges {\n node {\n name\n tagline\n description\n votesCount\n reviewsRating\n }\n }\n }\n}",
"endpoint": "https://api.producthunt.com/v2/api/graphql",
"requestFormat": "json",
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer YOUR-TOKEN"
}
]
}
},
"typeVersion": 1,
"id": "6405b925-3ea8-44e4-9f07-211bfe182a03"
},
{
"name": "Item Lists",
"type": "n8n-nodes-base.itemLists",
"position": [
900,
370
],
"parameters": {
"options": {
"destinationFieldName": "posts"
},
"fieldToSplitOut": "data.posts.edges"
},
"typeVersion": 1,
"id": "ed493ef8-1a2b-473b-9607-91c434900f3e"
},
{
"name": "Discord",
"type": "n8n-nodes-base.discord",
"position": [
1310,
370
],
"parameters": {
"text": "=Here are the top 5 PH projects:\n**Name:** {{$json[\"Name\"]}}\n**Description:** {{$json[\"Description\"]}}\n**Vote:** {{$json[\"Votes\"]}}\n-------",
"webhookUri": "DISCORD WEBHOOK URL"
},
"typeVersion": 1,
"id": "d3adb5ed-1352-4118-8651-01c8cac7087c"
}
],
"connections": {
"Set": {
"main": [
[
{
"node": "Discord",
"type": "main",
"index": 0
}
]
]
},
"Cron": {
"main": [
[
{
"node": "GraphQL",
"type": "main",
"index": 0
}
]
]
},
"GraphQL": {
"main": [
[
{
"node": "Item Lists",
"type": "main",
"index": 0
}
]
]
},
"Item Lists": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
}
},
"n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n
#automation
#workflow