Skip to content

byeagerOIT/onebill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

OneBill Integration

Airtable automation scripts for OneBill API integration.

Overview

These scripts integrate with the OneBill API for authentication and data retrieval, storing credentials in Airtable for use across automations.

Scripts

onebill-auth.js

Authenticates with OneBill using OAuth password grant flow and stores tokens in Airtable.

onebill-get-subscribers.js

Fetches subscriber data from OneBill using the stored access token.

Setup

  1. Copy .env.example to reference required credentials
  2. Update the CONFIG object in each script with your specific values
  3. Create an Authentication table in Airtable with Key and RefreshToken fields

Configuration

Variable Description
CLIENT_ID OneBill OAuth client identifier
CLIENT_SECRET OneBill OAuth client secret
USERNAME OneBill account username/email
PASSWORD OneBill password hash
AIRTABLE_TABLE Table name storing auth tokens
AIRTABLE_RECORD_ID Record ID containing tokens

Usage

Token Refresh

Run onebill-auth.js on a schedule to keep tokens fresh. The script will:

  1. Request new access/refresh tokens from OneBill
  2. Update the Airtable record with new tokens

Fetch Subscribers

Run onebill-get-subscribers.js to retrieve subscriber data. The script will:

  1. Read the current access token from Airtable
  2. Call the OneBill Subscriber API
  3. Return subscriber data for processing

API Endpoints

Endpoint Description
/oauth/token OAuth token endpoint
/rest/SubscriberService/v1/subscribers Get all subscribers

Token Storage

Tokens are stored in the Authentication table:

  • Key - Access token
  • RefreshToken - Refresh token

About

OneBill API integration scripts for Airtable automations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors