{
  "nodes": [
    {
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "position": [
        459,
        371
      ],
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "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
    },
    {
      "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": "REPLACE_WITH_AUTHORIZATION"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Item Lists",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        900,
        370
      ],
      "parameters": {
        "options": {
          "destinationFieldName": "posts"
        },
        "fieldToSplitOut": "data.posts.edges"
      },
      "typeVersion": 1
    },
    {
      "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": "9a3bd5ef-ead7-5a86-a815-7b4dea77cf99",
      "name": "Publication · Overview and setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -800,
        0
      ],
      "parameters": {
        "content": "# cron and graphql and item lists\n\n## Purpose and structure\nThis folder contains the **cron and graphql and item lists** workflow. Its executable nodes use `cron`, `discord`, `graphql`, `itemLists`, `set`. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.\n\n## Setup\nImport inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.\n\n## Entry points\nCron\n\n## Verification\nSanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.\n\n## Attribution\nhttps://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Graphql/0116_Graphql_Discord_Automate_Scheduled.json\nMIT; preserve source notices.",
        "width": 700,
        "height": 800,
        "color": 1
      }
    }
  ],
  "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
          }
        ]
      ]
    }
  },
  "active": false
}
