Customize the AI Copilot Mod Template to build your own writing assist tool! You can do it in three easy steps.
Before you can customize, you'll need to get the template in an editable format.
In the Page Editor, click the three dot menu next to the activated template. In the menu, select Make a Copy
You might be asked to create an alias if this is your first time copying a mod.
Optional: You can change the Mod ID, Name, and Description fields in the modal that appears
Columns should have Goal and Description. You're welcome to copy and use this Google Sheet template.
Goals will be the common writing edits you’d make to the text you’re drafting, and the description will be the detailed prompt you want to run to the selected text.
We don’t need to filter by specific prompts vs actions in this case. We just want to return each row. So go ahead and turn off the toggle on Filter Rows, and delete the second Lookup from Google Sheets brick (we called that one Fetch actions).
Since we’re customizing the AI Copilot, we have a few additional elements that we don’t need in here. Let’s clean them up so we don’t have any errors or unnecessary bricks running.
You can remove:
To delete the elements, click them and then click the trash can icon.
Now, you’ll need to update the list to reflect the prompts from our Google Sheet and not the previously used actions from another Google Sheet brick. You could do this a couple of ways.
OR
I’ll probably do the first one, but it’s up to you.
One more change - regardless of if you chose 1 or 2… you’ll need to click the button in the Preview Panel and then change the Button Label from @action.Title to @action.Goal.
As a style change, you may also want to click AI Copilot and change the text to something like Writer Assist. This won’t change the functionality of the mod, just the text that is displayed at the top of the sidebar!
You’ll need to make one final change for this mod to work as a full time writing assistant. Click the Create Chat response with ChatGPT brick and check your prompt. You probably want to rewrite your system prompt to be more clear that this is a writing assistant tool.
You’ll also want to check your user prompt and change {{@action.Prompt}} to {{@action.Description}} or whatever you’ve named the column of your spreadsheet that contains your prompt.
The last step is save your mod. PixieBrix will keep unsaved changes in the Page Editor, but for the changes to take affect when using the mod, you'll need to save. Click the save icon next to your mod to save the changes.
Now try your mod. Select some text on any page, such as an email you’re drafting in Gmail, or even some text on this page.
Open the PixieBrix Sidebar by clicking the PixieBrix icon in your Chrome Extensions and choose the Writing Assist mod. You’ll see buttons for each row in your spreadsheet. Click a button to see a new tab showing you the rewritten text with your chosen edit.
In most cases, you’ll want to take the newly edited text and copy it to your clipboard so you can use it in your webpage. While you can highlight the text in the sidebar and then copy it, it’s easier to add a button.
Go to the final Render Document brick.
Click the three-dot menu on the innermost element that has the output from ChatGPT’s response. Click “Button” to add a button element.
Click the new button that appears and change the Button Label to Copy to Clipboard.
Next, click the + button below “Button” at the bottom of the Brick Actions Pipeline.
Select the Copy to Clipboard brick. Set the Content field value to the same value as the text response in the Render Document. It should be @chatgptOutput.choices[0].message.content
Now when you get a response with edited text, you’ll be able to add it to your clipboard so you can paste it into the tool you’re writing in.
If you find yourself commonly doing this in a specific website or type of field, you might choose to use the Set Input Value brick instead and inject the text on the page automatically.
Happy building! 🧱 If you need any help, head to the PixieBrix Slack Community.