Updating NFTs

Airtable Automation for Updated Record

Let's start by adding a "Points" column to your Airtable base. For this example, it will be the only attribute on your NFT that we can update whenever one of our users does an action we want to reward.

We can now create an Airtable Automation whose trigger is When record updated and watch for the Points column.

Updating the NFT

Once we have the updated record, we can take the mint address and points from the record and pass it into our script action.

Here is an example script that you can copy-paste into Airtable.

curl --location --request PATCH 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts/1' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "attributes": {
        "points": "40000"
    }
}'

Now whenever you update the Points column within Airtable, the changes will automatically be reflected on the corresponding NFT.

Last updated