New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

botkit-storage-airtable

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botkit-storage-airtable

Airtable driver for Botkit

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

botkit-storage-airtable

An Airtable storage module for Botkit. A lot of the code is reused from botkit-storage-firebase.

Usage

Install

yarn add botkit-storage-airtable` # or npm install --save
botkit-storage-airtable

Next, require botkit-storage-airtable and pass it a config with a apiKey, base, and tables options.

Learn how to get an Airtable apiKey here.

To get you started, you can use this Airtable template. Make a copy and modify it according to your needs. Airtable isn't schemaless so you have to do some data modeling to build anything custom.

Then pass the returned storage when creating your Botkit controller. Botkit will do the rest.

Make sure everything you store has an id property, that's what you'll use to look it up later.


var Botkit = require('botkit');

...

  const tables = ['bots', 'users', 'channels', 'teams'] # for slack, add your
  Airtable table names
  airtableStorage = require('botkit-storage-airtable')({
    apiKey: '...',
    base: '...',
    tables: tables
  }),
  controller = Botkit.slackbot({
      storage: airtableStorage
  });

Note: This may vary slightly depending on the bot platform you're building for. Just ensure to find and update the storage property of the controller with airtableStorage

// then you can use the Botkit storage api, make sure you have an id property
var beans = {id: 'cool', beans: ['pinto', 'garbanzo']};
controller.storage.teams.save(beans);
beans = controller.storage.teams.get('cool');

Acknowledgement

Keywords

botkit

FAQs

Package last updated on 22 Dec 2017

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