Skip to main content

Sending gifts from a Coda table

Written by Catherine Walker

Most gifting automation sends one gift at a time, fired by a single event in a CRM. This guide covers a different shape of work. Your team builds a list of people in Coda, decides who to gift, and sends to everyone on the list in a single run.

It suits any team that likes to curate before it sends: sales prospecting, account-based marketing, win-back campaigns, or a batch of customer milestones. A person reviews the list, &Open takes care of the gifts, and every send is recorded against its row in Coda.

Setting this up is a one-time job for your team, done in &Open and Coda. Most of it needs no code. The one part that does — connecting Coda to &Open so it can send — is a small Pack that someone comfortable with a little JavaScript builds once. After that, anyone can build a list and send gifts whenever they want.

How it works

At its simplest, this is two stages: build a list, then send. Each one has a part you set up once and a part you repeat every time.

  • Build the list. Gather and enrich the people you're considering.

  • Send the gift. Send an invitation to everyone on the list.

The everyday loop. Once the setup is done, sending a batch is quick: load your list, review it, then press the send button on the rows you're happy with. Coda calls &Open for each one and fills in a redemption link on the row.

What you'll need

Line up these basics before you start. Everything else is built in the stages below.

  • An &Open campaign for this work. A campaign is the pool of gifts a recipient can choose from. Create it in the &Open platform the same way you set up any campaign. It's not technical, and it isn't done through the API. Note the campaign's ID.

  • An &Open API key. This lets Coda send gifts on your behalf. Ask your &Open contact for one.

  • A Coda account on a paid plan, with permission to build docs and Packs. Automations and Packs sit on Coda's paid plans.

  • Someone who can write a little JavaScript, once. Coda has no built-in way to call an outside API from a button, so connecting it to &Open means building a small Pack. It's a one-time job, and the whole of it is in Sending the gift below. After that, using it needs no code.

  • Your contacts, ready to bring in. You'll import these each time you send.

Keep your key safe. &Open API keys have admin-level access, so treat the key like a password. The Pack you build stores it securely as a connection, which means it never sits in the doc itself. Store your own copy somewhere secure too, and share it only with people who need it.

A note on Coda plans. Building a Pack and running automations both sit on Coda's paid plans. The Pro plan covers unlimited automations and most Packs, including a custom one you build yourself; the Team plan unlocks every Pack. Coda charges per maker rather than per run, so a large send doesn't cost extra. See Coda's pricing for the details.

Building the list

This stage is where you create the table and, each time, fill it with the people you're considering.

Set up once

Create a new doc in Coda with a table inside it. Give the table a column each for the gift recipient's first name, last name, and email. You'll add the other columns as you work through the stages below, so the table grows with the guide.

Each time

Keep sending under your control while you build. Coda only sends when you press a button or an automation runs, so the simplest approach is to send with a manual button — set up in the next stage — and add people freely until you're ready. Nothing goes out until you press it.

Bring in the people you want to consider. Import them from a CSV file, paste them in from a spreadsheet, or sync them from another tool with a Pack. Each person becomes a row.

Add any data that will help you decide who gets a gift. Coda formulas can score or filter rows, and a Coda AI column can research each person for you, pulling in things like how well they fit your ideal customer or a summary of notes you already hold.

Sending the gift

This stage builds the action that sends a gift invitation, then runs it against your list. This is the part that needs a little JavaScript, done once.

Set up once

Coda calls outside services through a Pack, a small extension you build and install on your doc. You'll build one that adds a "send gift invitation" action you can drop onto a button or an automation. Here's exactly what it needs to do:

  • Register &Open's domain so the Pack is allowed to call it, with addNetworkDomain("api.andopen.co").

  • Store your &Open API key as system authentication, sent as a bearer token, so every send shares the one key and it never sits in the doc.

  • Send the API version header AndOpen-API-Version: 2026-05 on every call. &Open checks this before the token, so a request without it is rejected.

  • Add an action (a formula with isAction: true) that takes a recipient's first name, last name, and email, then calls &Open's "create a gift invitation" endpoint, POST /gift_requests, with the Fetcher. Have it return the new gift's id and redemption_url so the doc can write them back onto the row.

A sketch of the Pack:

import * as coda from "@codahq/packs-sdk";  export const pack = coda.newPack();  // Allow the Pack to call the &Open API. pack.addNetworkDomain("api.andopen.co");  // Store the &Open API key securely as a shared connection. // Coda sends it as "Authorization: Bearer <token>". pack.setSystemAuthentication({   type: coda.AuthenticationType.HeaderBearerToken, });  // What the action hands back: the gift's ID and its redemption link. const giftSchema = coda.makeObjectSchema({   properties: {     giftRequestId: { type: coda.ValueType.String, fromKey: "id" },     redemptionUrl: { type: coda.ValueType.String, fromKey: "redemption_url" },   },   displayProperty: "redemptionUrl", });  // "Send a gift invitation" — usable from any button or automation. pack.addFormula({   name: "SendGift",   description: "Send an &Open gift invitation to one recipient.",   isAction: true,   resultType: coda.ValueType.Object,   schema: giftSchema,   parameters: [     coda.makeParameter({ type: coda.ParameterType.String, name: "campaignId", description: "Your &Open campaign ID." }),     coda.makeParameter({ type: coda.ParameterType.String, name: "firstName", description: "The recipient's first name." }),     coda.makeParameter({ type: coda.ParameterType.String, name: "lastName", description: "The recipient's last name." }),     coda.makeParameter({ type: coda.ParameterType.String, name: "email", description: "The recipient's email." }),   ],   execute: async function ([campaignId, firstName, lastName, email], context) {     const response = await context.fetcher.fetch({       method: "POST",       url: "<https://api.andopen.co/gift_requests>",       headers: {         "Content-Type": "application/json",         "AndOpen-API-Version": "2026-05",       },       body: JSON.stringify({         campaign_id: campaignId,         recipient: { first_name: firstName, last_name: lastName, email },       }),     });     return response.body;   }, });

With the Pack installed on your doc, add the send action to your table. Add a button column, set it to run the Pack's "send gift invitation" action, and pass in the campaign ID along with the row's first name, last name, and email. Set the button to write the returned id and redemption_url into two new columns, "Gift request ID" and "Redemption URL". A button only fires when pressed, so nothing sends while a list is still being built.

Each time

When you're happy with the list, send it. Press the button on the rows you've reviewed, or, if you'd rather run the whole list at once, move the same action into an automation on a schedule or a checkbox. Each person on the list gets a gift invitation, and the row fills in its ID and a redemption link.

That redemption link is the invitation. Share it with the recipient yourself, or automate sending it straight from the doc.

If a row can't send, &Open returns a reason, usually a detail that needs fixing such as a missing name or a mistyped email. Have the action catch the error and write it to a "Send error" column, so you can correct the row and run it again.

One thing for larger runs: &Open's API has rate limits, so stagger a big list rather than firing every row at once. Sending in smaller batches is the easiest way.


Related documentation

From &Open:

From Coda:

Did this answer your question?