Skip to content
This repository was archived by the owner on Jul 15, 2026. It is now read-only.

Repository files navigation

Airtable Watcher

Go Report Card Documentation

Airtable watcher makes it easy to run backend go code based on an airtable frontend.

The library watches an airtable base and runs a function when a field is changed to the triggerValue.

Example

example

Usage

Set up an airtable base like this one. Then write code to listen for any rows that have the State field set to ToDo.

func printTask(ctx context.Context, watcher *Watcher, tableName string, row *Row) {
    fmt.Printf("Running code on %v", row)
    // Make sure to change state after work is done!
    watcher.SetRow("Tasks", row.ID, map[string]interface{}{"State": "Done"})
}

func Example() {
    tasker, _ := NewWatcher(os.Getenv("AIRTABLE_KEY"), os.Getenv("AIRTABLE_BASE"))
    tasker.PollInterval = time.Second * 5

    // Register function
    tasker.RegisterFunction("Tasks", "State", "ToDo", printTask)

    // Start tasker
    tasker.Start(context.Background())
}

About

Go library to watch an airtable base and run go code once a field is set to a trigger value

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages