1Shot API
Power noncustodial stablecoin payments, enterprise workflows, and AI agents via a simple API - Built on MetaMask Smart Wallets and x402
Templates by 1Shot API
Automated range trading with Uniswap V3, Telegram alerts & MetaMask delegation
Simple Range Trading w/ Uniswap V3 This workflow will monitor the price of a token trading pair (default is ETH - USDC) and automatically buy into ETH or sell into USDC based on a price window configured by the user. Additionally, the workflow will notify the user on Telegram before a trade is executed, giving the user 1 minute to cancel the trade before the workflow proceeds. Transaction are executed via MetaMask's Delegation Framework, so trades are fully non-custodial, you retain full control of your assets at all times. Check out the YouTube tutorial for a full walkthrough. Maintain Complete Trading Control with MetaMask Delegations With the MetaMask Delegation Framework, you never relinquish control of your funds to any 3rd party, not even 1Shot API. Furthermore, with this workflow, you have full control of your trading parameters and the assets you trade against. Lastly, by running your own trading setup, you can bypass fees incurred through centralized exchanges or hosted frontends that reduce your profitability. Human-in-the-Loop with Telegram Notifiactions This workflow uses Telegram to send you real-time updates on whats happening with your trades. Specifically, the Telegram human-in-the-loop node is used to give you a change to cancel trades before they happen or immediately approve them. Setup Create a free 1Shot API account, and create an API key. Import the workflow into your n8n portal. Create a credential for the 1Shot API nodes to communicate with your 1Shot API account. Trigger the sub-workflow to generate an Arbitrum server wallet and import all required smart contract methods. Point the 1Shot API nodes at the appropriate smart contract methods in you 1Shot API account. Create a Telegram credential for notifications & input the chatID of your Telegram bot. Set your desired trading price range in the Swap Configs node. Start your trading workflow.
Monetize your private LLM models with x402 & Ollama
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Monetize Your Private LLM Models with x402 and Ollama Self-hosting custom LLMs is becoming more popular and easier with turn-key inferencing tools like Ollama. With Ollama you can host your own proprietary models for customers in a private cloud or on your own hardware. But monetizing custom-trained, propietary models is still a challenge, requiring integrations with payment processors like Stripe, which don't support micropayments for on-demand API consumption. With this free workflow you can quickly monetize your proprietary LLM models with the x402 payment scheme in n8n with 1Shot API. Setup Steps: Authenticate the 1Shot API node against your 1Shot API business account. Point the 1Shot API simulate and execute nodes at the x402-compatible payment token you'd like to receive as payment. Configure the Ollama n8n node in the workflow (with optional authentication) to forward to your Ollama API endpoint and let users query it through an n8n webhook endpoint while paying you directly in your preferred stablecoin (like USDC). Through x402, users and AI agents can pay per-inference, whith no overhead wasted on centralized payment processors. Walkthrough Tutorial Check out the YouTube tutorial for this workflow so see the full end-to-end process.
Create a self-hosted blockchain payment processor with x402 and 1Shot API
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Self-Hosted x402 Facilitator In the x402 payment protocol, a facilitator is a role which helps sellers settle stablecoin payments onchain without dealing with blockchain complexities. This workflow allows you to run your own fully-featured, specification-compliant facilitator in n8n. You might want to do this if you want to accept payments in tokens not supported by existing facilitators or as your own business! Details A facilitator supports three routes: /verify, /settle, and /supported. These routes are all created for you in this workflow with proper error handling and responses. A seller will first hit /verify with their payment details to ensure the payment information is correct. Next they will hit the /settle endpoint with the same payment information to settle the paymet on the blockchain. The /supported endpoint is used to indicate to sellers which blockchains you choose to support in a programatic fashion. Setup Create a 1Shot API account Create 1Shot API wallets for the networks where you wish to facilitate token payments and load them with sufficient gas tokens. Using 1Shot Prompts, import the transferWithAuthorization functions for the tokens you will settle payments for. Import this workflow into n8n and create a credential to link the 1Shot API community node to your 1Shot API business account. Enter the token and network information into the payment token and network configuration nodes indicated by the sticky nodes. Turn on your workflow and settle payments!
Monetize workflows with x402 Payment Protocol and 1Shot API
Monetize Your n8n Workflow with x402 This workflow lets you monetize any n8n workflow with the x402 payment protocol. It uses 1Shot API as the onchain transaction fascilitator role. Check out the tutorial video for a complete walkthrough. Setup Create a free 1Shot API account, then go to the API Keys tab and generate a new API key & secret. Click on one of the 1Shot API nodes and use the API key & secret from step 1 to create a credentail. You'll need you 1Shot API business ID as well which is located in the top right-hand corner of the 1Shot API dashboard. Click on the Payment Token Configs box and enter in the required token information for the x402-compatible tokens you want to accept as payment. Import the x402-compatible tokens you want to accept as payments into your 1Shot API (must be an ERC-20 token with a transferWithAuthorization method) account using the 1Shot Prompts directory. Click on the webhook trigger node and set the route.
Automate USDC balance between wallet and Aave with 1Shot API & Telegram
Automated Savings with 1Shot API and Aave Protocol With the increasing popularity of stablecoins like USDC, its becoming easier to pay for everyday items with crypto thanks to debit cards from issuers like MetaMask. These solutions work by processing payments on traditional payment rails then pulling the stablecoin out of your onchain account to cover the cost of the purchase. One downside is that if a stablecoin like USDC is simply sitting in your onchain account, you are missing out on competitive savings rates offered by decentralized protocols like Aave. Often the APY offered by these onchain lending protocols is much higher than those offered by traditional banks while maintaining a low-risk profile for high-quality assets like USDC or mUSD. Ideally your balance would automatically stay in something like Aave when you don't need it and automatically refill your onchain account used for payments when it gets low. This workflow, powered by 1Shot API, does just that. It also sends you real time Telegram notifications about your account balance and savings every time your account rebalances. Aave Protocol This workflow integrates the Aave lending protocol to generate savings APY on your excess USDC funds on the Base network. When your holdings in your primary Metamask smart account exceed a threshold you set, it will deposit them into the Aave Lending Pool. This results in your account receiving aBasUSDC, a deposit receipt token used to withdraw your savings at a later time. When your account drops below a refill-threshold you set, it will exchange the aBasUSDC back to USDC and put in back into your primary account so that you can spend it. Setup Instructions This workflow will automatically balance your USDC funds on Base network so that you keep funds you aren't using in Aave to earn interest and automatically move funds out of savings back into your wallet when funds get low. Create a free 1Shot API account. Generate an API key & secret and use these to create a credential for the 1Shot API node's. Click the trigger on the subworkflow to automatically import the required smart contract functions and provision a 1Shot API server wallet on Base that will relay your transactions when you are not online. Input the contract method IDs from 1Shot API into the "Savings Config" node. Set your saving thresholds in the "Savings Config" node. Create a Telegram bot and use the bot's API key to generate a credential for the Telegram nodes. Get your chat id with the bot and input it into the "Savings Config" node. Configure your desired schedule in the "Schedule" trigger node (like every 24 hours) Activate the workflow.