Build your own pack in 3 easy steps
Share
Explore

icon picker
Build your own pack in 3 easy steps

This doc will teach you "just enough Javascript" to get started!

Choose your learning path

Easy
Use Sample Formula Pack
Write Formula Pack
Use Sample API Pack
Write API Pack
Advanced
Output.png
1️⃣ OUTPUT

1️⃣ OUTPUT
2️⃣ INPUTS
3️⃣ PROCESS
➡️ BUILD
Here’s what to do

Give your pack a name and provide a short description of what it does (this information will be shown to the pack’s users). Select which block type shall be used for your pack. For this, you will choose one or more of the following block types:
Formula
,
Action
, or
Column Format
. Next, for the pack type just selected, define its
Return Type
(Number, Text, Date, etc). The
Value Hint Type
will be auto-populated as per your selection.
Lastly, specify whether your pack will send/retrieve data from a third party application via an
API
by entering the URL of the DOMAIN for the API service provider. The exact
API Endpoint
to be used in the Pack’s Fetch function will be specified in the third step ”Process” later.
For more advanced packs, you would, in a separate step, additionally
add
Authentication
to your Pack, which allows to pass credentials with an API requests. Coda supports a fixed set of authentication types which cover the most common patterns that APIs use.
define which
Authorization
details will be sent along with any API request the pack makes. Authorization data can be included in the header, body, or as parameters to a request.

Pack:
CylinderVolume


Pack Type;
PACK NAME (NoSpaces)
Pack Description
Domain
Returns;
1
📱Formula
CylinderVolume
Returns the volume of a cylinder
Number
No results from filter
Returns; Numeric data type; Integer, Floating-Point, Percent, Slider or Progress Bar
PACK HEADER CODE:
// CylinderVolume - Returns the volume of a cylinder
// (* built using the Max/Nina pack-builder *)

import * as coda from "@codahq/packs-sdk";
export const pack = coda.newPack();

pack.addFormula({
name: "CylinderVolume",
description: "Returns the volume of a cylinder",
resultType: coda.ValueType.Number,
isAction: false,
parameters: [
coda.makeParameter({
name: "Diameter",
description: "The diameter of the cylinder",
type: coda.ParameterType.Number,
optional: false,
}),
coda.makeParameter({
name: "Height",
description: "The height of the cylinder",
type: coda.ParameterType.Number,
optional: false,
}),
],



1️⃣ OUTPUT
2️⃣ INPUTS
3️⃣ PROCESS
➡️ BUILD

1 of 4

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.