Google Workspace
How to hat-gate read, write, or comment access on specific Google docs, sheets, or slides
Last updated
How to hat-gate read, write, or comment access on specific Google docs, sheets, or slides
Last updated
To hat-gate read, comment, or write access to specific Google documents, sheets, or slides, you will need to complete the following steps:
Create a Guild role associated with access to the Google Workspace document or use an existing Guild role
Associate that Guild role with one or more Hats
Give that Guild role access to the relevant Google document(s)
If you have not yet set up a Guild, follow these instructions.
Navigate to your existing Guild and select "Add Role". We recommend creating a Guild role with the same name and image as the Hat you want to associated it with.
If you have already created a Guild role that you want to associate with this authority, continue to step 2.
If you have already associated that Guild role with the Hat token ID, you can skip this step.
Within that Guild role, select "Add Requirement"
Then select "NFT"
Next, input the chain your hat is on, add the Hats Protocol contract address, select "Custom ID" under Requirement type, and enter the custom token ID associated with the hat. See Hats Protocol Contract Addresses and Token IDs for details on how to find the Hats Protocol contract address and specific hat token IDs.
Finally, select "Add requirement".
This Guild role is now gated by the hat!
Within the Guild role, select "Add Reward", select "Google Workspace", and follow the instructions to provide Guild with editor access to the appropriate Google document.
Return to Guild, and wait a few seconds for the box below to appear. Once it does, select Gate File and then select the desired access type. Save by clicking Gate file again, and finally click Save once more to save the changes to the Guild role.
That's it, you've now given specific hats special access to a Google Workspace document!
This step will enable the Hats app to automatically detect and display Guild.xyz related authorities in your Hats tree:
Skip this step if your tree's top-hat already includes the relevant Guild(s).
Select "Edit Tree"
Locate and select the tree's top-hat
In the "Hat Basics" section, add the relevant Guilds. A Guild's name can be found in its URL. For example, if the Guild page is https://guild.xyz/hats-protocol, then its name is 'hats-protocol'.
Guild.xyz authorities will now be displayed on the relevant hats: