Skip to main content
Appenda
Sign inDownload

Choose inputs from what your account already holds.

Some inputs take the id of something that already exists: a table in your workspace, or a campaign, a sender or a list in a provider account. You do not need to know these ids. Appenda lists the choices for you, the same list the app shows in its picker.

This page walks one full example with Appenda's built-in Find rows in table action. It needs no key and spends no credits. On an Accounts table, it finds the leads in your Leads table whose domain matches the account's.

1. Find the inputs that take a choice

Get action parameters lists the action's inputs:

curl https://api.appenda.app/v1/integrations/appenda/actions/find_rows \
  -H "Authorization: Bearer $APPENDA_API_KEY"

An input whose choices come from your account has options set to dynamic. depends_on names the inputs you must choose first. The three required inputs of Find rows read:

Inputoptionsdepends_onWhat you choose
target_tabledynamicThe table to search.
target_fielddynamic["target_table"]A field of that table.
valueA field of this table to look up.

value takes a field of the table you add the field to, so it needs no list.

2. List the choices

Get input options lists the choices for one input. Name the action and the input:

curl "https://api.appenda.app/v1/integrations/appenda/options?action=find_rows&input=target_table" \
  -H "Authorization: Bearer $APPENDA_API_KEY"
{
  "data": [
    {
      "label": "Leads",
      "value": "tbl_67ad65ba34a7bbfc643711b8531cba3f"
    }
  ],
  "meta": {
    "has_more": false,
    "next_cursor": null
  }
}

Show label to a person and send value as the input. Add search to keep only the choices whose label contains some text.

3. List the choices that depend on another input

target_field depends on target_table, so send the table you chose in values, a JSON object keyed by input. curl -G --data-urlencode encodes it for you:

curl -G https://api.appenda.app/v1/integrations/appenda/options \
  -H "Authorization: Bearer $APPENDA_API_KEY" \
  --data-urlencode "action=find_rows" \
  --data-urlencode "input=target_field" \
  --data-urlencode 'values={"target_table":"tbl_67ad65ba34a7bbfc643711b8531cba3f"}'

The answer has the same shape: one choice per field of the Leads table, with the field's id as value. Without target_table in values, the request is refused.

4. Create the field

Put each chosen value in the field's inputs as a fixed value, {"value": "<id>"}. An input that takes a field of this table uses {"field": "<field key>"} instead:

curl https://api.appenda.app/v1/tables/tbl_5246f913f71a9485a05033249a6dc75e/enrichment-fields \
  -H "Authorization: Bearer $APPENDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Leads at this account",
    "provider": "appenda",
    "action": "find_rows",
    "schema_version": 1,
    "inputs": {
      "value": {"field": "domain"},
      "target_table": {"value": "tbl_67ad65ba34a7bbfc643711b8531cba3f"},
      "target_field": {"value": "fld_a6806b5f732319fbc6a15bafac71f658"}
    }
  }'

Send "dry_run": true to check the inputs without creating the field. Then start a run as in Enrichment fields. For the other table methods, see Move and match data.

Provider inputs

A provider action works the same way. An input such as a campaign or a sender has options set to dynamic, and Get input options reads its choices from the provider account with the key you connected.

ParameterMeaning
credential_idOptional. The connected key to read with. By default, the workspace's default key for the provider.
searchOptional. Only choices whose label contains this text.
valuesThe inputs this one depends on, as a JSON object.
limitOptional. Page size, 1 to 100.
cursorThe previous page's meta.next_cursor.

Choices come in the provider's own order. When meta.has_more is true, send meta.next_cursor back as cursor for the next page. Reading choices only reads: it changes nothing in the provider account and spends no credits.

Appenda's own table methods take no key, so leave credential_id out for them.

Can I type an id instead of listing the choices?
Yes. The list only helps you find the id. Any valid id works as the input's value.
Why is a choice I expect missing?
The list shows what the key can see right now. Check that the key belongs to the right provider account, then use search or the next page.