Skip to content

Get started in the browser

The fastest and easiest way to create a Pack is to use our web-based Pack Studio. You don't need to download any code or tools, just make sure you have:

  1. A Coda account, with
  2. Doc Maker access in your workspace.

If you're new to Coda, sign up for a free account and you'll automatically be made a Doc Maker in your personal workspace.

The Pack Studio is built right in to the Coda application. To get there:

  1. Open Coda in your browser.
  2. Click on Packs in the navigation menu on the left. If you are a member of multiple workspaces you will need to select a workspace first.
  3. Click the Create a Pack button in the upper right.

Tip

Type pack.new into your browser to quickly create a new Pack.

You are now in the Pack Studio, ready to start building!

Create a Pack from an example

When starting a new Pack you have the choice to begin with an existing example or or start from scratch. In this tutorial we'll use the basic Hello World sample code. Take a moment to read through the code and comments and get an understanding of how a Pack is structured.

Next we'll use the Pack Studio to build that code and get it ready to use:

  1. Click on the Hello World example to add in the sample code.

  2. Click on the Pack name Untitled Pack in the upper left, and change it to "Hello World".

  3. Click the Build button in the bottom left.

    This checks your Pack for errors and Packages it up for use in a Coda doc. It can take a few seconds for the build to complete.

  4. When the confirmation screen appears, click Create a test doc.

Your Pack is now built and ready to use!

Use the Pack

The Pack can now be installed in any of your docs, and the test doc you created comes with the Pack pre-installed. Now let's use your new Pack in the document.

  1. Drag the Hello formula from the panel on the right into your doc.

    Alternative: Type the formula

    Place your cursor in the doc and type =Hello, and then press the tab key to select formula from your Pack.

  2. Complete the formula by passing in a name value, such as Hello("World"), and hit enter.

If everything has gone right you should see the result Hello World as the output of your formula.

Tip

For a more personalized message, try changing the formula to Hello(User()).

Update the Pack

Now that you have your Pack up and running let's make a change to how it works.

  1. Back in the Pack Studio, update your code to say "Howdy" instead of "Hello":

    execute: async function ([name]) {
        return "Howdy " + name + "!";
    },
    
  2. Click the Build button again to rebuild your Pack with this change.

  3. When the Build has completed, switch back to your test document.

    You'll notice that the formula is still returning Hello World!, and that's because formulas aren't automatically recalculated when you update your Pack code.

  4. In the Pack's panel, click the About tab.

    The INSTALLED version of the Pack should now read v2.

    Re-opening the Pack's panel

    If you have navigated away from the Pack's panel, click Insert > Packs > {Pack name}.

  5. Click the View logs button.

  6. In the Pack maker tools bar, click the three dots icon and then Refresh Pack formulas and tables.

    A Syncing... indicator will appear at the top of the screen while the formulas are being refreshed.

Your formula result should now be Howdy World!.

Tip

To avoid having to manually refresh the formulas on every update, click the gear icon in the Pack maker toolbar and toggle on the AUTO-REFRESH setting.

Next steps

You've built your fist Pack, congrats! 🎉 Now that you have some experience with the mechanics of building and using Packs, here are some recommended next steps:

  • Learn about Pack basics by reading through the available guides.
  • Check out the code samples to see examples of specific Pack features as well as complete sample Packs.