PixieBrix Docs
CommunityTemplates
  • Welcome to PixieBrix!
  • Quick Start
    • Productivity Enthusiasts
    • Mod Developer
    • Team Member
    • Enterprise Admin
  • Activating Mods
    • Linking Your PixieBrix Account
    • Using the Marketplace
      • Finding Mods
      • Activating From the Marketplace
    • Activating Your Assigned Mods
    • Updating Mods
    • Troubleshooting
  • Developing Mods
    • Building Your First Mod
    • Developer Concepts
      • Types of Mods
        • Context Menu Item
        • Button
          • Troubleshooting Buttons
        • Sidebar Panel
        • Trigger
          • Working with Custom Events
        • Quick Bar Action
        • AI Copilot
        • What Are URL Match Patterns?
      • Text Template Guide
        • Basic Text Templates
        • Transforming Data with Filters
        • Writing Conditional Statements
        • Template Examples
      • Using Bricks
        • Brick Input Data Types
        • Bricks for Scraping Data
          • Retrieving Attributes from Elements
        • Bricks for Interacting with the DOM
        • Bricks for AI
          • Passing Custom Data to an LLM
      • Data Context
        • Types of Variables
        • Using Mod Variables
        • Using Page State (Advanced)
        • Referencing Variables
      • User Input
        • Show a Modal or Sidebar Form
        • Prompt for Input
      • Working With APIs
        • API Providers
        • Encoding URL Parts
        • Selecting and Transforming API Results
      • Working with Markdown
      • Control Flow
        • Conditional Field on Bricks
        • Control Flow Bricks
          • When to Use Control Flow Bricks
          • Control Flow Brick Output
          • Raising Exceptions/Errors
          • FAQs
      • Transforming Data
        • Using JQ in PixieBrix
        • Using JavaScript in PixieBrix
      • Building Interfaces
        • Understanding the Preview Panel
        • Styling Elements
        • Adding Advanced Elements
        • Custom Themes/CSS
      • Mod Product Telemetry
      • Advanced: Brick Runtime
    • Customizing Existing Mods
    • Sharing Mods
      • Packaging a Mod
      • Exposing Activation-Time Mod Options
      • Sharing a Mod With Your Team
      • Updating Published Mods
    • Troubleshooting
    • Mod Development Best Practices
    • Advanced: Workshop
  • Platform Overview
    • Page Editor
      • Open the Page Editor
      • Page Editor Components
        • Mod Listing Panel
        • Brick Actions Panel
        • Brick Configuration Panel
        • Data Panel
    • Admin Console
      • Campaigns
    • Extension Console
  • Managing Teams
    • Creating a Team
    • Inviting Members
    • Access Control
      • Roles
      • Groups
    • Managing Team Integrations
    • Assigning Mods
    • Billing
    • Advanced: Isolating Development, Test, and Production Environments
  • Deploying Mods
    • Deployment Keys
  • Integrations
    • Configuring Integrations
    • Integration Scenarios
    • Embed Web Apps via IFrames
    • Integrate with Desktop Apps via Custom URL Schemes
    • Airtable
    • Atlassian
    • Automation Anywhere
      • Configure Automation Anywhere Integration in PixieBrix
      • Embedding the Automation Co-Pilot
      • Running AA Bots via Control Room
      • Creating AARI Requests
      • Enhancing AARI Table Fields
      • Enhancing AARI Forms
      • AARI Extensions Enterprise IT Setup Guide
        • Point PixieBrix Extension to Staging AuthConfig App
      • Create a Control Room Certificate on Windows
    • Deepgram
    • Google Drive
      • Creating Google Drive Integration
      • Google Drive Bricks
      • Migrating from Google Sheet to Google Drive Integration
      • Reactivating Your Google Sheet Mods
      • Troubleshooting Google Integration Errors
      • Sheety: Sharing Google Sheets without Google Workspace
      • [LEGACY] Configure Google Sheets Integration
      • [LEGACY] Adding a Google Sheet to Mod Input
    • Guru
    • Hunter.io
    • HTTP Basic Authentication
    • Microsoft
      • Connect to Custom Azure Applications/APIs
      • Add a Power BI chart to the Sidebar
      • Microsoft Power Automate
      • Microsoft Office
        • Microsoft OneDrive / Files
        • Microsoft Excel
        • Microsoft Sharepoint
        • Microsoft Teams
        • FAQs & Troubleshooting
    • Notion
      • Public (OAuth2)
      • Internal (API Token)
    • OAuth2 Client Credentials
    • Ollama
    • OpenAI/ChatGPT
    • Pipedrive
    • Retool
      • Embed a Retool App
      • Trigger Retool Workflows
    • Robocorp Control Room Integration
    • Salesforce
    • SerpAPI
    • ServiceNow
    • Slack
    • Streamlit
    • Trello
      • Configure Trello integration
      • Find board and list IDs in Trello
    • UiPath
      • Running unattended bots via UiPath Cloud Orchestrator
      • Embed a UiPath App
      • Running local bots via UiPath Assistant
    • Val Town
    • Zapier
    • Zendesk
    • Advanced: Custom Integrations
  • Storing Data with Team Databases
  • Enterprise IT Setup
    • Authentication
      • Enabling Login with Microsoft
      • Enabling Login with Google
      • Setting Up SAML/SSO
    • Browser Extension Installation and Configuration
      • Browser Extension Installation Policy
        • Google Workspace Policy
        • Windows Group Policy/ADMX
        • Windows Registry
        • Citrix Profile Configuration
        • Advanced: Create a Windows Installer EXE
      • Browser Extension Configuration Policy
        • Extension Authentication Configuration
        • Microsoft Edge Mini Menu Configuration
        • Microphone and Audio Capture Configuration
        • Extension Logo Configuration
        • Managed Storage Schema
      • Browser Extension Security
    • Network/Email Firewall Configuration
    • Custom Branding and Themes
    • Security and Compliance
    • Performance
    • Version Control and Backups
    • Web Application Platform Configuration
    • Enterprise Troubleshooting
  • Developer API
    • Service Accounts
    • Making an API Request
    • Team Management APIs
    • Package Management APIs
    • Deployment APIs
    • Database APIs
    • Health Check APIs
    • OpenAPI Specification
    • Deprecated Resources
  • How To
    • Installing the PixieBrix Chrome Browser Extension
    • Changing the Quick Bar Shortcut
    • Pinning the Chrome Extension
    • Updating the Browser Extension
    • Installing a PixieBrix Pre-Release Build
    • Editing Pages with iFrames
    • Adding bricks to mods
    • Opening the PixieBrix Sidebar
    • Troubleshooting
      • Troubleshooting Bad API Requests
      • Troubleshooting Network Errors
      • Troubleshooting IndexedDB Errors
      • Troubleshooting Browser Extension Performance and Crashes
      • Troubleshooting extension corruption errors
    • Extend my PixieBrix Trial
  • Release Notes
    • 🏗️Release 2.3.2
    • ✅Release 2.3.1
    • 📜Release Notes Archive
      • ✅Release 2.3.0
      • ✅Release 2.2.10
      • ✅Release 2.2.9
      • ✅Release 2.2.8
      • ✅Release 2.2.7
      • ✅Release 2.2.6
      • ✅Release 2.2.5
      • ✅Release 2.2.4
      • ✅Release 2.2.3
      • ✅Release 2.2.2
      • ✅Release 2.2.1
      • ✅Release 2.2.0
      • ✅Release 2.1.7
      • ❌Release 2.1.6
      • ✅Release 2.1.5
      • ✅Release 2.1.4 (Hotfix)
      • ✅Release 2.1.3
      • ✅Release 2.1.2
      • ✅Release 2.1.1
      • ✅Release 2.1.0
      • ✅Release 2.0.7
      • ✅Release 2.0.6
      • ✅Release 2.0.5
      • ✅Release 2.0.4
      • ✅Release 2.0.3
      • ✅Release 2.0.2
      • ✅Release 2.0.1 (Hotfix)
      • ✅Release 2.0.0
      • PixieBrix Browser Extension 2.0.0 Migration Guide
      • ✅Release 1.8.14
      • ✅Release 1.8.13
      • ✅Release 1.8.12
      • ✅Release 1.8.11
      • ✅Release 1.8.10
      • ✅Release 1.8.9
      • ✅Release 1.8.8
      • ✅Release 1.8.7
      • ✅Release 1.8.6
      • ✅Release 1.8.5
      • ✅Release 1.8.4
      • ✅Release 1.8.3
      • ✅Release 1.8.2
      • ✅Release 1.8.1
      • ✅Release 1.8.0
      • ✅Release 1.7.41
      • ✅Release 1.7.40
      • ✅Release 1.7.39
      • ✅Release 1.7.38
      • 🚫Release 1.7.37
      • ✅Release 1.7.36
      • ✅Release 1.7.35
      • ✅Release 1.7.34
      • ✅Release 1.7.33
      • ✅Release 1.7.32
      • 🚫Release 1.7.31
      • ✅Release 1.7.30
      • ✅Release 1.7.29
      • ✅Release 1.7.28
      • ✅Release 1.7.27
      • ✅Release 1.7.26
      • ✅Release 1.7.25
      • ✅Release 1.7.24
      • ✅Release 1.7.23
      • ✅Release 1.7.22
      • ✅Release 1.7.21
      • ✅Release 1.7.20
      • ✅Release 1.7.19
      • ✅Release 1.7.18
      • ✅Release 1.7.17
      • ✅Release 1.7.16
      • ✅Release 1.7.15
      • ✅Release 1.7.14
      • ✅Release 1.7.13
      • ✅Release 1.7.12
      • ✅Release 1.7.11
      • ✅Release 1.7.10
      • ✅Release 1.7.9
      • ✅Release 1.7.8
      • ✅Release 1.7.7
      • ✅Release 1.7.6
      • 🚫Release 1.7.5
      • ✅Release 1.7.4
      • ✅Release 1.7.3
      • ✅Release 1.7.2
      • ✅Release 1.7.1
      • ✅Release 1.7.0
      • ✅Release 1.6.4
      • ✅Release 1.6.3
      • ✅Release 1.6.2
      • ✅Release 1.6.1
      • ✅Release 1.6.0
      • ✅Release 1.5.11
      • ✅Release 1.5.10
      • ✅Release 1.5.9
      • ✅Release 1.5.8
      • ✅Release 1.5.7
      • ✅Release 1.5.6
      • ✅Release 1.5.5
      • ✅Release 1.5.4
      • ✅Release 1.5.3
      • ✅Release 1.5.2
      • ✅Release 1.5.1
      • ✅Release 1.5.0
      • ✅Release 1.4.12
      • ✅Release 1.4.11
      • ✅Release 1.4.10
      • ✅Release 1.4.9
      • ✅Release 1.4.8
      • ✅Release 1.4.7
      • ✅Release 1.4.6
      • 🚫Release 1.4.5
      • ✅Release 1.4.4
      • 🚫Release 1.4.3
      • 🚫Release 1.4.2
      • ✅Release 1.4.1
      • ✅Release 1.4.0
      • 🚫Release 1.3.2
      • ✅Release 1.3.1
      • ✅Release 1.3.0
      • ✅Release 1.2.11
      • ✅Release 1.2.10
      • ✅Release 1.2.9
      • ✅Release 1.2.8
      • ✅Release 1.2.7
      • ✅Release 1.2.5
      • ✅Release 1.2.4
      • ✅Release 1.2.3
      • ✅Release 1.2.2
      • ✅Release 1.2.1
      • ✅Release 1.2.0
      • ✅Release 1.1.12
      • ✅Release 1.1.11
      • ✅Release 1.1.10
      • ✅Release 1.1.9
      • ✅Release 1.1.8
      • ✅Release: 1.1.7
      • ✅Release: 1.1.6
      • ✅Release: 1.1.5
      • ✅Release: 1.1.4
      • ✅Release: 1.1.3
      • ✅Release: 1.1.2
      • ✅Release: 1.1.1
      • ✅Release: 1.1.0
      • ✅Release: 1.0.3
      • ✅Release: 1.0.2
      • ✅Release: 1.0.1
      • ✅Release: 1.0.0
      • ✅Release: 0.2.2
      • ✅Release: 0.2.1
  • Tutorials
    • Developer Tutorials
      • Beginner
        • Search Yelp Reviews from OpenTable
        • Right-click Currency Conversion
        • Web Highlighter Tutorial
        • Trello Status Sidebar
        • Right-click Google Scholar Search
        • Google Dorking
        • Tweet a Link
        • Ask AI To Generate a LinkedIn Connection Request
        • How to Customize the AI Rate and Fix Mod
        • Right-click Translate Language
        • Basic Translation Tutorial
        • AI Bot Sidebar
        • Search and Highlight Words on a Page
      • Intermediate
        • Create a status nudge button in Github
Powered by GitBook
On this page
  • Prefer to watch?
  • PreReqs
  • Step 1: Start your mod with a context menu brick
  • Step 2: Make an API Call
  • Step 3: View the output of your response
  • Step 4: Display the Response in a Sidebar
  • Step 5: Save your mod and try it out

Was this helpful?

  1. Tutorials
  2. Developer Tutorials
  3. Beginner

Basic Translation Tutorial

PreviousRight-click Translate LanguageNextAI Bot Sidebar

Last updated 3 months ago

Was this helpful?

This tutorial shows you the basics of PixieBrix and will help you understand how to create a mod (), interact with an API, and display that response in the sidebar.

You'll learn how to :

  • Initiate or launch a mod

  • Reference input from a starter brick

  • Add bricks to a mod

  • Make an API call in PixieBrix

  • Reference output from a brick in other bricks

  • Use Text Templates to inject dynamic values into text

  • Create interactive displays with dynamic data (such as responses from APIs)

This tutorial should take about 10 minutes. If you have any questions, click the purple live chat button in the bottom left corner or .

If you get stuck and cannot move forward, to see the final solution. Follow these docs if you need help Activating Mods. Once you've activated it, you'll find it in the Page Editor on the first panel, the .

Prefer to watch?

Watch the video for a walkthrough of this tutorial.

Prefer the text version? Skip the video and keep reading!

PreReqs

Before getting started, you'll need:

You're ready to start the tutorial if your screen looks something like this.

At the end of each step, you'll see a 🏁 that shows you how to know if you're ready to move to the next step. There will be screenshots indicating how you should have configured the brick for that step.

Step 1: Start your mod with a context menu brick

Every mod begins with a Starter Brick, which is one of 5 types of mods that determine how and where a mod runs. (Learn more about Types of Mods.)

For this mod, we'll use the Context Menu starter brick.

1.1 Add the context menu brick

1.2 Update the Name and Title

The Name field is the mod component in the first panel, the Mod Listings Panel.

The Title is the text that appears on the context menu. You may call it something like "Greek Translate" (or whatever language you'd like to translate to). You can also dynamically show the selected text by including %s in the Title.

1.3 Change Menu context to selection

In the Menu context dropdown, choose selection and remove all by clicking the x after the text.

This ensures the context menu action only appears when you have text selected.

Not seeing your context menu? Check that you've highlighted text on the page!

1.4 Choose All URLs for Sites

Specify which sites you'd like to be able to run this mod on. By default, PixieBrix will set the current site, but if you want to run on any URL, click the All URLs option.

You can then remove the docs.pixiebrix.com url by clicking the ABC at the end of the field and choosing X.

🏁 Checkpoint

You're ready to move on to the next step if your brick looks like this:

You should also see an emoji appear when text is selected, and appearing when you right-click on the page:

Clicking that action runs the Brick Pipeline, so let's add more bricks.

Step 2: Make an API Call

Now that we can trigger our mod, we must tell it to do something. In this case, we want to connect to an API to translate the selected text.

2.1 Click the + button below Context Menu to add a brick

2.2 Add the Translate brick

Search for Translate and add this brick:

2.3 Select the Built-In Google Translate integration

Click the integration field and select the Google Translate ✨ Built In option.

2.3 Set the text to translate to the selected text.

In the "Text to Translate" field, type @input.selectionTextto reference the text that was highlighted.

2.4 Set the translation language your desired language code

Set the Translate To Language to the language code you want to translate to. Want to stick with Greek? You can use `el`.

2.5 Change the output variable to `response`

This will make it easier to reference later.

🏁 Checkpoint

You're ready to move on to the next step if your brick looks like this:

Step 3: View the output of your response

You're ready to run your mod and check the API returns the expected response.

3.1 Select text on the page above the Page Editor

Highlight text on the webpage, and click the globe emoji to run the mod.

3.2 View the Output in the Data Panel

This is where you can view the response from the API. Click the > before @response to open the object and view the response.

This response can be used in any bricks that come afterward, giving you a way to provide dynamic values to other bricks, such as displaying the response. We'll do this in the next step.

🏁 Checkpoint

You're ready to move on if you can successfully see the translatedText response in the Data Panel of your sidebar, like the screenshot above.

If you have any errors, confirm you've configured your brick according to the screenshot in Step 2.

Step 4: Display the Response in a Sidebar

Lastly, we will add a brick to display our response in a sidebar.

4.1 Add the Display Temporary Information brick

You'll see that two bricks were added to your Brick Actions Panel:

  • Display Temporary Information

  • Render Document

4.2 Give the Display Temporary Information Brick a title

In the brick Configuration Panel for the Display Temporary Information Brick, rename the Title to Translation

You can also choose to move the location from Sidebar to a Modal or Popover. We'll leave this as a Sidebar.

4.3 Click the Render Document brick in the Brick Actions Panel

Click any element in the Preview panel to edit.

4.4 Rename Example Document to Translate

In this case, the element is a Header type. So, the configuration options include the text itself, which you can rename in the Title field.

Replace the text with "Translate" instead of "Example document".

You can also change the size of the header. There are other optional settings for styling and setting criteria to hide the element dynamically. You can leave these as is for this tutorial.

4.5 Replace the Example text element with the response

Now click the Example text element in the preview panel.

New configuration options appear for the Text element. Replace the Text value with the following:

Your translated text: {{ @response.translatedText }}

Notice we can reference the output from the Translate brick by providing the variable path and wrapping it in {{ }} to inject the value in hardcoded strings.

You can access the property by using the variable popover, which displays available variables once you start typing @, or you can copy the path by viewing the output from the brick and clicking the copy icon next to the item you want to reference.

🏁 Checkpoint

You're ready to move to the next step when your sidebar preview panel looks like this:

Step 5: Save your mod and try it out

Your mod is built, so it's time to save and test it.

5.1 Click Save in the Mod Listing Panel

You can now close your Page Editor and test out your mod!

5.2 Select text, right-click, and choose the Translate action

Select any text on the page (like this paragraph!), right-click, and then choose the Translate action.

You should see a sidebar with your translated text a moment later.

🎉 Congrats!! You just built a mod.

a PixieBrix account ()

the Page Editor open ()

basic understanding of the terms we use to reference sections of the Page Editor ()

To do this click the New Mod button in the top left of the Page Editor, then choose the Context Menu option. (?)

Once you click that, configuration options appear in the middle of your Page Editor, this is the .

If a title starts with an emoji, it will appear on the Visual Popover element when you select text.

In the , you'll see a + icon just below the Context Menu brick. Click the + button to open the Add a Brick modal.

You might have noticed some checkmarks appear next to brick in your (second panel in the Page Editor). This lets you know your steps succeeded.

Confirm you have selected the Translate brick (it will have a blue background in the Brick Actions Panel), then confirm you have selected the Output tab on the (last panel on the right).

Click the + button below the HTTP Response brick in the and search for the Display Temporary Information brick. Hover over it, then click the blue Add button.

Now, click the Render Document brick to style the Sidebar. Once you click the Render Document brick in the Brick Actions Panel, you'll see a preview appear on the far right panel (the )

Click the Example document text on the Preview Panel, and the middle will display options for modifying that element.

On the first panel on the left, the , click the Save icon on your translate mod.

If it's not working, you can to see how it's meant to be structured, and compare your build to the template mod. You can also or click the live chat button in the bottom left corner of this page.

create a free one
how?
learn more about those here
What's a context menu
Brick Configuration Panel
Brick Actions Pipeline
Brick Actions Panel
Data Panel
Brick Actions Panel
Data Panel
Brick Configuration Panel
Mod Listing Panel
activate the template
reach out to our support team
what's a mod?
reach out to support
activate this mod
Mod Listing Panel