The Moralis nft-gating model takes user information and creates an “NFTList” and generates a JSON from it. My question is: Is it possible to send the NFTList or JSON information to google sheets, for example? How can I do this?
export async function getServerSideProps(context) {
const session = await getSession(context);
if (!session) {
return {
redirect: {
destination: '/signin',
permanent: false,
},
};
}
await Moralis.start({ apiKey: process.env.MORALIS_API_KEY });
const nftList = await Moralis.EvmApi.account.getNFTsForContract({
address: session.user.address,
tokenAddress: 'xxx',
chain: 80001 // defualt 1 (ETH)
});
return {
props: {
message:
nftList.raw.total > 0 ? 'Nice! You have our NFT' : "Sorry, you don't have our NFT",
nftList: nftList.raw.result
},
};
}
On return it generates a JSON:
<pre>{JSON.stringify(nftList, null, 2)}</pre>
Is it possible to use either of these two to send to a google sheets?