My Discord Agent

    github.com/pmh-only

    Shared 5/26/2026

    4 views

    Visual Workflow

    JSON Code

    {
      "meta": {
        "instanceId": "9b8280a696736372f8d0197aa5ab9feefafc40f2c7d88ee558d896ae2e384a2d",
        "templateCredsSetupCompleted": true
      },
      "nodes": [
        {
          "id": "47ef071f-55af-4889-baec-f78f556a83eb",
          "name": "On Message",
          "type": "n8n-nodes-discord-trigger.discordTrigger",
          "position": [
            -624,
            -928
          ],
          "parameters": {
            "pattern": "every",
            "guildIds": [
              "541782241131495434"
            ],
            "additionalFields": {
              "externalBotTrigger": false
            }
          },
          "credentials": {
            "discordBotTriggerApi": {
              "id": "K3CnEmBgEcdoPUIp",
              "name": "Discord Bot Trigger account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "d46e24f1-620a-4b0b-b2f4-07f4bc1ec871",
          "name": "React :linkshort:",
          "type": "n8n-nodes-base.discord",
          "onError": "continueRegularOutput",
          "position": [
            -176,
            -1216
          ],
          "webhookId": "0a131da0-183f-4faf-b61b-d1cc1e236fea",
          "parameters": {
            "emoji": ":linkshort:1431835517871198238",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.guildId }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.channelId }}"
            },
            "messageId": "={{ $json.id }}",
            "operation": "react"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "0f47f7c8-da59-431a-84ed-c095093332c4",
          "name": "React :filesave:",
          "type": "n8n-nodes-base.discord",
          "onError": "continueRegularOutput",
          "position": [
            -176,
            -1024
          ],
          "webhookId": "bec1f8e1-d4d7-493c-9e4a-ddab1e3b0013",
          "parameters": {
            "emoji": ":filesave:1431836894781509673",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.guildId }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.channelId }}"
            },
            "messageId": "={{ $json.id }}",
            "operation": "react"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "f94a965e-e548-461a-bee3-d0536655bdb0",
          "name": "Split and lowercase",
          "type": "n8n-nodes-base.set",
          "position": [
            -400,
            -832
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "9fba0b0d-5e81-4102-a561-d65e080000e4",
                  "name": "content",
                  "type": "array",
                  "value": "={{ $json.content.toLowerCase().split(' ') }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "281d0f85-ae98-4906-8bbc-a7ed5e26185b",
          "name": "Is there any \"thx\"?",
          "type": "n8n-nodes-base.if",
          "position": [
            -176,
            -832
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "fd7f4556-146a-4081-95d5-58d9643e34ea",
                  "operator": {
                    "type": "array",
                    "operation": "contains",
                    "rightType": "any"
                  },
                  "leftValue": "={{ $json.content }}",
                  "rightValue": "ty"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "c3c41f25-9f44-42ca-b0d6-50d41d61c077",
          "name": "Send \"no problem\"",
          "type": "n8n-nodes-base.discord",
          "position": [
            48,
            -832
          ],
          "webhookId": "109faea7-16c0-4498-9f29-3db330cb199d",
          "parameters": {
            "content": "no problem",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('On Message').item.json.guildId }}"
            },
            "options": {
              "message_reference": "={{ $('On Message').item.json.id }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('On Message').item.json.channelId }}"
            }
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "56ea94e8-5897-4ecd-a36a-af4f711c560d",
          "name": "On React Remove",
          "type": "n8n-nodes-discord-trigger.discordTrigger",
          "position": [
            -624,
            816
          ],
          "parameters": {
            "type": "message-reaction-remove",
            "guildIds": [
              "541782241131495434"
            ],
            "additionalFields": {
              "attachmentsRequired": false
            }
          },
          "credentials": {
            "discordBotTriggerApi": {
              "id": "K3CnEmBgEcdoPUIp",
              "name": "Discord Bot Trigger account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "dc51e3c0-48df-444b-8f11-0c6d30d011c5",
          "name": "On React Add",
          "type": "n8n-nodes-discord-trigger.discordTrigger",
          "position": [
            -624,
            1680
          ],
          "parameters": {
            "type": "message-reaction-add",
            "guildIds": [
              "541782241131495434"
            ],
            "additionalFields": {}
          },
          "credentials": {
            "discordBotTriggerApi": {
              "id": "K3CnEmBgEcdoPUIp",
              "name": "Discord Bot Trigger account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "07ace3ae-efaf-47db-9b18-40a445f7e764",
          "name": "Is it :linkshort:",
          "type": "n8n-nodes-base.if",
          "position": [
            -400,
            1344
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "5f49eb8d-9004-4222-91f8-36617f2e7d65",
                  "operator": {
                    "name": "filter.operator.equals",
                    "type": "string",
                    "operation": "equals"
                  },
                  "leftValue": "={{ $json.emojiId.toString() }}",
                  "rightValue": "1431835517871198238"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "ef7363f9-5f01-4deb-b9f4-23951ede10c9",
          "name": "Is it :filesave:",
          "type": "n8n-nodes-base.if",
          "position": [
            -400,
            1872
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "5f49eb8d-9004-4222-91f8-36617f2e7d65",
                  "operator": {
                    "name": "filter.operator.equals",
                    "type": "string",
                    "operation": "equals"
                  },
                  "leftValue": "={{ $json.emojiId.toString() }}",
                  "rightValue": "1431836894781509673"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "5589104c-f90b-4f63-9285-f3d0103f47ca",
          "name": "Wikipedia",
          "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
          "position": [
            1296,
            -432
          ],
          "parameters": {},
          "typeVersion": 1
        },
        {
          "id": "42fca3d9-3d8d-40bd-8b93-d75e15530c78",
          "name": "Date & Time",
          "type": "n8n-nodes-base.dateTimeTool",
          "position": [
            1424,
            -432
          ],
          "parameters": {
            "options": {}
          },
          "typeVersion": 2
        },
        {
          "id": "299202ee-2fb8-4e81-a411-c79cc7a79c39",
          "name": "Find existing link mappings",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            944,
            1552
          ],
          "parameters": {
            "filters": {
              "conditions": [
                {
                  "keyName": "longURL",
                  "keyValue": "={{ $json.longURL }}"
                }
              ]
            },
            "operation": "get",
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "j969aKICY4iqokmT",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/j969aKICY4iqokmT",
              "cachedResultName": "server_url_shortcuts"
            }
          },
          "typeVersion": 1,
          "alwaysOutputData": true
        },
        {
          "id": "65a2b1d9-c4d8-4ae8-9961-97dab57b7a69",
          "name": "If text content exist",
          "type": "n8n-nodes-base.if",
          "position": [
            -400,
            112
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 3,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "d665895a-8411-413a-b83a-004bd3e04f00",
                  "operator": {
                    "type": "string",
                    "operation": "notEmpty",
                    "singleValue": true
                  },
                  "leftValue": "={{ $json.content }}",
                  "rightValue": ""
                }
              ]
            }
          },
          "typeVersion": 2.3
        },
        {
          "id": "f0511553-2ff1-46b2-ae00-07bac915abab",
          "name": "On moderation testing",
          "type": "n8n-nodes-discord-trigger.discordTrigger",
          "position": [
            -624,
            256
          ],
          "parameters": {
            "pattern": "every",
            "guildIds": [
              "541782241131495434"
            ],
            "additionalFields": {
              "externalBotTrigger": false
            }
          },
          "credentials": {
            "discordBotTriggerApi": {
              "id": "K3CnEmBgEcdoPUIp",
              "name": "Discord Bot Trigger account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "4004eca1-23f0-4092-96e7-ace173ff2556",
          "name": "Execute moderation per file",
          "type": "n8n-nodes-base.httpRequest",
          "onError": "continueErrorOutput",
          "position": [
            -176,
            416
          ],
          "parameters": {
            "url": "https://api.openai.com/v1/moderations",
            "method": "POST",
            "options": {},
            "jsonBody": "={\n  \"input\": [{{\n    JSON.stringify({\n      type: 'image_url',\n      image_url: {\n        url: $json.attachment\n      }\n    })\n  }}]\n}",
            "sendBody": true,
            "specifyBody": "json",
            "authentication": "predefinedCredentialType",
            "nodeCredentialType": "openAiApi"
          },
          "credentials": {
            "openAiApi": {
              "id": "7UH2nMQKOpFVHcne",
              "name": "OpenAi account"
            }
          },
          "typeVersion": 4.4
        },
        {
          "id": "78b6eb85-86bd-42d4-8289-2c77913c04c5",
          "name": "Execute moderation for text content",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            -176,
            16
          ],
          "parameters": {
            "url": "https://api.openai.com/v1/moderations",
            "method": "POST",
            "options": {},
            "sendBody": true,
            "authentication": "predefinedCredentialType",
            "bodyParameters": {
              "parameters": [
                {
                  "name": "input",
                  "value": "={{ $('On moderation testing').item.json.content }}"
                }
              ]
            },
            "nodeCredentialType": "openAiApi"
          },
          "credentials": {
            "openAiApi": {
              "id": "7UH2nMQKOpFVHcne",
              "name": "OpenAi account"
            }
          },
          "typeVersion": 4.4
        },
        {
          "id": "72bf0c87-0f91-4135-b7e0-4e882f966dca",
          "name": "Per attachement file",
          "type": "n8n-nodes-base.splitOut",
          "position": [
            -400,
            416
          ],
          "parameters": {
            "options": {},
            "fieldToSplitOut": "attachments"
          },
          "typeVersion": 1
        },
        {
          "id": "bb969bad-e6d5-43cc-b914-36b222b05181",
          "name": "Add moderation result type: content",
          "type": "n8n-nodes-base.set",
          "position": [
            48,
            16
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "d70d74ee-bf8e-4ed6-beda-ca41ede2bacc",
                  "name": "results[0].type",
                  "type": "string",
                  "value": "content"
                }
              ]
            },
            "includeOtherFields": true
          },
          "typeVersion": 3.4
        },
        {
          "id": "451d9976-346e-4505-b113-c425cde4fc56",
          "name": "Add dummy moderation result",
          "type": "n8n-nodes-base.set",
          "position": [
            48,
            208
          ],
          "parameters": {
            "mode": "raw",
            "options": {},
            "jsonOutput": "{\n  \"results\": [{\n    \"type\": \"content\",\n    \"flagged\": false\n  }]\n}"
          },
          "typeVersion": 3.4
        },
        {
          "id": "7fbe410a-5739-4147-bca9-a494940dc7fe",
          "name": "Add moderation result type: image",
          "type": "n8n-nodes-base.set",
          "position": [
            48,
            496
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "768a1ceb-13ef-4de1-b5c5-7e6153be7808",
                  "name": "results[0].type",
                  "type": "string",
                  "value": "image"
                },
                {
                  "id": "4f9a018e-cccb-4209-974d-5ed717b1d003",
                  "name": "results[0].image_idx",
                  "type": "number",
                  "value": "={{ $itemIndex }}"
                }
              ]
            },
            "includeOtherFields": true
          },
          "typeVersion": 3.4
        },
        {
          "id": "b38d742a-debd-443a-935b-219d31d57fca",
          "name": "Merge moderation results",
          "type": "n8n-nodes-base.merge",
          "position": [
            272,
            272
          ],
          "parameters": {},
          "typeVersion": 3.2
        },
        {
          "id": "7d54216d-c263-4063-96e3-1c4e006ed7a3",
          "name": "If moderation not passed",
          "type": "n8n-nodes-base.if",
          "position": [
            720,
            272
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 3,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "51dc8cfc-ef76-4fe0-aec9-661869f34456",
                  "operator": {
                    "type": "boolean",
                    "operation": "true",
                    "singleValue": true
                  },
                  "leftValue": "={{ $json.results.some(v => v.flagged) }}",
                  "rightValue": false
                }
              ]
            }
          },
          "typeVersion": 2.3
        },
        {
          "id": "1de5b74f-649b-4fad-80b5-4c86433bdad5",
          "name": "Write moderation detected record",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            944,
            272
          ],
          "parameters": {
            "columns": {
              "value": {
                "guild_id": "={{ $('On moderation testing').item.json.guildId }}",
                "channel_id": "={{ $('On moderation testing').item.json.channelId }}",
                "embed_json": "={\n  \"id\": 109902699,\n  \"description\": \"\",\n  \"fields\": {{\n    JSON.stringify([\n      {\n        name: 'Is Flagged',\n        value: $json.results.filter(v => v.flagged).length > 0 ? '✅' : '❌'\n      },\n      ...(\n        $json.results.filter(v => v.flagged).map((v) => ({\n          name: v.type === 'content' ? 'Text Content' : `Image Content #${v.image_idx + 1}`,\n          value: (Object.entries(v.categories).filter(([, v2]) => v2).map(([k]) => `${k}: ${Math.floor(v.category_scores[k]*10000)/100}%`).join('\\n') || '(empty)')\n        }))\n      )\n    ], null, 2)\n  }},\n  \"color\": 16734039\n}",
                "message_id": "={{ $('On moderation testing').item.json.id }}"
              },
              "schema": [
                {
                  "id": "embed_json",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "embed_json",
                  "defaultMatch": false
                },
                {
                  "id": "channel_id",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "channel_id",
                  "defaultMatch": false
                },
                {
                  "id": "message_id",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "message_id",
                  "defaultMatch": false
                },
                {
                  "id": "guild_id",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "guild_id",
                  "defaultMatch": false
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "JAKG2JrbbaZsKj7J",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/JAKG2JrbbaZsKj7J",
              "cachedResultName": "server_moderation_detected"
            }
          },
          "typeVersion": 1.1
        },
        {
          "id": "5b60287e-dc47-46b1-a202-11296e8e8949",
          "name": "React warning emoji for detail",
          "type": "n8n-nodes-base.discord",
          "onError": "continueRegularOutput",
          "position": [
            1168,
            272
          ],
          "webhookId": "0a131da0-183f-4faf-b61b-d1cc1e236fea",
          "parameters": {
            "emoji": "⚠️",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('On moderation testing').item.json.guildId }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('On moderation testing').item.json.channelId }}"
            },
            "messageId": "={{ $('On moderation testing').item.json.id }}",
            "operation": "react"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "9e67dcc9-61e5-406f-a5b1-f19cf20f3cd6",
          "name": "On @gpt called",
          "type": "n8n-nodes-discord-trigger.discordTrigger",
          "position": [
            -400,
            -448
          ],
          "parameters": {
            "value": "<@&1442408548226301952>",
            "pattern": "contain",
            "guildIds": [
              "541782241131495434"
            ],
            "additionalFields": {
              "externalBotTrigger": false
            }
          },
          "credentials": {
            "discordBotTriggerApi": {
              "id": "K3CnEmBgEcdoPUIp",
              "name": "Discord Bot Trigger account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "60083c72-e1e8-4b32-a4fe-a535bd27d15c",
          "name": "Add check mark for response",
          "type": "n8n-nodes-base.discord",
          "onError": "continueRegularOutput",
          "position": [
            -176,
            1600
          ],
          "webhookId": "c9e5e001-babb-4b06-a60e-8037cd63ff6b",
          "parameters": {
            "emoji": "✅",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.guildId }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.channelId }}"
            },
            "messageId": "={{ $json.messageId }}",
            "operation": "react"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "4249767a-2b40-471a-9d4d-136cb7ba9393",
          "name": "Normalize data field names",
          "type": "n8n-nodes-base.set",
          "position": [
            -400,
            864
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "b6477a99-e729-406f-be61-672fbbacd3f5",
                  "name": "messageId",
                  "type": "string",
                  "value": "={{ $json.messageId }}"
                },
                {
                  "id": "e6c85562-3dc9-4b65-a201-fed4c1b06da1",
                  "name": "channelId",
                  "type": "string",
                  "value": "={{ $json.channelId }}"
                },
                {
                  "id": "aba7f335-d18f-46c6-b9da-1ba3cc4d6547",
                  "name": "emojiId",
                  "type": "string",
                  "value": "={{ $json.emojiId.reaction ?? $json.emojiId }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "24e2d82c-5d0a-448e-9324-d295d682e7cf",
          "name": "Get message detail for record react count",
          "type": "n8n-nodes-base.discord",
          "position": [
            -176,
            864
          ],
          "webhookId": "c8c48894-912d-4f2e-ae55-2b9dad4739d8",
          "parameters": {
            "guildId": {
              "__rl": true,
              "mode": "list",
              "value": "541782241131495434",
              "cachedResultUrl": "https://discord.com/channels/541782241131495434",
              "cachedResultName": "박미녁 팬클럽"
            },
            "options": {
              "simplify": false
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('Normalize data field names').item.json.channelId }}"
            },
            "messageId": "={{ $('Normalize data field names').item.json.messageId }}",
            "operation": "get"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "ecfbaeda-d080-49e2-93ad-ae75f467f940",
          "name": "Get member data to record react count",
          "type": "n8n-nodes-base.discord",
          "position": [
            48,
            864
          ],
          "webhookId": "b4f4c48f-3df4-43fd-9ece-4a7043c68d0e",
          "parameters": {
            "after": "={{ BigInt($json.author.id) - 1n }}",
            "limit": 1,
            "guildId": {
              "__rl": true,
              "mode": "list",
              "value": "541782241131495434",
              "cachedResultUrl": "https://discord.com/channels/541782241131495434",
              "cachedResultName": "박미녁 팬클럽"
            },
            "options": {},
            "resource": "member"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "c1e6d8d8-9888-42a9-95ff-ffb1b1fdd9b6",
          "name": "Calculate react count",
          "type": "n8n-nodes-base.set",
          "position": [
            272,
            864
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "a5f1dd3b-73f3-41de-8a9b-d736e34e73d1",
                  "name": "displayable_emojis",
                  "type": "string",
                  "value": "={{ $('Get message detail for record react count').item.json.reactions.map((v) => `${v.emoji.id === null ? v.emoji.name : `<:${v.emoji.name}:${v.emoji.id}>`} ${v.count}`).join(' · ') }}"
                },
                {
                  "id": "aa8718d8-056a-4be2-a2de-19db7858ae50",
                  "name": "total_emoji_count",
                  "type": "number",
                  "value": "={{ $('Get message detail for record react count').item.json.reactions.reduce((prev, curr) => curr.count > prev ? curr.count : prev, 0) }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "54a1ce37-a9fb-4578-8ca0-fbb58aa4579e",
          "name": "Get record display message data",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            496,
            864
          ],
          "parameters": {
            "limit": 1,
            "filters": {
              "conditions": [
                {
                  "keyName": "message_id",
                  "keyValue": "={{ $('Normalize data field names').item.json.messageId }}"
                }
              ]
            },
            "matchType": "allConditions",
            "operation": "get",
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "3JPE7nXZSrdq48ay",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/3JPE7nXZSrdq48ay",
              "cachedResultName": "server_emoji_posts"
            }
          },
          "typeVersion": 1,
          "alwaysOutputData": true
        },
        {
          "id": "4930c81b-8d07-4b15-b237-238df0004f38",
          "name": "Need to create new record display",
          "type": "n8n-nodes-base.if",
          "position": [
            720,
            720
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "ae94132f-35e1-45de-b79b-f72e7207d29a",
                  "operator": {
                    "type": "number",
                    "operation": "notExists",
                    "singleValue": true
                  },
                  "leftValue": "={{ $('Get record display message data').item.json.id }}",
                  "rightValue": 3
                },
                {
                  "id": "ceef0dfd-2728-41e4-a963-cc03fcf19394",
                  "operator": {
                    "type": "number",
                    "operation": "gte"
                  },
                  "leftValue": "={{ $('Calculate react count').item.json.total_emoji_count }}",
                  "rightValue": 3
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "8def7b4c-1194-4c90-ba8c-13af20c04b00",
          "name": "Need to update react record display",
          "type": "n8n-nodes-base.if",
          "position": [
            720,
            912
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "ae94132f-35e1-45de-b79b-f72e7207d29a",
                  "operator": {
                    "type": "number",
                    "operation": "exists",
                    "singleValue": true
                  },
                  "leftValue": "={{ $('Get record display message data').item.json.id }}",
                  "rightValue": 3
                },
                {
                  "id": "ceef0dfd-2728-41e4-a963-cc03fcf19394",
                  "operator": {
                    "type": "number",
                    "operation": "gte"
                  },
                  "leftValue": "={{ $('Calculate react count').item.json.total_emoji_count }}",
                  "rightValue": 3
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "df7ced2e-f483-4bcd-a75a-fd63fef10364",
          "name": "Need to delete record display",
          "type": "n8n-nodes-base.if",
          "position": [
            720,
            1104
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "ae94132f-35e1-45de-b79b-f72e7207d29a",
                  "operator": {
                    "type": "number",
                    "operation": "exists",
                    "singleValue": true
                  },
                  "leftValue": "={{ $json.id }}",
                  "rightValue": 3
                },
                {
                  "id": "ceef0dfd-2728-41e4-a963-cc03fcf19394",
                  "operator": {
                    "type": "number",
                    "operation": "lt"
                  },
                  "leftValue": "={{ $('Calculate react count').item.json.total_emoji_count }}",
                  "rightValue": 3
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "3fb0361d-0a45-40d8-a611-309ed6649c61",
          "name": "Update record display",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            944,
            912
          ],
          "parameters": {
            "url": "=https://discord.com/api/webhooks/1440624076963053661/7q6m60PW5EtwZbfO6Z4UpJRLfTE6gy0uHirdazJY98k7SsvR2l4lcW7Ea9WCtsZ2u4FH/messages/{{ $('Get record display message data').item.json.post_embed_id }}",
            "method": "PATCH",
            "options": {},
            "jsonBody": "={\n  \"embeds\": [{\n    \"author\": {\n      \"name\": {{ JSON.stringify(String($('Get member data to record react count').item.json.nick ?? $('Get member data to record react count').item.json.user.global_name ?? $('Get member data to record react count').item.json.user.global_name ?? $('Get member data to record react count').item.json.user.username)) }},\n      \"icon_url\": \"{{ $if(typeof $('Get member data to record react count').item.json.avatar==='string', \"https://cdn.discordapp.com/guilds/541782241131495434/users/\"+$('Get message detail for record react count').item.json.author.id+\"/avatars/\"+$('Get member data to record react count').item.json.avatar+\".webp\", \"https://cdn.discordapp.com/avatars/\"+$('Get message detail for record react count').item.json.author.id+\"/\"+$('Get message detail for record react count').item.json.author.avatar+\".webp\") }}\"\n    },\n    {{ $('Calculate react count').item.json.displayable_emojis.length ? '\"description\": \"' + $('Calculate react count').item.json.displayable_emojis + '\"': '' }}\n  }]\n}",
            "sendBody": true,
            "sendHeaders": true,
            "specifyBody": "json",
            "headerParameters": {
              "parameters": [
                {
                  "name": "User-Agent",
                  "value": "pmhbot (+flows.pmh.codes)"
                }
              ]
            }
          },
          "typeVersion": 4.3
        },
        {
          "id": "f1e10fd6-fe82-4d6f-a1fc-d89ac098868b",
          "name": "Display target message",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            944,
            720
          ],
          "parameters": {
            "url": "https://discord.com/api/v10/channels/1440294968697815040/messages",
            "method": "POST",
            "options": {},
            "jsonBody": "={\n  \"message_reference\": {\n    \"type\": 1,\n    \"message_id\": \"{{ $('Normalize data field names').item.json.messageId }}\",\n    \"channel_id\": \"{{ $('Normalize data field names').item.json.channelId }}\",\n    \"guild_id\": \"541782241131495434\"\n  }\n}",
            "sendBody": true,
            "sendHeaders": true,
            "specifyBody": "json",
            "authentication": "predefinedCredentialType",
            "headerParameters": {
              "parameters": [
                {
                  "name": "User-Agent",
                  "value": "pmhbot (+flows.pmh.codes)"
                }
              ]
            },
            "nodeCredentialType": "discordBotApi"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 4.3
        },
        {
          "id": "84845de4-ff23-414e-9089-7d5d527573fc",
          "name": "Send record display",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            1168,
            720
          ],
          "parameters": {
            "url": "https://discord.com/api/webhooks/1440624076963053661/7q6m60PW5EtwZbfO6Z4UpJRLfTE6gy0uHirdazJY98k7SsvR2l4lcW7Ea9WCtsZ2u4FH",
            "method": "POST",
            "options": {},
            "jsonBody": "={\n  \"embeds\": [{\n    \"author\": {\n      \"name\": {{ JSON.stringify(String($('Get member data to record react count').item.json.nick ?? $('Get member data to record react count').item.json.user.global_name ?? $('Get member data to record react count').item.json.user.global_name ?? $('Get member data to record react count').item.json.user.username)) }},\n      \"icon_url\": \"{{ $if(typeof $('Get member data to record react count').item.json.avatar==='string', \"https://cdn.discordapp.com/guilds/541782241131495434/users/\"+$('Get message detail for record react count').item.json.author.id+\"/avatars/\"+$('Get member data to record react count').item.json.avatar+\".webp\", \"https://cdn.discordapp.com/avatars/\"+$('Get message detail for record react count').item.json.author.id+\"/\"+$('Get message detail for record react count').item.json.author.avatar+\".webp\") }}\"\n    },\n    {{ $('Calculate react count').item.json.displayable_emojis.length ? '\"description\": \"' + $('Calculate react count').item.json.displayable_emojis + '\"': '' }}\n  }]\n}",
            "sendBody": true,
            "sendQuery": true,
            "sendHeaders": true,
            "specifyBody": "json",
            "queryParameters": {
              "parameters": [
                {
                  "name": "wait",
                  "value": "true"
                }
              ]
            },
            "headerParameters": {
              "parameters": [
                {
                  "name": "User-Agent",
                  "value": "pmhbot (+flows.pmh.codes)"
                }
              ]
            }
          },
          "typeVersion": 4.3
        },
        {
          "id": "fdf64a63-52de-470e-b6f6-2e8500a58243",
          "name": "Remove target display",
          "type": "n8n-nodes-base.discord",
          "onError": "continueRegularOutput",
          "position": [
            944,
            1104
          ],
          "webhookId": "d0aca160-de41-4262-adc4-ceba416ee535",
          "parameters": {
            "guildId": {
              "__rl": true,
              "mode": "list",
              "value": "541782241131495434",
              "cachedResultUrl": "https://discord.com/channels/541782241131495434",
              "cachedResultName": "박미녁 팬클럽"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "list",
              "value": "1440294968697815040",
              "cachedResultUrl": "https://discord.com/channels/541782241131495434/1440294968697815040",
              "cachedResultName": "quotes"
            },
            "messageId": "={{ $json.post_id }}",
            "operation": "deleteMessage"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "6634cbe6-4028-4fc5-950c-957a8ef4c940",
          "name": "Remove record display",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            1168,
            1104
          ],
          "parameters": {
            "url": "=https://discord.com/api/webhooks/1440624076963053661/7q6m60PW5EtwZbfO6Z4UpJRLfTE6gy0uHirdazJY98k7SsvR2l4lcW7Ea9WCtsZ2u4FH/messages/{{ $('Get record display message data').item.json.post_embed_id }}",
            "method": "DELETE",
            "options": {}
          },
          "typeVersion": 4.3
        },
        {
          "id": "7dfa8cce-0533-4c50-be3f-bd5e9593803a",
          "name": "Remember target and record display ids",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            1392,
            720
          ],
          "parameters": {
            "columns": {
              "value": {
                "post_id": "={{ $('Display target message').item.json.id }}",
                "message_id": "={{ $('Normalize data field names').item.json.messageId }}",
                "post_embed_id": "={{ $json.id }}"
              },
              "schema": [
                {
                  "id": "message_id",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "message_id",
                  "defaultMatch": false
                },
                {
                  "id": "post_id",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "post_id",
                  "defaultMatch": false
                },
                {
                  "id": "post_embed_id",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "post_embed_id",
                  "defaultMatch": false
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "3JPE7nXZSrdq48ay",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/3JPE7nXZSrdq48ay",
              "cachedResultName": "server_emoji_posts"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "b7ddc752-4555-41cd-96bb-e3549adbd7a0",
          "name": "Forget target and record display ids",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            1392,
            1104
          ],
          "parameters": {
            "filters": {
              "conditions": [
                {
                  "keyValue": "={{ $('Need to delete record display').item.json.id }}"
                }
              ]
            },
            "options": {},
            "operation": "deleteRows",
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "3JPE7nXZSrdq48ay",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/3JPE7nXZSrdq48ay",
              "cachedResultName": "server_emoji_posts"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "9bd95f91-5b46-40d9-9e29-5dd3667e6fcb",
          "name": "Get message detail for link shortening",
          "type": "n8n-nodes-base.discord",
          "position": [
            -176,
            1408
          ],
          "webhookId": "c9e5e001-babb-4b06-a60e-8037cd63ff6b",
          "parameters": {
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.guildId }}"
            },
            "options": {},
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.channelId }}"
            },
            "messageId": "={{ $json.messageId }}",
            "operation": "get"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "d2a453d4-42aa-4a58-b688-8e69441844d4",
          "name": "Is there any URL on text content?",
          "type": "n8n-nodes-base.if",
          "position": [
            48,
            1408
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "or",
              "conditions": [
                {
                  "id": "a9a89cfd-8cc9-46d7-89fd-dca83e1ef432",
                  "operator": {
                    "type": "string",
                    "operation": "contains"
                  },
                  "leftValue": "={{ $json.content }}",
                  "rightValue": "https://"
                },
                {
                  "id": "118e9568-87eb-4b79-ab87-8cfc9c772e4c",
                  "operator": {
                    "type": "string",
                    "operation": "contains"
                  },
                  "leftValue": "={{ $json.content }}",
                  "rightValue": "http://"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "6b6dd5cf-bbae-4f85-8c82-1616c5655927",
          "name": "Per link URLs",
          "type": "n8n-nodes-base.splitOut",
          "position": [
            496,
            1408
          ],
          "parameters": {
            "options": {},
            "fieldToSplitOut": "longURL"
          },
          "typeVersion": 1
        },
        {
          "id": "7c5b2d1a-fc34-46cb-8c42-6d956d8f6514",
          "name": "Extract link URLs",
          "type": "n8n-nodes-base.set",
          "position": [
            272,
            1408
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "f351af04-d57a-4b28-bcf0-c3dcd264ee97",
                  "name": "longURL",
                  "type": "array",
                  "value": "={{ $('Get message detail for link shortening').item.json.content.match(/https?:\\/\\/\\S*/g) }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "d2212c80-49a8-448e-a75b-cd449b6fb228",
          "name": "Loop over link items",
          "type": "n8n-nodes-base.splitInBatches",
          "position": [
            720,
            1408
          ],
          "parameters": {
            "options": {}
          },
          "typeVersion": 3
        },
        {
          "id": "91ba990f-508f-4a6a-8ae6-f65f8f011959",
          "name": "Does link mapping already exist?",
          "type": "n8n-nodes-base.if",
          "position": [
            944,
            1360
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "7f67545b-a6fc-4710-af64-f3c8f34645f7",
                  "operator": {
                    "type": "number",
                    "operation": "exists",
                    "singleValue": true
                  },
                  "leftValue": "={{ $json.id }}",
                  "rightValue": ""
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "086ef9f8-368f-4578-9263-6e5f2898f0c4",
          "name": "Generate random characters for short id",
          "type": "n8n-nodes-base.crypto",
          "position": [
            1168,
            1456
          ],
          "parameters": {
            "action": "generate",
            "encodingType": "hex",
            "stringLength": 6,
            "dataPropertyName": "shortId"
          },
          "typeVersion": 1
        },
        {
          "id": "7aaf83da-ab8a-4c32-8745-22cae1f8dd56",
          "name": "Upload HTML document to S3 for redirection",
          "type": "n8n-nodes-base.s3",
          "position": [
            1392,
            1456
          ],
          "parameters": {
            "fileName": "={{ $json.shortId }}",
            "operation": "upload",
            "binaryData": false,
            "bucketName": "a-s",
            "fileContent": "=<meta name=\"color-scheme\" content=\"dark light\" />\n<meta http-equiv=\"refresh\" content=\"0; url={{ $('Per link URLs').item.json.longURL }}\">",
            "additionalFields": {}
          },
          "credentials": {
            "s3": {
              "id": "F0bM40Se192iQKZu",
              "name": "S3 account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "856054a1-ed67-4681-bafa-98933fad5e53",
          "name": "Format output for existing shorten link",
          "type": "n8n-nodes-base.set",
          "position": [
            1840,
            1264
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "2fc0a834-1040-48f0-b0f5-d1687355f49f",
                  "name": "shortURL",
                  "type": "string",
                  "value": "=<https://s.pmh.so/{{ $json.shortId }}> -> <{{ $json.longURL }}>"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "0e79b139-2936-486d-af57-b900c06cbbde",
          "name": "Format output for created shorten link",
          "type": "n8n-nodes-base.set",
          "position": [
            1840,
            1456
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "2fc0a834-1040-48f0-b0f5-d1687355f49f",
                  "name": "shortURL",
                  "type": "string",
                  "value": "=<https://s.pmh.so/{{ $json.shortId }}> -> <{{ $json.longURL }}>"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "8fb31e37-d9a0-4b2f-a8da-24bfc1e7e9be",
          "name": "Merge two shorten workflow",
          "type": "n8n-nodes-base.merge",
          "position": [
            2064,
            1360
          ],
          "parameters": {},
          "typeVersion": 3.2
        },
        {
          "id": "bad57687-72f7-487b-9a87-a5468f459895",
          "name": "Make shorten result array flat",
          "type": "n8n-nodes-base.aggregate",
          "position": [
            2288,
            1360
          ],
          "parameters": {
            "options": {},
            "fieldsToAggregate": {
              "fieldToAggregate": [
                {
                  "fieldToAggregate": "shortURL"
                }
              ]
            }
          },
          "typeVersion": 1
        },
        {
          "id": "243de14c-184d-4590-b9bf-2b57e5f486cd",
          "name": "Make moderation result array flat",
          "type": "n8n-nodes-base.aggregate",
          "position": [
            496,
            272
          ],
          "parameters": {
            "options": {},
            "fieldsToAggregate": {
              "fieldToAggregate": [
                {
                  "renameField": true,
                  "outputFieldName": "results",
                  "fieldToAggregate": "results[0]"
                }
              ]
            }
          },
          "typeVersion": 1
        },
        {
          "id": "b771621f-05ce-4937-b2e2-e01ff41825ff",
          "name": "Send shorten result",
          "type": "n8n-nodes-base.discord",
          "position": [
            2512,
            1360
          ],
          "webhookId": "d9abec7c-b9c8-48a2-b7e6-bdf46e2d7100",
          "parameters": {
            "sendTo": "user",
            "userId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('On React Add').item.json.id }}"
            },
            "content": "=:link: Successfully Shortened!\n\n{{ $json.shortURL.join('\\n') }}",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('On React Add').item.json.guildId }}"
            },
            "options": {},
            "resource": "message"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "bc555480-61ec-4fbd-ad7b-77916c4e0243",
          "name": "Get message detail for file sharing",
          "type": "n8n-nodes-base.discord",
          "position": [
            -176,
            1872
          ],
          "webhookId": "c9e5e001-babb-4b06-a60e-8037cd63ff6b",
          "parameters": {
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.guildId }}"
            },
            "options": {},
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.channelId }}"
            },
            "messageId": "={{ $json.messageId }}",
            "operation": "get"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "40d07f61-7d0d-487e-9b77-dc2f83d1241c",
          "name": "Per attachments",
          "type": "n8n-nodes-base.splitOut",
          "position": [
            272,
            1872
          ],
          "parameters": {
            "options": {},
            "fieldToSplitOut": "attachments"
          },
          "typeVersion": 1
        },
        {
          "id": "e60625c5-0ec1-4082-8912-5427b346cefa",
          "name": "Loop over attachments",
          "type": "n8n-nodes-base.splitInBatches",
          "position": [
            496,
            1872
          ],
          "parameters": {
            "options": {}
          },
          "typeVersion": 3
        },
        {
          "id": "23c7b88a-c546-4389-9949-4626e3372173",
          "name": "Does file link already exist?",
          "type": "n8n-nodes-base.if",
          "position": [
            720,
            1824
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "9a5bb5fc-e658-42aa-bfa9-1e5e1212ccb5",
                  "operator": {
                    "type": "number",
                    "operation": "exists",
                    "singleValue": true
                  },
                  "leftValue": "={{ $json.id }}",
                  "rightValue": ""
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "a1ba3b80-e78e-4a12-94ff-ee2940acd554",
          "name": "Find existing file links",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            720,
            2016
          ],
          "parameters": {
            "filters": {
              "conditions": [
                {
                  "keyName": "attachmentId",
                  "keyValue": "={{ $json.id }}"
                }
              ]
            },
            "operation": "get",
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "nbiHB8hW68mSMEqo",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/nbiHB8hW68mSMEqo",
              "cachedResultName": "server_file_downloads"
            }
          },
          "typeVersion": 1,
          "alwaysOutputData": true
        },
        {
          "id": "9abbf085-4700-4c18-bb18-d883315cb122",
          "name": "Format output for existing file link",
          "type": "n8n-nodes-base.set",
          "position": [
            1840,
            1728
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "2fc0a834-1040-48f0-b0f5-d1687355f49f",
                  "name": "downloadUrl",
                  "type": "string",
                  "value": "=https://s.pmh.so/{{ $json.downloadId }}/{{ $json.fileName }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "0f6c499a-39b1-4153-b04d-214e593a8008",
          "name": "Format output for created file link",
          "type": "n8n-nodes-base.set",
          "position": [
            1840,
            1920
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "2fc0a834-1040-48f0-b0f5-d1687355f49f",
                  "name": "downloadUrl",
                  "type": "string",
                  "value": "=<https://s.pmh.so/{{ $json.downloadId }}/{{ $json.fileName }}>"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "ba61f0ce-9530-411c-bfda-bc8eb0923165",
          "name": "Store shorten link mapping",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            1616,
            1456
          ],
          "parameters": {
            "columns": {
              "value": {
                "longURL": "={{ $('Per link URLs').item.json.longURL }}",
                "shortId": "={{ $('Generate random characters for short id').item.json.shortId }}"
              },
              "schema": [
                {
                  "id": "shortId",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "shortId",
                  "defaultMatch": false
                },
                {
                  "id": "longURL",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "longURL",
                  "defaultMatch": false
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "j969aKICY4iqokmT",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/j969aKICY4iqokmT",
              "cachedResultName": "server_url_shortcuts"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "ff57c5af-af07-4470-8a29-a2f1290fa70e",
          "name": "Store file link mapping",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            1616,
            1920
          ],
          "parameters": {
            "columns": {
              "value": {
                "fileName": "={{ $('Per attachments').item.json.filename }}",
                "downloadId": "={{ $('Generate random characters for link prefix').item.json.downloadId }}",
                "attachmentId": "={{ $('Per attachments').item.json.id }}"
              },
              "schema": [
                {
                  "id": "attachmentId",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "attachmentId",
                  "defaultMatch": false
                },
                {
                  "id": "downloadId",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "downloadId",
                  "defaultMatch": false
                },
                {
                  "id": "fileName",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "readOnly": false,
                  "required": false,
                  "displayName": "fileName",
                  "defaultMatch": false
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "nbiHB8hW68mSMEqo",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/nbiHB8hW68mSMEqo",
              "cachedResultName": "server_file_downloads"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "79782985-c759-493e-a61a-5b497747de1e",
          "name": "Download attachment",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            944,
            1920
          ],
          "parameters": {
            "url": "={{ $('Per attachments').item.json.url }}",
            "options": {
              "response": {
                "response": {
                  "responseFormat": "file"
                }
              }
            }
          },
          "typeVersion": 4.2
        },
        {
          "id": "ec57a540-150d-468b-9f77-985e5d6f5336",
          "name": "Generate random characters for link prefix",
          "type": "n8n-nodes-base.crypto",
          "position": [
            1168,
            1920
          ],
          "parameters": {
            "action": "generate",
            "encodingType": "hex",
            "stringLength": 6,
            "dataPropertyName": "downloadId"
          },
          "typeVersion": 1
        },
        {
          "id": "13f054cb-05bd-4a4e-b1f0-f985590abf18",
          "name": "Upload attachment for share",
          "type": "n8n-nodes-base.s3",
          "position": [
            1392,
            1920
          ],
          "parameters": {
            "fileName": "={{ $json.downloadId }}/{{ $('Per attachments').item.json.filename }}",
            "operation": "upload",
            "bucketName": "a-s",
            "additionalFields": {}
          },
          "credentials": {
            "s3": {
              "id": "F0bM40Se192iQKZu",
              "name": "S3 account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "995aabf0-9834-42f1-8f63-ab8d63ea2632",
          "name": "Merge two file workflow",
          "type": "n8n-nodes-base.merge",
          "position": [
            2064,
            1824
          ],
          "parameters": {},
          "typeVersion": 3.2
        },
        {
          "id": "ffac1264-635c-4562-b9d8-b5a7d879edc0",
          "name": "Make file result array flat",
          "type": "n8n-nodes-base.aggregate",
          "position": [
            2288,
            1824
          ],
          "parameters": {
            "options": {},
            "fieldsToAggregate": {
              "fieldToAggregate": [
                {
                  "fieldToAggregate": "downloadUrl"
                }
              ]
            }
          },
          "typeVersion": 1
        },
        {
          "id": "89e0e1ab-26be-4f17-9d30-a3f0c5dddbd2",
          "name": "Send file result",
          "type": "n8n-nodes-base.discord",
          "position": [
            2512,
            1824
          ],
          "webhookId": "e8862315-b1c3-4ae2-b751-cbfc1011b8cf",
          "parameters": {
            "sendTo": "user",
            "userId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('On React Add').item.json.id }}"
            },
            "content": "=:floppy_disk: Successfully Dumped!\n\n{{ $json.downloadUrl.join('\\n') }}",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('On React Add').item.json.guildId }}"
            },
            "options": {},
            "resource": "message"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "7a903589-77a3-4ec0-98b1-b93b96ede209",
          "name": "Is it warning sign",
          "type": "n8n-nodes-base.if",
          "position": [
            -400,
            2256
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "5f49eb8d-9004-4222-91f8-36617f2e7d65",
                  "operator": {
                    "name": "filter.operator.equals",
                    "type": "string",
                    "operation": "equals"
                  },
                  "leftValue": "={{ $json.emojiId.name }}",
                  "rightValue": "⚠️"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "3445a7ea-041e-4f4a-91bb-2fac039686f8",
          "name": "Get moderation detected record",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            -176,
            2256
          ],
          "parameters": {
            "limit": 1,
            "filters": {
              "conditions": [
                {
                  "keyName": "message_id",
                  "keyValue": "={{ $json.messageId }}"
                }
              ]
            },
            "operation": "get",
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "JAKG2JrbbaZsKj7J",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/JAKG2JrbbaZsKj7J",
              "cachedResultName": "server_moderation_detected"
            }
          },
          "typeVersion": 1.1
        },
        {
          "id": "221855f6-5896-4896-9e95-229ebae79de4",
          "name": "Send moderation detected record",
          "type": "n8n-nodes-base.discord",
          "position": [
            48,
            2256
          ],
          "webhookId": "fbc51a39-664c-4a8f-9a4b-c94c861eb2c5",
          "parameters": {
            "embeds": {
              "values": [
                {
                  "json": "={{ $json.embed_json }}",
                  "inputMethod": "json"
                }
              ]
            },
            "content": "=",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.guild_id }}"
            },
            "options": {
              "message_reference": "={{ $json.message_id }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.channel_id }}"
            }
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "7e48120c-0cc2-43f4-8d92-a2aadbf852c4",
          "name": "Is there any URL?",
          "type": "n8n-nodes-base.if",
          "position": [
            -400,
            -1216
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "or",
              "conditions": [
                {
                  "id": "a9a89cfd-8cc9-46d7-89fd-dca83e1ef432",
                  "operator": {
                    "type": "string",
                    "operation": "contains"
                  },
                  "leftValue": "={{ $json.content }}",
                  "rightValue": "https://"
                },
                {
                  "id": "118e9568-87eb-4b79-ab87-8cfc9c772e4c",
                  "operator": {
                    "type": "string",
                    "operation": "contains"
                  },
                  "leftValue": "={{ $json.content }}",
                  "rightValue": "http://"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "b61982f6-0d4e-4222-a360-c45ec52ea064",
          "name": "Is there any attachment for download?",
          "type": "n8n-nodes-base.if",
          "position": [
            48,
            1872
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "a9a89cfd-8cc9-46d7-89fd-dca83e1ef432",
                  "operator": {
                    "type": "array",
                    "operation": "lengthGt",
                    "rightType": "number"
                  },
                  "leftValue": "={{ $json.attachments }}",
                  "rightValue": 0
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "bd56dc8b-78be-44b1-a5c3-9610eec461ff",
          "name": "Is there any attachment?",
          "type": "n8n-nodes-base.if",
          "position": [
            -400,
            -1024
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "a9a89cfd-8cc9-46d7-89fd-dca83e1ef432",
                  "operator": {
                    "type": "array",
                    "operation": "lengthGt",
                    "rightType": "number"
                  },
                  "leftValue": "={{ $json.attachments }}",
                  "rightValue": 0
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "14a0bf80-ebb5-4216-b20b-25bbf17e4025",
          "name": "Calculator",
          "type": "@n8n/n8n-nodes-langchain.toolCalculator",
          "position": [
            1552,
            -432
          ],
          "parameters": {},
          "typeVersion": 1
        },
        {
          "id": "31a594a3-2dbb-4d66-b5f4-8314a6115948",
          "name": "React checkbox for indicate proceesing",
          "type": "n8n-nodes-base.discord",
          "onError": "continueRegularOutput",
          "position": [
            272,
            -544
          ],
          "webhookId": "0a131da0-183f-4faf-b61b-d1cc1e236fea",
          "parameters": {
            "emoji": "✅",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.guild_id }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.channel_id }}"
            },
            "messageId": "={{ $json.message_id }}",
            "operation": "react"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "6f9f986c-516e-4130-a4b5-c52522996abb",
          "name": "Get channel's recent 30 messages",
          "type": "n8n-nodes-base.discord",
          "position": [
            496,
            -544
          ],
          "webhookId": "2c907431-d8f3-4c14-b4f7-bf91fb4d01d6",
          "parameters": {
            "limit": 30,
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('Edit Fields3').item.json.guild_id }}"
            },
            "options": {},
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('Edit Fields3').item.json.channel_id }}"
            },
            "operation": "getAll"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "4c773e86-6631-42f1-9425-609d655f2f52",
          "name": "Make message array flatten",
          "type": "n8n-nodes-base.aggregate",
          "position": [
            720,
            -544
          ],
          "parameters": {
            "options": {},
            "aggregate": "aggregateAllItemData"
          },
          "typeVersion": 1
        },
        {
          "id": "546399b7-7100-4399-8c43-0cb501651993",
          "name": "AI Agent",
          "type": "@n8n/n8n-nodes-langchain.agent",
          "position": [
            1488,
            -656
          ],
          "parameters": {
            "text": "={{ $('Edit Fields3').item.json.reply_id !== null ?\n`User Referenced Message: id: ${$('Edit Fields3').item.json.reply_id}, written by id: ${$('Edit Fields3').item.json.reply_author}\n` : '' }}\n{{ $('Make message array flatten').item.json.data.map((v) => JSON.stringify({\n\n  i: v.id,\n  u: v.author.id,\n  c: v.content,\n  a: v.attachments.length > 0 ? 1 : 0,\n  e: v.embeds.length > 0 ? 1 : 0\n\n})).reverse().join('\\n') }}",
            "options": {
              "systemMessage": "=사용자로 부터 디스코드 채팅이 들어옴.\n<@&1442408548226301952>, <@1422767895791800372> 는 이 에이전트 본인을 의미함.\n말투는 채팅 말투를 따라갈것.\n\n요청 포멧\ni: 메시지 id\nu: 작성자 id (<@id> 로 언급 가능)\nc: 메시지 본문\na: 첨부파일 있음 (필요한 경우 detail 확인)\ne: 임베드 있음 (필요한 경우 detail 확인)"
            },
            "promptType": "define"
          },
          "typeVersion": 3.1
        },
        {
          "id": "8de58651-08bc-4407-af07-f82a17ccaefc",
          "name": "OpenAI",
          "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
          "position": [
            1168,
            -432
          ],
          "parameters": {
            "model": {
              "__rl": true,
              "mode": "list",
              "value": "gpt-5.5",
              "cachedResultName": "gpt-5.5"
            },
            "options": {
              "textFormat": {
                "textOptions": {
                  "name": "output_scheme",
                  "type": "json_schema",
                  "schema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"content\": {\n      \"type\": \"string\",\n      \"minLength\": 1,\n      \"maxLength\": 200\n    }\n  },\n  \"additionalProperties\": false,\n  \"required\": [\"content\"]\n}",
                  "strict": true,
                  "verbosity": "low"
                }
              },
              "conversationId": "={{ $('Create a conversation').item.json.id }}",
              "reasoningEffort": "low"
            },
            "builtInTools": {
              "webSearch": {
                "searchContextSize": "low"
              },
              "codeInterpreter": true
            }
          },
          "credentials": {
            "openAiApi": {
              "id": "7UH2nMQKOpFVHcne",
              "name": "OpenAi account"
            }
          },
          "typeVersion": 1.3
        },
        {
          "id": "3a257347-633c-45d3-98de-e179d66eea95",
          "name": "Send a message",
          "type": "n8n-nodes-base.discord",
          "position": [
            2368,
            -544
          ],
          "webhookId": "fbc51a39-664c-4a8f-9a4b-c94c861eb2c5",
          "parameters": {
            "content": "={{ $json.output.content }}",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('Edit Fields3').item.json.guild_id }}"
            },
            "options": {
              "message_reference": "={{ $('Edit Fields3').item.json.message_id }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('Edit Fields3').item.json.channel_id }}"
            }
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "3d36a0cd-4b34-4dbe-a1ee-268f9a8d8c77",
          "name": "Message details",
          "type": "n8n-nodes-base.discordTool",
          "position": [
            1680,
            -432
          ],
          "webhookId": "b36512e1-b089-4812-ac45-b9854b2957bd",
          "parameters": {
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('Edit Fields3').item.json.guild_id }}"
            },
            "options": {
              "simplify": false
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('Edit Fields3').item.json.channel_id }}"
            },
            "messageId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message_ID', `message id of message you want to get detailed data`, 'string') }}",
            "operation": "get",
            "descriptionType": "manual",
            "toolDescription": "get detailed json data of user message"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "5744373d-5239-4502-990e-6bce78380a82",
          "name": "Add check mark for response1",
          "type": "n8n-nodes-base.discord",
          "onError": "continueRegularOutput",
          "position": [
            -176,
            2064
          ],
          "webhookId": "c9e5e001-babb-4b06-a60e-8037cd63ff6b",
          "parameters": {
            "emoji": "✅",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.guildId }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.channelId }}"
            },
            "messageId": "={{ $json.messageId }}",
            "operation": "react"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "e3cc13d9-55fc-4eaa-b028-2f735c7d2c54",
          "name": "Add check mark for response2",
          "type": "n8n-nodes-base.discord",
          "onError": "continueRegularOutput",
          "position": [
            -176,
            1152
          ],
          "webhookId": "c9e5e001-babb-4b06-a60e-8037cd63ff6b",
          "parameters": {
            "emoji": "✅",
            "guildId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.guildId }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json.channelId }}"
            },
            "messageId": "={{ $json.messageId }}",
            "operation": "react"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "b02be29e-c808-456e-b619-fddd10c08117",
          "name": "Edit Fields",
          "type": "n8n-nodes-base.set",
          "position": [
            2144,
            -544
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "270ea655-32f9-4ac3-83c9-2f490299b4bd",
                  "name": "output.content",
                  "type": "string",
                  "value": "={{ JSON.parse($json.output).content.replace(/cite.*/g, '') }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "238244dd-ff13-49e5-acb5-cc2138a4088f",
          "name": "Create a conversation",
          "type": "@n8n/n8n-nodes-langchain.openAi",
          "position": [
            944,
            -544
          ],
          "parameters": {
            "options": {},
            "messages": {
              "values": [
                {}
              ]
            },
            "resource": "conversation"
          },
          "credentials": {
            "openAiApi": {
              "id": "7UH2nMQKOpFVHcne",
              "name": "OpenAi account"
            }
          },
          "typeVersion": 2.3
        },
        {
          "id": "e1a6c920-dd6c-4bc6-927d-38ea51834571",
          "name": "Schedule Trigger",
          "type": "n8n-nodes-base.scheduleTrigger",
          "position": [
            -624,
            -224
          ],
          "parameters": {
            "rule": {
              "interval": [
                {
                  "field": "seconds",
                  "secondsInterval": 3
                }
              ]
            }
          },
          "typeVersion": 1.3
        },
        {
          "id": "b878a943-ae1d-4ab5-a1b0-3cf29efaa53d",
          "name": "Get row(s)",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            -400,
            -224
          ],
          "parameters": {
            "operation": "get",
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "8yNY5TCpoxiZGnxp",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/8yNY5TCpoxiZGnxp",
              "cachedResultName": "server_imggen_queue"
            }
          },
          "typeVersion": 1.1
        },
        {
          "id": "44bf5f1d-14e5-4477-afb0-0c219d0414b1",
          "name": "Delete row(s)",
          "type": "n8n-nodes-base.dataTable",
          "position": [
            -176,
            -224
          ],
          "parameters": {
            "filters": {
              "conditions": [
                {
                  "keyValue": "={{ $json.id }}"
                }
              ]
            },
            "options": {},
            "operation": "deleteRows",
            "dataTableId": {
              "__rl": true,
              "mode": "list",
              "value": "8yNY5TCpoxiZGnxp",
              "cachedResultUrl": "/projects/VdWTHGeWawIzl44Y/datatables/8yNY5TCpoxiZGnxp",
              "cachedResultName": "server_imggen_queue"
            }
          },
          "typeVersion": 1.1
        },
        {
          "id": "ef21f4fe-97fe-4733-bbc6-e0f6ff859a47",
          "name": "HTTP Request1",
          "type": "n8n-nodes-base.httpRequest",
          "maxTries": 5,
          "position": [
            944,
            -224
          ],
          "parameters": {
            "url": "https://api.openai.com/v1/responses",
            "method": "POST",
            "options": {},
            "jsonBody": "={\n  \"model\": \"gpt-5.5\",\n  \"input\": [{\n    \"role\": \"user\",\n    \"content\": [\n      {\n        \"type\": \"input_text\",\n        \"text\": {{ JSON.stringify($('Get row(s)').item.json.prompt) }}\n      }\n      {{ $('Edit Fields2').item.json.reference_urls.length > 0 ? ',' : '' }}\n      {{ $('Edit Fields2').item.json.reference_urls.map((v) => JSON.stringify({\n        \"type\": \"input_image\",\n        \"image_url\": v\n      })).join(',') }}\n    ]\n  }],\n  \"conversation\": {{ JSON.stringify($('Get row(s)').item.json.conversation_id) }},\n  \"tool_choice\": {\"type\": \"image_generation\"},\n  \"tools\": [{\"type\": \"image_generation\"}]\n}",
            "sendBody": true,
            "specifyBody": "json",
            "authentication": "predefinedCredentialType",
            "nodeCredentialType": "openAiApi"
          },
          "credentials": {
            "openAiApi": {
              "id": "7UH2nMQKOpFVHcne",
              "name": "OpenAi account"
            }
          },
          "retryOnFail": false,
          "typeVersion": 4.4
        },
        {
          "id": "11103597-4096-412b-97c0-90d6429091b3",
          "name": "React checkbox for indicate image gen",
          "type": "n8n-nodes-base.discord",
          "onError": "continueRegularOutput",
          "position": [
            496,
            -224
          ],
          "webhookId": "0a131da0-183f-4faf-b61b-d1cc1e236fea",
          "parameters": {
            "emoji": "🖼️",
            "guildId": {
              "__rl": true,
              "mode": "list",
              "value": "541782241131495434",
              "cachedResultUrl": "https://discord.com/channels/541782241131495434",
              "cachedResultName": "박미녁 팬클럽"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('Get row(s)').item.json.channel_id }}"
            },
            "messageId": "={{ $('Get row(s)').item.json.message_id }}",
            "operation": "react"
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "99ad3adb-a308-4232-958c-c525f1ce1caf",
          "name": "Convert to File",
          "type": "n8n-nodes-base.convertToFile",
          "position": [
            1392,
            -224
          ],
          "parameters": {
            "options": {},
            "operation": "toBinary",
            "sourceProperty": "result"
          },
          "typeVersion": 1.1
        },
        {
          "id": "4540765c-6abf-4c38-9130-db687caf7521",
          "name": "Send a message1",
          "type": "n8n-nodes-base.discord",
          "position": [
            1616,
            -224
          ],
          "webhookId": "fbc51a39-664c-4a8f-9a4b-c94c861eb2c5",
          "parameters": {
            "files": {
              "values": [
                {}
              ]
            },
            "content": "=",
            "guildId": {
              "__rl": true,
              "mode": "list",
              "value": "541782241131495434",
              "cachedResultUrl": "https://discord.com/channels/541782241131495434",
              "cachedResultName": "박미녁 팬클럽"
            },
            "options": {
              "message_reference": "={{ $('Get row(s)').item.json.message_id }}"
            },
            "resource": "message",
            "channelId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $('Get row(s)').item.json.channel_id }}"
            }
          },
          "credentials": {
            "discordBotApi": {
              "id": "B0p8uR4EFvrkCgML",
              "name": "Discord Bot account"
            }
          },
          "typeVersion": 2
        },
        {
          "id": "f0d3d45c-0292-4ee2-84b2-5542fe3a207a",
          "name": "Generate or Edit image",
          "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
          "position": [
            1808,
            -432
          ],
          "parameters": {
            "workflowId": {
              "__rl": true,
              "mode": "list",
              "value": "uXkcV2VKNiVQVKVm",
              "cachedResultUrl": "/workflow/uXkcV2VKNiVQVKVm",
              "cachedResultName": "Add Gen Image Job Item"
            },
            "description": "Adds item to image generation/Edit job queue. If user requested image generation or edit, use this tool. Result always be \"true\" because this is async job. result will be append later.\n\nFor edit job, write reference image URLs separated with \"|\" (pipe character). (write empty string if not)\n\nAlways mention that this job can be take 1~2 minutes",
            "workflowInputs": {
              "value": {
                "prompt": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('prompt', ``, 'string') }}",
                "channel_id": "={{ $('Edit Fields3').item.json.channel_id }}",
                "message_id": "={{ $('Edit Fields3').item.json.message_id }}",
                "reference_urls": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('reference_urls', `Reference URLs for Edit job`, 'string') }}",
                "conversation_id": "={{ $('Create a conversation').item.json.id }}"
              },
              "schema": [
                {
                  "id": "prompt",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "prompt",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "conversation_id",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "conversation_id",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "channel_id",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "channel_id",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "message_id",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "message_id",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "reference_urls",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "reference_urls",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "04cf305d-2e4a-4349-a948-28dc83e6298f",
          "name": "Edit Fields1",
          "type": "n8n-nodes-base.set",
          "position": [
            1168,
            -224
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "47236201-0b8a-4d58-985a-d1d6aa6eb834",
                  "name": "result",
                  "type": "string",
                  "value": "={{ $json.output.find(v => v.type === \"image_generation_call\").result }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "2eb076d6-baa5-4040-8b76-a9b8a58bcca3",
          "name": "Wait",
          "type": "n8n-nodes-base.wait",
          "position": [
            720,
            -224
          ],
          "webhookId": "19507d5b-c46a-46d3-9973-c8a74a462074",
          "parameters": {},
          "typeVersion": 1.1
        },
        {
          "id": "dd9a5337-a776-4448-a871-7b90241953a1",
          "name": "HTTP Request",
          "type": "n8n-nodes-base.httpRequestTool",
          "position": [
            1936,
            -432
          ],
          "parameters": {
            "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
            "body": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Body', `Write HTTP Request body here (optional)`, 'string') }}",
            "method": "={{ $fromAI('method', 'request HTTP Method', 'string') }}",
            "options": {
              "redirect": {
                "redirect": {}
              },
              "response": {
                "response": {
                  "neverError": true,
                  "fullResponse": true
                }
              }
            },
            "sendBody": true,
            "contentType": "raw",
            "jsonHeaders": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JSON', `Write HTTP Request Header by json format\n\n{\"key\":\"value\"}`, 'json') }}",
            "sendHeaders": true,
            "rawContentType": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Content_Type', `Write HTTP Body Content-Type Header`, 'string') }}",
            "specifyHeaders": "json"
          },
          "typeVersion": 4.4
        },
        {
          "id": "74e8b627-f0d3-4e7f-9e49-3d1cc25a7a3f",
          "name": "Edit Fields2",
          "type": "n8n-nodes-base.set",
          "position": [
            48,
            -224
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "cdc203b0-c8a4-48d5-a668-a586af1c7ae7",
                  "name": "reference_urls",
                  "type": "array",
                  "value": "={{ $json.reference_urls.split('|').filter(v => v.length > 0) }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "adbba3b1-1994-405e-9eb8-b11c20d75cbf",
          "name": "If message is reply of me",
          "type": "n8n-nodes-base.if",
          "position": [
            -400,
            -640
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "fd7f4556-146a-4081-95d5-58d9643e34ea",
                  "operator": {
                    "type": "string",
                    "operation": "equals"
                  },
                  "leftValue": "={{ $json.referenceAuthorId }}",
                  "rightValue": "1422767895791800372"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "7f8e5798-bee1-4f6c-b24a-6cb2bb9762b7",
          "name": "Edit Fields3",
          "type": "n8n-nodes-base.set",
          "position": [
            -176,
            -544
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "077ddeaf-dd34-4d3d-92bc-c7d292b56155",
                  "name": "message_id",
                  "type": "string",
                  "value": "={{ $json.id }}"
                },
                {
                  "id": "1061e489-9e3f-4942-9bfe-36a57e4ca213",
                  "name": "author_id",
                  "type": "string",
                  "value": "={{ $json.authorId }}"
                },
                {
                  "id": "db01d84f-e386-46f4-b1ba-aa244293f618",
                  "name": "reply_id",
                  "type": "string",
                  "value": "={{ $json.referenceId }}"
                },
                {
                  "id": "ad7af17b-792f-49d7-ab05-625e40e8425f",
                  "name": "reply_author",
                  "type": "string",
                  "value": "={{ $json.referenceAuthorId }}"
                },
                {
                  "id": "6be5c747-c294-4ca7-a714-f1cbfd6dca73",
                  "name": "channel_id",
                  "type": "string",
                  "value": "={{ $json.channelId }}"
                },
                {
                  "id": "da327fea-5497-4327-a287-c2e11f582794",
                  "name": "guild_id",
                  "type": "string",
                  "value": "={{ $json.guildId }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "2320dca0-3513-48f0-8d9a-7327f4c1db8d",
          "name": "Execution Data",
          "type": "n8n-nodes-base.executionData",
          "position": [
            48,
            -544
          ],
          "parameters": {
            "dataToSave": {
              "values": [
                {
                  "key": "kind",
                  "value": "agent"
                },
                {
                  "key": "message_id",
                  "value": "={{ $json.message_id }}"
                }
              ]
            }
          },
          "typeVersion": 1.1
        },
        {
          "id": "19ce1f8e-de7a-434e-b0d3-8f78f50e67e1",
          "name": "Execution Data1",
          "type": "n8n-nodes-base.executionData",
          "position": [
            272,
            -224
          ],
          "parameters": {
            "dataToSave": {
              "values": [
                {
                  "key": "kind",
                  "value": "imagegen"
                },
                {
                  "key": "message",
                  "value": "={{ $('Get row(s)').item.json.message_id }}"
                }
              ]
            }
          },
          "typeVersion": 1.1
        }
      ],
      "pinData": {},
      "connections": {
        "Wait": {
          "main": [
            [
              {
                "node": "HTTP Request1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "OpenAI": {
          "ai_languageModel": [
            [
              {
                "node": "AI Agent",
                "type": "ai_languageModel",
                "index": 0
              }
            ]
          ]
        },
        "AI Agent": {
          "main": [
            [
              {
                "node": "Edit Fields",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Wikipedia": {
          "ai_tool": [
            [
              {
                "node": "AI Agent",
                "type": "ai_tool",
                "index": 0
              }
            ]
          ]
        },
        "Calculator": {
          "ai_tool": [
            [
              {
                "node": "AI Agent",
                "type": "ai_tool",
                "index": 0
              }
            ]
          ]
        },
        "Get row(s)": {
          "main": [
            [
              {
                "node": "Delete row(s)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "On Message": {
          "main": [
            [
              {
                "node": "Is there any URL?",
                "type": "main",
                "index": 0
              },
              {
                "node": "Is there any attachment?",
                "type": "main",
                "index": 0
              },
              {
                "node": "Split and lowercase",
                "type": "main",
                "index": 0
              },
              {
                "node": "If message is reply of me",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Date & Time": {
          "ai_tool": [
            [
              {
                "node": "AI Agent",
                "type": "ai_tool",
                "index": 0
              }
            ]
          ]
        },
        "Edit Fields": {
          "main": [
            [
              {
                "node": "Send a message",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Edit Fields1": {
          "main": [
            [
              {
                "node": "Convert to File",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Edit Fields2": {
          "main": [
            [
              {
                "node": "Execution Data1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Edit Fields3": {
          "main": [
            [
              {
                "node": "Execution Data",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "HTTP Request": {
          "ai_tool": [
            [
              {
                "node": "AI Agent",
                "type": "ai_tool",
                "index": 0
              }
            ]
          ]
        },
        "On React Add": {
          "main": [
            [
              {
                "node": "Is it :filesave:",
                "type": "main",
                "index": 0
              },
              {
                "node": "Is it :linkshort:",
                "type": "main",
                "index": 0
              },
              {
                "node": "Normalize data field names",
                "type": "main",
                "index": 0
              },
              {
                "node": "Is it warning sign",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Delete row(s)": {
          "main": [
            [
              {
                "node": "Edit Fields2",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "HTTP Request1": {
          "main": [
            [
              {
                "node": "Edit Fields1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Per link URLs": {
          "main": [
            [
              {
                "node": "Loop over link items",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Execution Data": {
          "main": [
            [
              {
                "node": "React checkbox for indicate proceesing",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "On @gpt called": {
          "main": [
            [
              {
                "node": "Edit Fields3",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Send a message": {
          "main": [
            []
          ]
        },
        "Convert to File": {
          "main": [
            [
              {
                "node": "Send a message1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Execution Data1": {
          "main": [
            [
              {
                "node": "React checkbox for indicate image gen",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Message details": {
          "ai_tool": [
            [
              {
                "node": "AI Agent",
                "type": "ai_tool",
                "index": 0
              }
            ]
          ]
        },
        "On React Remove": {
          "main": [
            [
              {
                "node": "Normalize data field names",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Per attachments": {
          "main": [
            [
              {
                "node": "Loop over attachments",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Send a message1": {
          "main": [
            []
          ]
        },
        "Is it :filesave:": {
          "main": [
            [
              {
                "node": "Get message detail for file sharing",
                "type": "main",
                "index": 0
              },
              {
                "node": "Add check mark for response",
                "type": "main",
                "index": 0
              }
            ],
            []
          ]
        },
        "Schedule Trigger": {
          "main": [
            [
              {
                "node": "Get row(s)",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Extract link URLs": {
          "main": [
            [
              {
                "node": "Per link URLs",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Is it :linkshort:": {
          "main": [
            [
              {
                "node": "Get message detail for link shortening",
                "type": "main",
                "index": 0
              },
              {
                "node": "Add check mark for response2",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Is there any URL?": {
          "main": [
            [
              {
                "node": "React :linkshort:",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Is it warning sign": {
          "main": [
            [
              {
                "node": "Get moderation detected record",
                "type": "main",
                "index": 0
              },
              {
                "node": "Add check mark for response1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Download attachment": {
          "main": [
            [
              {
                "node": "Generate random characters for link prefix",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Is there any \"thx\"?": {
          "main": [
            [
              {
                "node": "Send \"no problem\"",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Send record display": {
          "main": [
            [
              {
                "node": "Remember target and record display ids",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Split and lowercase": {
          "main": [
            [
              {
                "node": "Is there any \"thx\"?",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Loop over link items": {
          "main": [
            [
              {
                "node": "Does link mapping already exist?",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Find existing link mappings",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Per attachement file": {
          "main": [
            [
              {
                "node": "Execute moderation per file",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Calculate react count": {
          "main": [
            [
              {
                "node": "Get record display message data",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Create a conversation": {
          "main": [
            [
              {
                "node": "AI Agent",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "If text content exist": {
          "main": [
            [
              {
                "node": "Execute moderation for text content",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Add dummy moderation result",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Loop over attachments": {
          "main": [
            [
              {
                "node": "Does file link already exist?",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Find existing file links",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "On moderation testing": {
          "main": [
            [
              {
                "node": "If text content exist",
                "type": "main",
                "index": 0
              },
              {
                "node": "Per attachement file",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Remove record display": {
          "main": [
            [
              {
                "node": "Forget target and record display ids",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Remove target display": {
          "main": [
            [
              {
                "node": "Remove record display",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Update record display": {
          "main": [
            []
          ]
        },
        "Display target message": {
          "main": [
            [
              {
                "node": "Send record display",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Generate or Edit image": {
          "ai_tool": [
            [
              {
                "node": "AI Agent",
                "type": "ai_tool",
                "index": 0
              }
            ]
          ]
        },
        "Merge two file workflow": {
          "main": [
            [
              {
                "node": "Make file result array flat",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Store file link mapping": {
          "main": [
            [
              {
                "node": "Format output for created file link",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Find existing file links": {
          "main": [
            [
              {
                "node": "Loop over attachments",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "If moderation not passed": {
          "main": [
            [
              {
                "node": "Write moderation detected record",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Is there any attachment?": {
          "main": [
            [
              {
                "node": "React :filesave:",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Merge moderation results": {
          "main": [
            [
              {
                "node": "Make moderation result array flat",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "If message is reply of me": {
          "main": [
            [
              {
                "node": "Edit Fields3",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Make message array flatten": {
          "main": [
            [
              {
                "node": "Create a conversation",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Merge two shorten workflow": {
          "main": [
            [
              {
                "node": "Make shorten result array flat",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Normalize data field names": {
          "main": [
            [
              {
                "node": "Get message detail for record react count",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Store shorten link mapping": {
          "main": [
            [
              {
                "node": "Format output for created shorten link",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Add dummy moderation result": {
          "main": [
            [
              {
                "node": "Merge moderation results",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Execute moderation per file": {
          "main": [
            [
              {
                "node": "Add moderation result type: image",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Merge moderation results",
                "type": "main",
                "index": 1
              }
            ]
          ]
        },
        "Find existing link mappings": {
          "main": [
            [
              {
                "node": "Loop over link items",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Make file result array flat": {
          "main": [
            [
              {
                "node": "Send file result",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Upload attachment for share": {
          "main": [
            [
              {
                "node": "Store file link mapping",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Does file link already exist?": {
          "main": [
            [
              {
                "node": "Format output for existing file link",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Download attachment",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Need to delete record display": {
          "main": [
            [
              {
                "node": "Remove target display",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get moderation detected record": {
          "main": [
            [
              {
                "node": "Send moderation detected record",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Make shorten result array flat": {
          "main": [
            [
              {
                "node": "Send shorten result",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "React warning emoji for detail": {
          "main": [
            []
          ]
        },
        "Get record display message data": {
          "main": [
            [
              {
                "node": "Need to create new record display",
                "type": "main",
                "index": 0
              },
              {
                "node": "Need to delete record display",
                "type": "main",
                "index": 0
              },
              {
                "node": "Need to update react record display",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Send moderation detected record": {
          "main": [
            []
          ]
        },
        "Does link mapping already exist?": {
          "main": [
            [
              {
                "node": "Format output for existing shorten link",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Generate random characters for short id",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get channel's recent 30 messages": {
          "main": [
            [
              {
                "node": "Make message array flatten",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Write moderation detected record": {
          "main": [
            [
              {
                "node": "React warning emoji for detail",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Add moderation result type: image": {
          "main": [
            [
              {
                "node": "Merge moderation results",
                "type": "main",
                "index": 1
              }
            ]
          ]
        },
        "Is there any URL on text content?": {
          "main": [
            [
              {
                "node": "Extract link URLs",
                "type": "main",
                "index": 0
              }
            ],
            []
          ]
        },
        "Make moderation result array flat": {
          "main": [
            [
              {
                "node": "If moderation not passed",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Need to create new record display": {
          "main": [
            [
              {
                "node": "Display target message",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Add moderation result type: content": {
          "main": [
            [
              {
                "node": "Merge moderation results",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Execute moderation for text content": {
          "main": [
            [
              {
                "node": "Add moderation result type: content",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Format output for created file link": {
          "main": [
            [
              {
                "node": "Merge two file workflow",
                "type": "main",
                "index": 1
              }
            ]
          ]
        },
        "Get message detail for file sharing": {
          "main": [
            [
              {
                "node": "Is there any attachment for download?",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Need to update react record display": {
          "main": [
            [
              {
                "node": "Update record display",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Format output for existing file link": {
          "main": [
            [
              {
                "node": "Merge two file workflow",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get member data to record react count": {
          "main": [
            [
              {
                "node": "Calculate react count",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Is there any attachment for download?": {
          "main": [
            [
              {
                "node": "Per attachments",
                "type": "main",
                "index": 0
              }
            ],
            []
          ]
        },
        "React checkbox for indicate image gen": {
          "main": [
            [
              {
                "node": "Wait",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Format output for created shorten link": {
          "main": [
            [
              {
                "node": "Merge two shorten workflow",
                "type": "main",
                "index": 1
              }
            ]
          ]
        },
        "Get message detail for link shortening": {
          "main": [
            [
              {
                "node": "Is there any URL on text content?",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "React checkbox for indicate proceesing": {
          "main": [
            [
              {
                "node": "Get channel's recent 30 messages",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Format output for existing shorten link": {
          "main": [
            [
              {
                "node": "Merge two shorten workflow",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Generate random characters for short id": {
          "main": [
            [
              {
                "node": "Upload HTML document to S3 for redirection",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get message detail for record react count": {
          "main": [
            [
              {
                "node": "Get member data to record react count",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Generate random characters for link prefix": {
          "main": [
            [
              {
                "node": "Upload attachment for share",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Upload HTML document to S3 for redirection": {
          "main": [
            [
              {
                "node": "Store shorten link mapping",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      }
    }