93 lines
2.9 KiB
JSON
93 lines
2.9 KiB
JSON
{
|
|
"id": "eDpNvtTwQJSGR279",
|
|
"name": "Test Character Bazaar Logic",
|
|
"nodes": [
|
|
{
|
|
"id": "Manual Trigger",
|
|
"name": "Manual Trigger",
|
|
"parameters": {},
|
|
"position": [
|
|
100,
|
|
100
|
|
],
|
|
"type": "n8n-nodes-base.manualTrigger",
|
|
"typeVersion": 1
|
|
},
|
|
{
|
|
"id": "Filter WTS Code",
|
|
"name": "Filter WTS Code",
|
|
"parameters": {
|
|
"jsCode": "const items = [\n {\n json: {\n title: \"WTS [SOLD] Character A\",\n content: \"Selling my character\",\n contentSnippet: \"Selling my character\"\n }\n },\n {\n json: {\n title: \"WTS Character B [LOCKED]\",\n content: \"Topic locked\",\n contentSnippet: \"Topic locked\"\n }\n },\n {\n json: {\n title: \"WTS Character C\",\n content: \"Active sale\",\n contentSnippet: \"Active sale\"\n }\n }\n];\n\nreturn items.map(item => {\n const title = (item.json.title || \"\").toUpperCase();\n const content = item.json.content || item.json.contentSnippet || \"\";\n let status = null;\n\n // Check for SOLD\n if (title.includes('[SOLD]') || title.startsWith('SOLD ') || title === 'SOLD') {\n status = 'sale_completed';\n }\n \n // Check for Locked/Hidden (Best effort from RSS)\n if (title.includes('[LOCKED]') || content.includes('Topic locked')) {\n status = 'pending_response';\n }\n\n item.json.post_status = status;\n return item;\n});"
|
|
},
|
|
"position": [
|
|
300,
|
|
100
|
|
],
|
|
"type": "n8n-nodes-base.code",
|
|
"typeVersion": 2
|
|
},
|
|
{
|
|
"id": "Check Pre-Filter",
|
|
"name": "Check Pre-Filter",
|
|
"parameters": {
|
|
"conditions": {
|
|
"string": [
|
|
{
|
|
"operation": "isNotEmpty",
|
|
"value1": "={{ $json.post_status }}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"position": [
|
|
500,
|
|
100
|
|
],
|
|
"type": "n8n-nodes-base.if",
|
|
"typeVersion": 1
|
|
}
|
|
],
|
|
"connections": {
|
|
"Filter WTS Code": {
|
|
"main": [
|
|
[
|
|
{
|
|
"index": 0,
|
|
"node": "Check Pre-Filter",
|
|
"type": "main"
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Manual Trigger": {
|
|
"main": [
|
|
[
|
|
{
|
|
"index": 0,
|
|
"node": "Filter WTS Code",
|
|
"type": "main"
|
|
}
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"settings": {
|
|
"executionOrder": "v1",
|
|
"saveDataErrorExecution": "all",
|
|
"saveDataSuccessExecution": "all",
|
|
"saveManualExecutions": true,
|
|
"saveExecutionProgress": true,
|
|
"callerPolicy": "workflowsFromSameOwner",
|
|
"availableInMCP": false
|
|
},
|
|
"triggerCount": 0,
|
|
"versionId": "20a120b7-d765-489d-8437-5448581214e2",
|
|
"owner": {
|
|
"type": "personal",
|
|
"projectId": "FeLO36wNUAcn61Wj",
|
|
"projectName": "Ben W <admin@ben.io>",
|
|
"personalEmail": "admin@ben.io"
|
|
},
|
|
"parentFolderId": null,
|
|
"isArchived": true
|
|
} |