Trader d'intervalle Uniswap V3 (version 2)

Avancé

Ceci est unMiscellaneous, Multimodal AIworkflow d'automatisation du domainecontenant 41 nœuds.Utilise principalement des nœuds comme If, Code, Switch, OneShot, Telegram. utilisation Uniswap V3、Telegram 提醒et MetaMask 委托deautomatisation区间交易

Prérequis
  • Token Bot Telegram
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "jV4KrTuSUO48rJbF",
  "meta": {
    "instanceId": "62f017ec8f130d172e2e5f39bbf09515036bfd403dfa60fe06f5ab14b78705d0",
    "templateCredsSetupCompleted": true
  },
  "name": "Uniswap V3 Range Trader (take 2)",
  "tags": [],
  "nodes": [
    {
      "id": "bd963ac7-6b0f-4698-8b3b-d9fa205b5682",
      "name": "Calculer TWAP",
      "type": "n8n-nodes-base.code",
      "position": [
        -2240,
        432
      ],
      "parameters": {
        "jsCode": "// Constants\nconst MaxUint256 = (1n << 256n) - 1n;\nconst Q32 = 1n << 32n;\nconst ZERO = 0n;\nconst ONE = 1n;\n\nfunction mulShift(val, mulBy) {\n  return (val * BigInt(mulBy)) >> 128n;\n}\n\n/**\n * Returns the sqrt ratio as a Q64.96 for the given tick.\n * The sqrt ratio is computed as sqrt(1.0001)^tick\n * @param {number} tick the tick for which to compute the sqrt ratio\n */\nfunction getSqrtRatioAtTick(tick) {\n  if (!Number.isInteger(tick)) throw new Error(\"Tick must be integer\");\n  const MIN_TICK = -887272;\n  const MAX_TICK = 887272;\n\n  if (tick < MIN_TICK || tick > MAX_TICK) throw new Error(\"Tick out of bounds\");\n\n  const absTick = tick < 0 ? -tick : tick;\n\n  let ratio =\n    (absTick & 0x1) != 0\n      ? 0xfffcb933bd6fad37aa2d162d1a594001n\n      : 0x100000000000000000000000000000000n;\n  if ((absTick & 0x2) != 0) ratio = mulShift(ratio, 0xfff97272373d413259a46990580e213an);\n  if ((absTick & 0x4) != 0) ratio = mulShift(ratio, 0xfff2e50f5f656932ef12357cf3c7fdccn);\n  if ((absTick & 0x8) != 0) ratio = mulShift(ratio, 0xffe5caca7e10e4e61c3624eaa0941cd0n);\n  if ((absTick & 0x10) != 0) ratio = mulShift(ratio, 0xffcb9843d60f6159c9db58835c926644n);\n  if ((absTick & 0x20) != 0) ratio = mulShift(ratio, 0xff973b41fa98c081472e6896dfb254c0n);\n  if ((absTick & 0x40) != 0) ratio = mulShift(ratio, 0xff2ea16466c96a3843ec78b326b52861n);\n  if ((absTick & 0x80) != 0) ratio = mulShift(ratio, 0xfe5dee046a99a2a811c461f1969c3053n);\n  if ((absTick & 0x100) != 0) ratio = mulShift(ratio, 0xfcbe86c7900a88aedcffc83b479aa3a4n);\n  if ((absTick & 0x200) != 0) ratio = mulShift(ratio, 0xf987a7253ac413176f2b074cf7815e54n);\n  if ((absTick & 0x400) != 0) ratio = mulShift(ratio, 0xf3392b0822b70005940c7a398e4b70f3n);\n  if ((absTick & 0x800) != 0) ratio = mulShift(ratio, 0xe7159475a2c29b7443b29c7fa6e889d9n);\n  if ((absTick & 0x1000) != 0) ratio = mulShift(ratio, 0xd097f3bdfd2022b8845ad8f792aa5825n);\n  if ((absTick & 0x2000) != 0) ratio = mulShift(ratio, 0xa9f746462d870fdf8a65dc1f90e061e5n);\n  if ((absTick & 0x4000) != 0) ratio = mulShift(ratio, 0x70d869a156d2a1b890bb3df62baf32f7n);\n  if ((absTick & 0x8000) != 0) ratio = mulShift(ratio, 0x31be135f97d08fd981231505542fcfa6n);\n  if ((absTick & 0x10000) != 0) ratio = mulShift(ratio, 0x9aa508b5b7a84e1c677de54f3e99bc9n);\n  if ((absTick & 0x20000) != 0) ratio = mulShift(ratio, 0x5d6af8dedb81196699c329225ee604n);\n  if ((absTick & 0x40000) != 0) ratio = mulShift(ratio, 0x2216e584f5fa1ea926041bedfe98n);\n  if ((absTick & 0x80000) != 0) ratio = mulShift(ratio, 0x48a170391f7dc42444e8fa2n);\n\n  if (tick > 0) {\n    ratio = MaxUint256 / ratio;\n  }\n\n  // back to Q96\n  return ratio % Q32 > 0n ? ratio / Q32 + ONE : ratio / Q32;\n}\n\nfunction getPriceFromSqrtPriceX96(sqrtPriceX96, decimals0, decimals1) {\n  // Ensure input is BigInt\n  const sqrtPrice = BigInt(sqrtPriceX96.toString());\n\n  // (sqrtPriceX96 ^ 2)\n  const numerator = sqrtPrice * sqrtPrice;\n\n  // Denominator = 2^192\n  const denominator = 1n << 192n;\n\n  // Raw price ratio (tokenOut per tokenIn, no decimals adjusted)\n  let ratio = Number(numerator * 10n**18n / denominator) / 1e18; \n  // (we scale by 1e18 to stay precise when converting to Number)\n\n  // Adjust for token decimals\n  const decimalFactor = 10 ** (decimals0 - decimals1);\n  const price = ratio * decimalFactor;\n\n  return price;\n}\n\nconst diffTickCumulative = parseInt($('Fetch Pool TWA Observations').first().json.response[0][0]) - parseInt($('Fetch Pool TWA Observations').first().json.response[0][1]);\nconst diffSecondsPerLIquidityX128 = parseInt($('Fetch Pool TWA Observations').first().json.response[1][0]) - parseInt($('Fetch Pool TWA Observations').first().json.response[1][1]);\nconst secondsBetween = parseInt($('Swap Configs').first().json.secondsAgo);\nconst secondsBetweenX128 = BigInt(secondsBetween) << BigInt(128);\nconst averageTick = parseInt(diffTickCumulative/secondsBetween);\n\n\nconst sqrtTWAPricex96 = getSqrtRatioAtTick(averageTick);\nconst TWAP = getPriceFromSqrtPriceX96(sqrtTWAPricex96, $('Swap Configs').first().json.token0Decimals, $('Swap Configs').first().json.token1Decimals);\nconst TWAL = secondsBetweenX128 / BigInt(diffSecondsPerLIquidityX128);\n\n\n$input.first().json.twap = TWAP; \n$input.first().json.sqrtTWAPriceX96 = sqrtTWAPricex96; \n$input.first().json.twal = TWAL; \n\nreturn $input.all()\n"
      },
      "typeVersion": 2
    },
    {
      "id": "cfffec98-a206-4142-a15e-de7a37e12e4a",
      "name": "Récupérer les observations TWA du pool",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -2464,
        432
      ],
      "parameters": {
        "params": "={\n  \"secondsAgos\": [\"0\",\"{{ $json.secondsAgo }}\"]\n} ",
        "operation": "read",
        "contractMethodId": "98267bd2-13c9-4c27-bc86-ee2389da1025"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4f6c68a7-5a83-4a5c-bf73-44a71ba4478a",
      "name": "Déclencheur programmé",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2912,
        432
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8878368a-aac0-4714-a652-0b6544f192f2",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2864,
        -96
      ],
      "parameters": {
        "width": 800,
        "height": 464,
        "content": "## Swap configs\n\nSince we are using the Uniswap protocol directly, you'll need to set a few parameters in the Swap Configs node. \n\n1. Decide on the amount of USDC to spend to enter ETH, put this in `amountUSDC`. \n2. Set your upper and lower price ranges in `upperPrice` and `lowerPrice`. \n3. Put your wallet address as the `delegator` so that the workflow can execute DCA buys on your behalf. \n4. Set the Telegram chatID for your bot to receive notifications.\n\n### Optional Parameters\nIf you want to change the chain or assets you may have to change these parameters:\n\n1. Set the correct address for the Uniswap [SwapRouter](https://docs.uniswap.org/contracts/v3/reference/deployments/) contract\n2. If you want to trade something besided ETH/USDC, you'll need to set the correct addresses for `token0`, `token1`, `token0Decimals` and `token1Decimals`.\n3. Check the `fee` for the pool you are targeting and make sure it matches. \n4. Edit the slippage percentage to your taste. "
      },
      "typeVersion": 1
    },
    {
      "id": "f6a1753f-8aca-4439-bc9d-c0f3a411e742",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        -352
      ],
      "parameters": {
        "width": 720,
        "height": 400,
        "content": "## Connect to Your 1Shot API Account\n\nCreate an API key and secret in your 1Shot API account and connect your n8n instance by creating a credential. \n\n1. The `Fetch Pool TWA Observactions` should point to the `observe` method on your target trading pool (like this [one](https://app.uniswap.org/explore/pools/base/0xfBB6Eed8e7aa03B138556eeDaF5D271A5E1e43ef)). \n2. The `Get Sell Quote` and `Get Buy Quote` nodes should both point to the `quoteExactInputSingle` on the QuoterV2 contract.\n3. The `Give Approval to Router (Buy)` should call `approve` on USDC.\n4. The `Give Approval to Router (Sell)` should call `approve` on WETH. \n5. The `Sell ETH` and `Buy Eth` nodes should point at the `exactInputSingle` function on the Uniswap SwapRouterV2 contract. \n5. In order to get look up your remaining balance of funds that can be used for DCA purchases, point the `Check New Funds` and `Check Remaining Funds` nodes at the `balanceOf` function on USDC."
      },
      "typeVersion": 1
    },
    {
      "id": "c0fd0bc1-b1d2-4bed-8186-5afe8e0f667c",
      "name": "Configurations d'échange",
      "type": "n8n-nodes-base.code",
      "position": [
        -2688,
        432
      ],
      "parameters": {
        "jsCode": "const amountDCA = 200000; // amount to swap each time\nconst upperPrice = 4600; \nconst lowerPrice = 4500;\nconst delegator = \"0x9fead8b19c044c2f404dac38b925ea16adaa2954\"; // your delegated wallet address.\nconst telegramChatId = 5034284669; // the chat id between you and your Telegram bot\nconst router = \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\"; // the uniswap SwapRouterV2\nconst token0 = \"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1\"; // The pool's token0\nconst token1 = \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\"; // The pool's token1\nconst token0Decimals = 18; // WETH has 18 decimals\nconst token1Decimals = 6; // USDC has 6 decimals\nconst fee = 500; // the fee of your target pool, most pools have a fee of 500\nconst slippage = 0.025 // the amount the price can move by from quote to swap\nconst secondsAgo = 120; // the size of your TWAP window\n\n$input.first().json.amountDCA = amountDCA;\n$input.first().json.upperPrice = upperPrice;\n$input.first().json.lowerPrice = lowerPrice;\n$input.first().json.telegramChatId = telegramChatId;\n$input.first().json.delegator = delegator;\n$input.first().json.router = router;\n$input.first().json.token0 = token0;\n$input.first().json.token0Decimals = token0Decimals;\n$input.first().json.token1 = token1;\n$input.first().json.token1Decimals = token1Decimals;\n$input.first().json.fee = fee;\n$input.first().json.slippage = slippage;\n$input.first().json.secondsAgo = secondsAgo;\n\nreturn $input.all();\n"
      },
      "typeVersion": 2
    },
    {
      "id": "249a6828-7ea8-4baf-9b7b-b19be57d1fe8",
      "name": "Note adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        1216
      ],
      "parameters": {
        "width": 800,
        "content": "## Set up a 1Shot API Wallet & Import Required Methods:\n\nClick the sub-workflow trigger to setup you 1Shot API account with a server wallet and all required smart contract methods needed for range trading."
      },
      "typeVersion": 1
    },
    {
      "id": "326fb0a3-a3f8-4b8d-ab25-76df36b7b05c",
      "name": "Note adhésive5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3104,
        784
      ],
      "parameters": {
        "width": 768,
        "height": 560,
        "content": "## YouTube Tutorial\n\n@[youtube](Hppd04sM4xE)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a6ea7892-1392-42c1-83a6-b0946bc5e1d4",
      "name": "Acheter, vendre ou conserver",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1568,
        432
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Sell ETH",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "0080b3b6-9666-4cae-bb60-a157a3bc31c8",
                    "operator": {
                      "type": "number",
                      "operation": "gt"
                    },
                    "leftValue": "={{ $('Calculate TWAP').item.json.twap }}",
                    "rightValue": "={{ $('Swap Configs').item.json.upperPrice }}"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Buy ETH",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "6bb3a399-cb6e-4d37-a402-867dfb857cf1",
                    "operator": {
                      "type": "number",
                      "operation": "lt"
                    },
                    "leftValue": "={{ $('Calculate TWAP').item.json.twap }}",
                    "rightValue": "={{ $('Swap Configs').item.json.lowerPrice }}"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {},
        "looseTypeValidation": true
      },
      "typeVersion": 3.2
    },
    {
      "id": "56b4b80a-1ea1-447f-904d-5b2a8de618b7",
      "name": "Confirmer l'achat",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -896,
        656
      ],
      "webhookId": "24e7b950-a7a3-4c3b-b0a2-45af4bac4f2f",
      "parameters": {
        "chatId": "={{ $('Swap Configs').item.json.telegramChatId }}",
        "message": "=Purchase {{ parseFloat($json.result.decodedData[0]) / 1e18 }} ETH at ${{ $('Calculate TWAP').item.json.twap }}?",
        "options": {
          "limitWaitTime": {
            "values": {
              "resumeUnit": "minutes"
            }
          }
        },
        "operation": "sendAndWait",
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "Confirm",
              "fieldOptions": {
                "values": [
                  {
                    "option": "yes"
                  },
                  {
                    "option": "no"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "responseType": "customForm"
      },
      "credentials": {
        "telegramApi": {
          "id": "uN6xtW1sUnA0WiMc",
          "name": "@1shotdemobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "36198d4a-3ca6-4b77-ba78-d55e548531e2",
      "name": "Achat annulé",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -448,
        752
      ],
      "webhookId": "c33c27ed-e732-4335-ac10-ebc28527e517",
      "parameters": {
        "text": "Purchase cancelled",
        "chatId": "={{ $('Swap Configs').item.json.telegramChatId }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "uN6xtW1sUnA0WiMc",
          "name": "@1shotdemobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "77f6f92f-878c-4409-b88c-85b28494b493",
      "name": "Acheter ou annuler ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -672,
        656
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f021075c-1415-4cf9-825f-eedc01e0a369",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.data.Confirm }}",
              "rightValue": "no"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7e9043b3-d298-49e5-9dce-fccb6dd903c6",
      "name": "Vérifier les fonds restants",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        0,
        432
      ],
      "parameters": {
        "params": "={\n  \"account\": \"{{ $('Swap Configs').item.json.delegator }}\"\n}",
        "operation": "read",
        "contractMethodId": "bfc44279-e20b-4452-b809-d422134700b3"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7577e612-bcf6-4a4b-b178-125e58188d9d",
      "name": "Confirmer la vente",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -896,
        224
      ],
      "webhookId": "24e7b950-a7a3-4c3b-b0a2-45af4bac4f2f",
      "parameters": {
        "chatId": "={{ $('Swap Configs').item.json.telegramChatId }}",
        "message": "=Purchase {{ parseFloat($json.result.decodedData[0]) / 1e18 }} ETH at ${{ $('Calculate TWAP').item.json.twap }}?",
        "options": {
          "limitWaitTime": {
            "values": {
              "resumeUnit": "minutes"
            }
          }
        },
        "operation": "sendAndWait",
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "Confirm",
              "fieldOptions": {
                "values": [
                  {
                    "option": "yes"
                  },
                  {
                    "option": "no"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "responseType": "customForm"
      },
      "credentials": {
        "telegramApi": {
          "id": "uN6xtW1sUnA0WiMc",
          "name": "@1shotdemobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b0a823d0-d17c-4566-add2-d2d3602e359b",
      "name": "Vendre ou annuler ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -672,
        224
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f021075c-1415-4cf9-825f-eedc01e0a369",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.data.Confirm }}",
              "rightValue": "no"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f9ce9b66-c489-4071-9178-98d70234901d",
      "name": "Vente annulée",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -448,
        336
      ],
      "webhookId": "c33c27ed-e732-4335-ac10-ebc28527e517",
      "parameters": {
        "text": "Purchase cancelled",
        "chatId": "={{ $('Swap Configs').item.json.telegramChatId }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "uN6xtW1sUnA0WiMc",
          "name": "@1shotdemobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c3031a2c-dd9b-4dcb-be1d-fe71cfe15745",
      "name": "Donner l'approbation au routeur (Vente)",
      "type": "n8n-nodes-1shot.oneShotSynch",
      "onError": "continueRegularOutput",
      "position": [
        -448,
        128
      ],
      "parameters": {
        "params": "={\n  \"spender\": \"{{ $('Swap Configs').item.json.router }}\", \n  \"amount\": \"{{ $('Parse Last Trade').item.json.memo.amoutOut }}\"\n} ",
        "operation": "executeAsDelegator",
        "additionalFields": {
          "memo": "=Range Trade Approve for {{ $('Swap Configs').item.json.amountDCA }} {{ $('Swap Configs').item.json.token0 }}"
        },
        "contractMethodId": "fdd46f58-7871-42e8-870a-cd8736b0d8a3",
        "delegatorWalletAddress": "={{ $('Swap Configs').item.json.delegator }}"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7dbf11c3-106e-4592-bb5e-d2f2b4a9c658",
      "name": "Donner l'approbation au routeur (Achat)",
      "type": "n8n-nodes-1shot.oneShotSynch",
      "onError": "continueRegularOutput",
      "position": [
        -448,
        560
      ],
      "parameters": {
        "params": "={\n  \"spender\": \"{{ $('Swap Configs').item.json.router }}\", \n  \"value\": \"{{ $('Swap Configs').item.json.amountDCA }}\"\n} ",
        "operation": "executeAsDelegator",
        "additionalFields": {
          "memo": "=Range Trade Approve for {{ $('Swap Configs').item.json.amountDCA }} {{ $('Swap Configs').item.json.token1 }}"
        },
        "contractMethodId": "e35f72f2-6b5b-43af-9382-60458448f32c",
        "delegatorWalletAddress": "={{ $('Swap Configs').item.json.delegator }}"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "df982398-d661-4352-b944-2f8bcb748108",
      "name": "Acheter ETH",
      "type": "n8n-nodes-1shot.oneShotSynch",
      "onError": "continueRegularOutput",
      "position": [
        -224,
        480
      ],
      "parameters": {
        "params": "={\n\"params\": {\n\"tokenIn\": \"{{ $('Swap Configs').item.json.token1 }}\",\n\"tokenOut\": \"{{ $('Swap Configs').item.json.token0 }}\",\n\"fee\": \"{{ $('Swap Configs').item.json.fee }}\",\n\"recipient\": \"{{ $('Swap Configs').item.json.delegator }}\",\n\"amountIn\": \"{{ $('Swap Configs').item.json.amountDCA }}\",\n\"amountOutMinimum\": \"{{ Math.ceil(parseFloat($('Get Buy Qoute').item.json.result.decodedData[0]) * ( 1 - parseFloat($('Swap Configs').item.json.slippage))) }}\",\n\"sqrtPriceLimitX96\": \"0\"\n}\n}",
        "operation": "executeAsDelegator",
        "additionalFields": {
          "memo": "={\"rangeTrade\": \"buy\", \"amountIn\": {{ $('Swap Configs').item.json.amountDCA }}, \"amoutOut\": {{ $('Get Buy Qoute').item.json.result.decodedData[0] }}, \"TWAP\": {{ $('Calculate TWAP').item.json.twap }}}"
        },
        "contractMethodId": "ba3cf19f-52cf-4104-88e8-d9be40e23fe2",
        "delegatorWalletAddress": "={{ $('Swap Configs').item.json.delegator }}"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fc00c558-1fda-425a-b2d6-011c5e847170",
      "name": "Vendre ETH",
      "type": "n8n-nodes-1shot.oneShotSynch",
      "onError": "continueRegularOutput",
      "position": [
        -224,
        48
      ],
      "parameters": {
        "params": "={\n\"params\": {\n\"tokenIn\": \"{{ $('Swap Configs').item.json.token0 }}\",\n\"tokenOut\": \"{{ $('Swap Configs').item.json.token1 }}\",\n\"fee\": \"{{ $('Swap Configs').item.json.fee }}\",\n\"recipient\": \"{{ $('Swap Configs').item.json.delegator }}\",\n\"amountIn\": \"{{ $('Parse Last Trade').item.json.memo.amoutOut }}\",\n\"amountOutMinimum\": \"{{ Math.ceil(parseFloat($('Get Sell Qoute').item.json.result.decodedData[0]) * ( 1 - parseFloat($('Swap Configs').item.json.slippage))) }}\",\n\"sqrtPriceLimitX96\": \"0\"\n}\n}",
        "operation": "executeAsDelegator",
        "additionalFields": {
          "memo": "={\"rangeTrade\": \"sell\", \"amountIn\": {{ $('Parse Last Trade').item.json.memo.amoutOut }}, \"amoutOut\": {{ $('Get Sell Qoute').item.json.result.decodedData[0] }}, \"TWAP\": {{ $('Calculate TWAP').item.json.twap }}}"
        },
        "contractMethodId": "ba3cf19f-52cf-4104-88e8-d9be40e23fe2",
        "delegatorWalletAddress": "={{ $('Swap Configs').item.json.delegator }}"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "be662cb9-f5f2-4242-8139-3a81a32bdd80",
      "name": "Détails de réussite (Vente)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        224,
        0
      ],
      "webhookId": "4bc3c459-fb40-44e5-a4b6-8565f2e92b62",
      "parameters": {
        "text": "=✅ Swapped `{{ $('Parse Last Trade').item.json.memo.amoutOut }}` `{{ $('Swap Configs').item.json.token0 }}` for `{{ $('Get Sell Qoute').item.json.result.decodedData[0] }}` `{{ $('Swap Configs').item.json.token1 }}`. \n\nThe `{{ $('Swap Configs').item.json.secondsAgo }}` second TWAP was `{{ $('Calculate TWAP').item.json.twap }}`. Your tx hash is `{{ $('Sell ETH').item.json.transactionHash }}`.\n\nYou have `{{ $json.response }}` of token `{{ $('Swap Configs').item.json.token0 }}` left. ",
        "chatId": "={{ $('Swap Configs').item.json.telegramChatId }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "uN6xtW1sUnA0WiMc",
          "name": "@1shotdemobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a46a0307-e7e3-4d64-9425-cfced93bd3ec",
      "name": "Détails de réussite (Achat)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        224,
        432
      ],
      "webhookId": "4bc3c459-fb40-44e5-a4b6-8565f2e92b62",
      "parameters": {
        "text": "=✅ Swapped `{{ $('Swap Configs').item.json.amountDCA }}` `{{ $('Swap Configs').item.json.token0 }}` for `{{ $('Get Buy Qoute').item.json.result.decodedData[0] }}` `{{ $('Swap Configs').item.json.token1 }}`. \n\nThe `{{ $('Swap Configs').item.json.secondsAgo }}` second TWAP was `{{ $('Calculate TWAP').item.json.twap }}`. Your tx hash is `{{ $('Buy ETH').item.json.transactionHash }}`.\n\nYou have `{{ $json.response }}` of token `{{ $('Swap Configs').item.json.token0 }}` left. ",
        "chatId": "={{ $('Swap Configs').item.json.telegramChatId }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "uN6xtW1sUnA0WiMc",
          "name": "@1shotdemobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "39c1bc27-e563-4d9c-839a-cc740d72dc6e",
      "name": "Notification d'échec d'achat",
      "type": "n8n-nodes-base.telegram",
      "position": [
        0,
        656
      ],
      "webhookId": "4bc3c459-fb40-44e5-a4b6-8565f2e92b62",
      "parameters": {
        "text": "=❌ Swap Failed",
        "chatId": "={{ $('Swap Configs').item.json.telegramChatId }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "uN6xtW1sUnA0WiMc",
          "name": "@1shotdemobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3510a402-98e3-439f-b388-83ffd08c89b7",
      "name": "Notification d'échec de vente",
      "type": "n8n-nodes-base.telegram",
      "position": [
        0,
        224
      ],
      "webhookId": "4bc3c459-fb40-44e5-a4b6-8565f2e92b62",
      "parameters": {
        "text": "=❌ Swap Failed",
        "chatId": "={{ $('Swap Configs').item.json.telegramChatId }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "uN6xtW1sUnA0WiMc",
          "name": "@1shotdemobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "167776fb-38c3-43d5-8faf-4cdec052eccd",
      "name": "Vérifier les nouveaux fonds",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        0,
        0
      ],
      "parameters": {
        "params": "={\n  \"account\": \"{{ $('Swap Configs').item.json.delegator }}\"\n}",
        "operation": "read",
        "contractMethodId": "bfc44279-e20b-4452-b809-d422134700b3"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "229c3ea3-0719-439e-bd1c-18efa6709a92",
      "name": "Obtenir un devis d'achat",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -1120,
        656
      ],
      "parameters": {
        "params": "={\n  \"params\": \n    {\n  \"tokenIn\": \"{{ $('Swap Configs').item.json.token1 }}\",\n  \"tokenOut\": \"{{ $('Swap Configs').item.json.token0 }}\",\n  \"amountIn\": \"{{ $('Swap Configs').item.json.amountDCA }}\",\n  \"fee\": \"{{ $('Swap Configs').item.json.fee }}\",\n  \"sqrtPriceLimitX96\": \"0\"\n    }\n} ",
        "operation": "simulate",
        "contractMethodId": "48b96850-aea3-4faf-87d5-4e67f2baee89"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d42e68cf-6315-4ba1-9ac9-9b208c2aef05",
      "name": "Obtenir un devis de vente",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -1120,
        224
      ],
      "parameters": {
        "params": "={\n  \"params\": \n    {\n  \"tokenIn\": \"{{ $('Swap Configs').item.json.token0 }}\",\n  \"tokenOut\": \"{{ $('Swap Configs').item.json.token1 }}\",\n  \"amountIn\": \"{{ $('Parse Last Trade').item.json.memo.amoutOut }}\",\n  \"fee\": \"{{ $('Swap Configs').item.json.fee }}\",\n  \"sqrtPriceLimitX96\": \"0\"\n    }\n} ",
        "operation": "simulate",
        "contractMethodId": "48b96850-aea3-4faf-87d5-4e67f2baee89"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5000be28-4040-4c7e-b65b-7daeaec2da19",
      "name": "Obtenir le type de dernier trade",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -2016,
        432
      ],
      "parameters": {
        "memo": "rangeTrade",
        "status": "Completed",
        "chainId": 42161,
        "pageSize": 1,
        "resource": "transactions",
        "createdAfter": 1757701327,
        "createdBefore": 0
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "76fcda42-9808-4332-8092-28b14de4d0c3",
      "name": "Analyser le dernier trade",
      "type": "n8n-nodes-base.code",
      "position": [
        -1792,
        432
      ],
      "parameters": {
        "jsCode": "try {\n  const memo = JSON.parse($input.first().json.memo)\n  console.log(\"memo:\", memo)\n  $input.first().json.memo = memo; \n} catch {\n  console.log(\"no memo\")\n}\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "1395fd6a-ae0c-481f-bf29-449a5ac3bb79",
      "name": "Ne pas répéter les achats",
      "type": "n8n-nodes-base.if",
      "position": [
        -1344,
        656
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "8f1a4e9c-21d1-499b-8221-318875775842",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.memo.rangeTrade }}",
              "rightValue": "sell"
            },
            {
              "id": "7bee6833-7f7e-442e-aef2-99ccb83e34bb",
              "operator": {
                "type": "object",
                "operation": "notExists",
                "singleValue": true
              },
              "leftValue": "={{ $json.memo }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "a5b4d19e-973b-474b-8e61-bb7147e7fe59",
      "name": "Ne pas répéter les ventes",
      "type": "n8n-nodes-base.if",
      "position": [
        -1344,
        224
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "8f1a4e9c-21d1-499b-8221-318875775842",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.memo.rangeTrade }}",
              "rightValue": "buy"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "055a9f8b-8d73-49fe-bd12-8292c306cd6b",
      "name": "Lister les portefeuilles",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -2000,
        1440
      ],
      "parameters": {
        "chainId": 42161,
        "resource": "wallets"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "98655cd2-a117-4157-aa39-0eb3e4fdbf38",
      "name": "Lors du clic sur 'Exécuter le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -2224,
        1440
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "fd15c4bd-83e7-451c-9571-b76e29341bc0",
      "name": "Assurer les méthodes WETH",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -1104,
        1056
      ],
      "parameters": {
        "chainId": 42161,
        "promptId": "a9bac97d-cf4d-4de0-8523-bad09b6b507d",
        "walletId": "={{ $('Get Wallet ID').item.json.walletId }}",
        "operation": "assureContractMethodsFromPrompt",
        "contractAddress": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "237672b9-330d-4040-bff7-ec4d65923654",
      "name": "Assurer les méthodes USDC",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -1104,
        1440
      ],
      "parameters": {
        "chainId": 42161,
        "promptId": "7d92d5db-99e3-4b1e-9cfe-74e80eeb842b",
        "walletId": "={{ $('Get Wallet ID').item.json.walletId }}",
        "operation": "assureContractMethodsFromPrompt",
        "contractAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a93fcdc6-8c97-4ffb-b2c2-34941a630703",
      "name": "Assurer les méthodes QuoterV2",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -1104,
        1824
      ],
      "parameters": {
        "chainId": 42161,
        "promptId": "e439252a-a9e9-43d8-bec8-f4ce3391c49d",
        "walletId": "={{ $('Get Wallet ID').item.json.walletId }}",
        "operation": "assureContractMethodsFromPrompt",
        "contractAddress": "0x61fFE014bA17989E743c5F6cB21bF9697530B21e"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d8c27145-4ef5-4841-b836-d299054ea3b0",
      "name": "Assurer les méthodes SwapRouter02",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -1104,
        1248
      ],
      "parameters": {
        "chainId": 42161,
        "promptId": "4fa14406-c913-4642-991d-e310ff138a8a",
        "walletId": "={{ $('Get Wallet ID').item.json.walletId }}",
        "operation": "assureContractMethodsFromPrompt",
        "contractAddress": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "acc5304d-a360-4cd7-b0a0-78b94ccb8b8a",
      "name": "Assurer les méthodes du pool ETH/USDC",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -1104,
        1632
      ],
      "parameters": {
        "chainId": 42161,
        "promptId": "9a97c00a-797a-4dc9-9a3f-e32596cf9301",
        "walletId": "={{ $('Get Wallet ID').item.json.walletId }}",
        "operation": "assureContractMethodsFromPrompt",
        "contractAddress": "0xC6962004f452bE9203591991D15f6b388e09E8D0"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "964a4547-2b84-45df-9e55-74b2e7da262b",
      "name": "Si",
      "type": "n8n-nodes-base.if",
      "position": [
        -1776,
        1440
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "b2f25fac-5a5d-4963-b1f6-05c8dfce25a6",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "2b75e779-ea57-487b-a2da-4313a1a290a2",
      "name": "Créer un portefeuille",
      "type": "n8n-nodes-1shot.oneShot",
      "position": [
        -1552,
        1520
      ],
      "parameters": {
        "name": "=\"{{ $today }}\"",
        "chainId": 42161,
        "resource": "wallets",
        "operation": "create",
        "description": "Range Trading Wallet"
      },
      "credentials": {
        "oneShotOAuth2Api": {
          "id": "nkfF9AitCKUCrErK",
          "name": "1Shot account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2490cf18-023a-4453-b5af-b6c525e940f9",
      "name": "Obtenir l'ID du portefeuille",
      "type": "n8n-nodes-base.code",
      "position": [
        -1328,
        1440
      ],
      "parameters": {
        "jsCode": "let walletId; \ntry {\n  walletId = $input.first().json.id;\n} catch {\n  walletId = $input.first().json.id;\n}\n\n$input.first().json.walletId = walletId; \n\nreturn $input.all();"
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3fa4c611-face-44b3-bfe2-1572d517e771",
  "connections": {
    "964a4547-2b84-45df-9e55-74b2e7da262b": {
      "main": [
        [
          {
            "node": "2490cf18-023a-4453-b5af-b6c525e940f9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "2b75e779-ea57-487b-a2da-4313a1a290a2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "df982398-d661-4352-b944-2f8bcb748108": {
      "main": [
        [
          {
            "node": "7e9043b3-d298-49e5-9dce-fccb6dd903c6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "39c1bc27-e563-4d9c-839a-cc740d72dc6e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fc00c558-1fda-425a-b2d6-011c5e847170": {
      "main": [
        [
          {
            "node": "167776fb-38c3-43d5-8faf-4cdec052eccd",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "3510a402-98e3-439f-b388-83ffd08c89b7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "56b4b80a-1ea1-447f-904d-5b2a8de618b7": {
      "main": [
        [
          {
            "node": "77f6f92f-878c-4409-b88c-85b28494b493",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7577e612-bcf6-4a4b-b178-125e58188d9d": {
      "main": [
        [
          {
            "node": "b0a823d0-d17c-4566-add2-d2d3602e359b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "055a9f8b-8d73-49fe-bd12-8292c306cd6b": {
      "main": [
        [
          {
            "node": "964a4547-2b84-45df-9e55-74b2e7da262b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c0fd0bc1-b1d2-4bed-8186-5afe8e0f667c": {
      "main": [
        [
          {
            "node": "cfffec98-a206-4142-a15e-de7a37e12e4a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2b75e779-ea57-487b-a2da-4313a1a290a2": {
      "main": [
        [
          {
            "node": "2490cf18-023a-4453-b5af-b6c525e940f9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "229c3ea3-0719-439e-bd1c-18efa6709a92": {
      "main": [
        [
          {
            "node": "56b4b80a-1ea1-447f-904d-5b2a8de618b7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2490cf18-023a-4453-b5af-b6c525e940f9": {
      "main": [
        [
          {
            "node": "fd15c4bd-83e7-451c-9571-b76e29341bc0",
            "type": "main",
            "index": 0
          },
          {
            "node": "d8c27145-4ef5-4841-b836-d299054ea3b0",
            "type": "main",
            "index": 0
          },
          {
            "node": "237672b9-330d-4040-bff7-ec4d65923654",
            "type": "main",
            "index": 0
          },
          {
            "node": "acc5304d-a360-4cd7-b0a0-78b94ccb8b8a",
            "type": "main",
            "index": 0
          },
          {
            "node": "a93fcdc6-8c97-4ffb-b2c2-34941a630703",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "77f6f92f-878c-4409-b88c-85b28494b493": {
      "main": [
        [
          {
            "node": "7dbf11c3-106e-4592-bb5e-d2f2b4a9c658",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "36198d4a-3ca6-4b77-ba78-d55e548531e2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bd963ac7-6b0f-4698-8b3b-d9fa205b5682": {
      "main": [
        [
          {
            "node": "5000be28-4040-4c7e-b65b-7daeaec2da19",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d42e68cf-6315-4ba1-9ac9-9b208c2aef05": {
      "main": [
        [
          {
            "node": "7577e612-bcf6-4a4b-b178-125e58188d9d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "167776fb-38c3-43d5-8faf-4cdec052eccd": {
      "main": [
        [
          {
            "node": "be662cb9-f5f2-4242-8139-3a81a32bdd80",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b0a823d0-d17c-4566-add2-d2d3602e359b": {
      "main": [
        [
          {
            "node": "c3031a2c-dd9b-4dcb-be1d-fe71cfe15745",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "f9ce9b66-c489-4071-9178-98d70234901d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "76fcda42-9808-4332-8092-28b14de4d0c3": {
      "main": [
        [
          {
            "node": "a6ea7892-1392-42c1-83a6-b0946bc5e1d4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4f6c68a7-5a83-4a5c-bf73-44a71ba4478a": {
      "main": [
        [
          {
            "node": "c0fd0bc1-b1d2-4bed-8186-5afe8e0f667c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a6ea7892-1392-42c1-83a6-b0946bc5e1d4": {
      "main": [
        [
          {
            "node": "a5b4d19e-973b-474b-8e61-bb7147e7fe59",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "1395fd6a-ae0c-481f-bf29-449a5ac3bb79",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1395fd6a-ae0c-481f-bf29-449a5ac3bb79": {
      "main": [
        [
          {
            "node": "229c3ea3-0719-439e-bd1c-18efa6709a92",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a5b4d19e-973b-474b-8e61-bb7147e7fe59": {
      "main": [
        [
          {
            "node": "d42e68cf-6315-4ba1-9ac9-9b208c2aef05",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "237672b9-330d-4040-bff7-ec4d65923654": {
      "main": [
        []
      ]
    },
    "fd15c4bd-83e7-451c-9571-b76e29341bc0": {
      "main": [
        []
      ]
    },
    "5000be28-4040-4c7e-b65b-7daeaec2da19": {
      "main": [
        [
          {
            "node": "76fcda42-9808-4332-8092-28b14de4d0c3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7e9043b3-d298-49e5-9dce-fccb6dd903c6": {
      "main": [
        [
          {
            "node": "a46a0307-e7e3-4d64-9425-cfced93bd3ec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a93fcdc6-8c97-4ffb-b2c2-34941a630703": {
      "main": [
        []
      ]
    },
    "cfffec98-a206-4142-a15e-de7a37e12e4a": {
      "main": [
        [
          {
            "node": "bd963ac7-6b0f-4698-8b3b-d9fa205b5682",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "acc5304d-a360-4cd7-b0a0-78b94ccb8b8a": {
      "main": [
        []
      ]
    },
    "7dbf11c3-106e-4592-bb5e-d2f2b4a9c658": {
      "main": [
        [
          {
            "node": "df982398-d661-4352-b944-2f8bcb748108",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "39c1bc27-e563-4d9c-839a-cc740d72dc6e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c3031a2c-dd9b-4dcb-be1d-fe71cfe15745": {
      "main": [
        [
          {
            "node": "fc00c558-1fda-425a-b2d6-011c5e847170",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "3510a402-98e3-439f-b388-83ffd08c89b7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "98655cd2-a117-4157-aa39-0eb3e4fdbf38": {
      "main": [
        [
          {
            "node": "055a9f8b-8d73-49fe-bd12-8292c306cd6b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Divers, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds41
Catégorie2
Types de nœuds9
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
1Shot API

1Shot API

@oneshotapi

1Shot API lets you bring onchain actions into your n8n workflows.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34