← Airtable + IFTTT integrations

Trigger Event with JSON with IFTTT API on New, Modified or Deleted Records from Airtable API

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

Trigger workflow on
New, Modified or Deleted Records from the Airtable API
Next, do this
Trigger Event with JSON with the IFTTT 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

This integration creates a workflow with a Airtable trigger and IFTTT action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New, Modified or Deleted Records trigger
    1. Connect your Airtable account
    2. Configure timer
    3. Select a Base
    4. Select a Table
  3. Configure the Trigger Event with JSON action
    1. Connect your IFTTT account
    2. Configure Webhook Key
    3. Configure Event Name
    4. Configure JSON Payload
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are 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.

Trigger

Description:Emits an event each time a record is added, updated, or deleted in an Airtable table. Supports tables up to 10,000 records
Version:0.2.0
Key:airtable-new-modified-or-deleted-records

Airtable Overview

Using the Airtable API, you can build applications that can:

  • Create and manage databases
  • Add, update, and delete records
  • Search for records
  • Sort and filter records
  • Display records in a variety of ways
  • Import and export data

Trigger Code

import moment from "moment";
import { axios } from "@pipedream/platform";
import Bottleneck from "bottleneck";

import common from "../common.mjs";

const limiter = new Bottleneck({
  minTime: 200, // 5 requets per second
});
const axiosRateLimiter = limiter.wrap(axios);

export default {
  ...common,
  name: "New, Modified or Deleted Records",
  key: "airtable-new-modified-or-deleted-records",
  version: "0.2.0",
  type: "source",
  description:
    "Emits an event each time a record is added, updated, or deleted in an Airtable table. Supports tables up to 10,000 records",
  props: {
    ...common.props,
    tableId: {
      propDefinition: [
        common.props.airtable,
        "tableId",
        ({ baseId }) => ({
          baseId,
        }),
      ],
    },
  },
  async run(event) {
    const {
      baseId,
      tableId,
      viewId,
    } = this;

    const metadata = {
      baseId,
      tableId,
      viewId,
    };

    const config = {
      url: `https://api.airtable.com/v0/${encodeURIComponent(baseId)}/${encodeURIComponent(tableId)}`,
      params: {},
      headers: {
        Authorization: `Bearer ${this.airtable.$auth.api_key}`,
      },
    };

    const prevAllRecordIds = this.db.get("prevAllRecordIds");

    const lastTimestamp = this.db.get("lastTimestamp");
    config.params.filterByFormula = `LAST_MODIFIED_TIME() > "${lastTimestamp}"`;

    const data = await axios(this, config);

    let allRecordIds = [],
      newRecordsCount = 0,
      modifiedRecordsCount = 0,
      deletedRecordsCount = 0;

    if (data.records) {
      for (const record of data.records) {
        if (!lastTimestamp || moment(record.createdTime) > moment(lastTimestamp)) {
          record.type = "new_record";
          newRecordsCount++;
        } else {
          record.type = "record_modified";
          modifiedRecordsCount++;
        }

        record.metadata = metadata;

        this.$emit(record, {
          summary: `${record.type}: ${JSON.stringify(record.fields)}`,
          id: record.id,
        });
      }
    }

    delete config.params.filterByFormula;

    while (allRecordIds.length === 0 || config.params.offset) {
      const data = await axiosRateLimiter(this, config);
      if (!data.records.length || data.records.length === 0) return;
      allRecordIds = [
        ...allRecordIds,
        ...data.records.map((record) => record.id),
      ];
      if (data.offset) {
        config.params.offset = data.offset;
      } else {
        delete config.params.offset;
      }
    }

    if (prevAllRecordIds) {
      const deletedRecordIds = prevAllRecordIds.filter(
        (prevRecord) => !allRecordIds.includes(prevRecord),
      );
      for (const recordID of deletedRecordIds) {
        deletedRecordsCount++;
        const deletedRecordObj = {
          metadata,
          type: "record_deleted",
          id: recordID,
        };
        this.$emit(deletedRecordObj, {
          summary: "record_deleted",
          id: recordID,
        });
      }
    }

    console.log(
      `Emitted ${newRecordsCount} new records(s) and ${modifiedRecordsCount} modified record(s) and ${deletedRecordsCount} deleted records.`,
    );
    this.db.set("prevAllRecordIds", allRecordIds);

    // We keep track of the timestamp of the current invocation
    this.updateLastTimestamp(event);
  },
};

Trigger 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.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
timer$.interface.timer
BasebaseIdstringSelect a value from the drop down menu.
TabletableIdstringSelect a value from the drop down menu.

Trigger 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.

Action

Description:Trigger Event with an arbitrary JSON payload. [See docs](https://help.ifttt.com/hc/en-us/articles/115010230347-Webhooks-service-FAQ)
Version:0.0.2
Key:ifttt-trigger-event-with-json

IFTTT Overview

With the IFTTT API, you can build a wide variety of applications and
integrations. Here are just a few examples:

  • A to-do list app that adds new items to a spreadsheet
  • A weather app that sends you a notification when it's going to rain
  • A social media app that posts updates to a blog
  • An e-commerce app that track your order status and sends you shipping updates
  • A fitness app that logs your workout data and shares your progress with
    friends

Action Code

import ifttt from "../../ifttt.app.mjs";

export default {
  name: "Trigger Event with JSON",
  description: "Trigger Event with an arbitrary JSON payload. [See docs](https://help.ifttt.com/hc/en-us/articles/115010230347-Webhooks-service-FAQ)",
  key: "ifttt-trigger-event-with-json",
  version: "0.0.2",
  type: "action",
  props: {
    ifttt,
    webhookKey: {
      propDefinition: [
        ifttt,
        "webhookKey",
      ],
    },
    eventName: {
      propDefinition: [
        ifttt,
        "eventName",
      ],
    },
    data: {
      propDefinition: [
        ifttt,
        "data",
      ],
    },
  },
  async run({ $ }) {
    const response = await this.ifttt.callWebhookWithJSON({
      $,
      webhookKey: this.webhookKey,
      eventName: this.eventName,
      data: this.data,
    });
    $.export("$summary", `Triggered webhook ${this.eventName}`);
    return response;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
IFTTTiftttappThis component uses the IFTTT app.
Webhook KeywebhookKeystring

The webhook key obtained in Webhook Settings

Event NameeventNamestring

The event name associated with your applet

JSON Payloaddataobject

A JSON payload to be sent

Action Authentication

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

A request that includes an IFTTT-Service-Key header containing your service key, found in the API tab of the IFTTT Platform under the Service Key heading.

About IFTTT

Every thing works better together

More Ways to Connect IFTTT + Airtable

Trigger Event with JSON with IFTTT API on New or Modified Records in View from Airtable API
Airtable + IFTTT
 
Try it
Trigger Event with JSON with IFTTT API on New or Modified Records from Airtable API
Airtable + IFTTT
 
Try it
Trigger Event with JSON with IFTTT API on New Records in View from Airtable API
Airtable + IFTTT
 
Try it
Trigger Event with JSON with IFTTT API on New Records from Airtable API
Airtable + IFTTT
 
Try it
Trigger Event with Values with IFTTT API on New, Modified or Deleted Records from Airtable API
Airtable + IFTTT
 
Try it
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
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