Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

airtable-monitor

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airtable-monitor

Get notified when an Airtable record is edited

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-28.57%
Maintainers
1
Weekly downloads
 
Created
Source

airtable-monitor

Build Status npm npm

This library polls your Airtable tables to monitor changes, calling a simple event handler when a change is detected.

Install

yarn add airtable-monitor

Usage

const AirtableMonitor = require('airtable-monitor');

const monitor = new AirtableMonitor(
  {
    baseID: xxx, // Airtable base ID
    apiKey: xxx, // Airtable API token
    tables: ['table_to_monitor'],
    tableInterval: 1, // Optional (default = 0) : an interval in seconds between calls to Airtable API for each table of a tick to avoid rate limiting.
  },
  event => {
    // event structure :
    // {
    //   date,
    //   tableName,
    //   fieldName,
    //   previousValue,
    //   newValue,
    //   recordId,
    // }
  },
);

monitor.start(30); // Poll every 30 seconds. Default : 60 seconds

Caveats

  • Changes that occur between polling intervals will not be detected
  • Be careful when monitoring text fields, as the Airtable API returns the exact text at the moment we request it : If someone is changing foo to lorem ipsum and the check interval occurs in the middle, an first event could be fired for foo -> lorem, then the next check would fire an event for lorem -> lorem ipsum.
  • We don't recommend polling too often to avoid exceeding Airtable API rate limits.

Running tests

yarn install && yarn test

FAQs

Package last updated on 04 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc