Ultimate guide to finding NFTs through ChatGPT on Ethereum with QuickNode

Ultimate guide to finding NFTs through ChatGPT on Ethereum with QuickNode

In the era of AI, ChatGPT has become a game-changer for individuals and enterprises by harnessing a combination of various services. That's why QuickNode aims to alleviate the hassle of searching for NFTs within your personal wallet and collection.
Here is the result of what you will achieve at the end of this tutorial:

ChatGPT QuickNode Ethereum GPT

What We Will Do

What You Will Need

Obtaining information from QuickNode

Obtaining QUICKNODE_RPC_URL value:

Click on the "Create Endpoint" button.

Screenshot of the QuickNode platform for creating your RPC endpoint

We need to select the Ethereum blockchain.

Screenshot of the QuickNode platform to select the desired blockchain to obtain our RPC

In my case I selected Ethereum Mainnet.

Screenshot of the QuickNode platform to select the desired version of the blockchain

After that, activate the Token and NFT API v2 bundle add-on and click on the button "Create endpoint".

QuickNode marketplace products

Finally we get the QUICKNODE_RPC_URL.

QuickNode endpoint

After that ,we need to go to Render.

Creating a service to retrieve information for our ChatGPT action.

You need to go to Render:

Dashboard on Render

Afterward, you need to click on "New". In the subsequent steps, you will need to click on the "Web Service" option.

You will see this dashboard:

Dashboard from render.com to obtain the code from the bot, and subsequently, perform the necessary configuration tasks

In the Public Git Repository section, you can find a white box where you need to paste this code and click on the "Continue" button:
https://github.com/irwingtello/QuickNodeGPTEthereum

Configuring environment variables on render.com

You need to change these values:

  • In Name, you need to write a name for the service.

  • In Build Command, you need to write the next command "npm install".

Furthermore, you need to select a plan to host your service.

Render.com plans

After defining the above values, we need to scroll down and click on the "Advanced" button. Consequently, search for the "Secret file" button and click on it.

.env variables from Render.com

You need to add the following environment variables:

QUICKNODE_RPC_URL='Your RPC URL'
CONTRACTS='[""]'
COLLECTION=''
#This is an example of how the contracts variable looks
#TOKENS='[""]'
#CONTRACTS='["0x2106c00ac7da0a3430ae667879139e832307aeaa","0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85"]'
#This is an example of how the tokens variable looks
#TOKENS='["1", "3"]'
#This is an example of how the collection variable looks
#COLLECTION='0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'

.env variables neccesary to run our QuickNodeGPT code from Render.com

After that, click on "Save", and then press the "Create Web Service" button located at the end of the page.

Deploying bot service on render.com

Finally, we need to copy the service URL. In my case, this is the URL:
https://quicknodegptethereum.onrender.com

Wow! Now you need some magic touches to have your Web3 assistant!

Creating our first ChatGPT action

First you need to go to "Explore GPTs".

Creating our ChatGPT action

After that, you will see this screen. Please click on the "Create" button.

ChatGPT store

You will see the dashboard for creating your GPT action.

GPT Dashboard

We need to fill out the Name, Description, and Instructions fields.
In the Instructions field, you should include these special instructions:

When a user requests a search for NFTs, we will display the associated images and metadata.
1.- If the user requests more results, we will automatically increment the page number (starting from page 2 and beyond) while indicating the current page being searched at the top of the results.
2.- We will always display up to 5 results per page.
3.- If the user wants to specify specific contracts for the search, please provide the contract addresses in the following format:
- For a single contract: ["0x2106c00ac7da0a3430ae667879139e832307aeaa"]
- For multiple contracts, use this structure: ["0x2106c00ac7da0a3430ae667879139e832307aeaa", "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85"]

First step is to fill in information about your QuickNodeChatGPT Ethereum

Afterward, please scroll down and select the "Code interpreter" checkbox, then click the "Create new action" button.

ChatGPT configure section

You will see this page:

ChatGPT actions section

In consequence you need to fill the schema with this code:
Note: Please replace the text "your-service-url" with your service URL.

{
  "openapi": "3.1.0",
  "info": {
    "title": "NFT Information",
    "description": "This API retrieves information about NFTs",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "your-service-url/api"
    }
  ],
  "paths": {
    "/fetch/": {
      "post": {
        "description": "Search NFTs in a wallet",
        "operationId": "search_nfts_wallet",
        "parameters": [],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "Wallet addresses"
                  },
                  "page": {
                    "type": "integer",
                    "description": "Page Number"
                  },
                  "perPage": {
                    "type": "integer",
                    "description": "Number of items per page"
                  },
                  "contracts": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "List of Ethereum smart contract addresses"
                    }
                  }
                },
                "required": [
                  "wallet",
                  "perPage"
                ]
              }
            }
          }
        }
      }
    },
    "/infoCollection/": {
      "post": {
        "description": "Search NFTs in a collection",
        "operationId": "search_nfts_collection",
        "parameters": [],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "collection": {
                    "type": "string",
                    "description": "Collection addresses"
                  },
                  "page": {
                    "type": "integer",
                    "description": "Page Number"
                  },
                  "perPage": {
                    "type": "integer",
                    "description": "Number of items per page"
                  },
                  "tokens": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "List of tokens related to the collection"
                    }
                  }
                },
                "required": [
                  "collection",
                  "perPage"
                ]
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {}
  }
}

The ChatGPT action is filled with the schema to search for NFTs.

Now you can see the actions created!.
Note: To release your GPT to your community, you need to fill out your privacy policy.

Actions created to search nfts related with our service on QuickNode

Finally you can deliver your gpt!, click on the "Save" button located on the top corner.

ChatGPT QuickNode action

Now your community can access your action!

QuickNode GPT Action related with Ethereum released

Searching NFTS from your wallet on ChatGPT with QuickNode.

Now you can search nfts with easy!,like this example:

Interacting with our QuickNodeEthereum GPT

Behind the scenes, this is how the transaction is processed:

QuickNode gpt action values related to search nfts

After knowing how it works, let's see the magic

ChatGPT QuickNode Ethereum GPT

If you want more results, you can ask in the following manner:

Interacting with more results using ChatGPT QuickNode Ethereum GPT.

Searching NFTS from specific collection on ChatGPT with QuickNode.

If you want to your community to search nfts from your specific collection,you can do this,first go to Render.

After that,please select your service:

QuickNode Ethereum GPT service deployed

In consequence, click the environment section.

QuickNodeEthereum GPT service deployed

After that, click on the eye icon in the secret files section to display your variables.

Render.com secret files section variables

In addition, replace the collection variable with your collection address and click the "Done" button. After clicking the "Done" button, click the "Save changes" button in the same section.

Render.com secret files section variables with the new content

Now, you'll need to wait until the deployment is live

Finally you can query your collection on your gpt!

Querying QuickNode GPT Ethereum

Conclusion

Congratulations! You have successfully created your actions on GPT to search NFTs from Ethereum using a collection and searching NFTs from your wallet.

I'd love to encourage you to explore expanding its functionality. After all, it's the little steps that set big things in motion 🚀.

We ❤️ Feedback!

If you have any feedback or questions on this guide, let us know.
Or, feel free to reach out to us via Twitter or our Discord community server.

We’d love to hear from you!

Author: Irwing Tello

Discord: discord.com/invite/ADjtsHVreT

Twitter: twitter.com/irwingtello

LinkedIn: linkedin.com/in/irwingtello

Email:

Website: dfhcommunity.com

Youtube: youtube.com/@irwingtellomx

You can support my work here:

buymeacoffee.com/irwingtello

BTC: 34kXK9CpTJP1PyHKw2kUD2bt6rtGcG5CHY

EVM Address: 0x8B98F8Ff69d2A720120eD6C71A9Bc5072b8Eb46D

Solana: Ey9oVFHW79giacRZaKxigYjeihMsY7ox8jxc7Hp1sJmS

Did you find this article valuable?

Support Irwing Tello by becoming a sponsor. Any amount is appreciated!