← Airtable

Get Record or Create with Airtable API

Pipedream makes it easy to connect APIs for Airtable and 1000+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Get Record or Create with the Airtable API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

Create a workflow to Get Record or Create with the Airtable API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Get Record or Create action
    1. Connect your Airtable account
    2. Select a Base
    3. Select a Table
    4. Configure Record ID
    5. Optional- Configure Typecast
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Get Record or Create with Airtable API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Airtable
 
Try it
Get Record or Create with Airtable API on New Message from Discord API
Discord + Airtable
 
Try it
Get Record or Create with Airtable API on New Message In Channels from Slack API
Slack + Airtable
 
Try it
Get Record or Create with Airtable API on New Message in Channel from Discord Bot API
Discord Bot + Airtable
 
Try it
Get Record or Create with Airtable API on New Submission from Typeform API
Typeform + Airtable
 
Try it

Details

This is a pre-built, source-available component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Get Record or Create on Airtable
Description:Get a record from a table by record ID or create a new register.
Version:0.0.2
Key:airtable-get-record-or-create

Code

import airtable from "../../airtable.app.mjs";
import common from "../common.mjs";
import commonActions from "../../common/actions.mjs";

export default {
  key: "airtable-get-record-or-create",
  name: "Get Record or Create",
  description: "Get a record from a table by record ID or create a new register.",
  version: "0.0.2",
  type: "action",
  props: {
    ...common.props,
    // eslint-disable-next-line pipedream/props-label,pipedream/props-description
    tableId: {
      ...common.props.tableId,
      reloadProps: true,
    },
    recordId: {
      propDefinition: [
        airtable,
        "recordId",
      ],
    },
    typecast: {
      propDefinition: [
        airtable,
        "typecast",
      ],
      optional: true,
    },
  },
  async additionalProps() {
    return commonActions.additionalProps(this);
  },
  async run({ $ }) {
    const recordId = this.recordId ?? undefined;

    if (recordId) {
      try {
        return await commonActions.getRecord(this, $, true);
      } catch (err) {
        if (err.statusCode === 404) {
          return await commonActions.createRecord(this, $);
        } else {
          this.airtable.throwFormattedError(err);
        }
      }
    } else {
      return commonActions.createRecord(this, $);
    }
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
AirtableairtableappThis component uses the Airtable app.
BasebaseIdstringSelect a value from the drop down menu.
TabletableIdstringSelect a value from the drop down menu.
Record IDrecordIdstring

Enter a record ID (eg. recxxxxxxx).

Typecasttypecastboolean

The Airtable API will perform best-effort automatic data conversion from string values if the typecast parameter is True. Automatic conversion is disabled by default to ensure data integrity, but it may be helpful for integrating with 3rd party data sources.

Authentication

Airtable uses API keys for authentication. When you connect your Airtable account, Pipedream securely stores the keys so you can easily authenticate to Airtable APIs in both code and no-code steps.

Visit your account settings, copy your API key, and enter it below. If you only need to read data from Airtable, and not modify it, you can generate a read-only API key.


get airtable api key

About Airtable

Looks like a spreadsheet, acts like a database.

More Ways to Use Airtable

Triggers

New or Modified Records from the Airtable API

Emit an event for each new or modified record in a table

 
Try it
New or Modified Records in View from the Airtable API

Emit an event for each new or modified record in a view

 
Try it
New Records from the Airtable API

Emit an event for each new record in a table

 
Try it
New Records in View from the Airtable API

Emit an event for each new record in a view

 
Try it
New, Modified or Deleted Records from the Airtable API

Emits an event each time a record is added, updated, or deleted in an Airtable table. Supports tables up to 10,000 records

 
Try it

Actions

Create single record with the Airtable API

Adds a record to a table.

 
Try it
Create Multiple Records with the Airtable API

Create one or more records in a table by passing an array of objects containing field names and values as key/value pairs.

 
Try it
List Records with the Airtable API

Retrieve records from a table with automatic pagination. Optionally sort and filter results.

 
Try it
List Records in View with the Airtable API

Retrieve records in a view with automatic pagination. Optionally sort and filter results.

 
Try it
Update record with the Airtable API

Update a single record in a table by Record ID.

 
Try it