Plugins
Google Sheets
Read, append, update, and clear values in Google Sheets via OAuth.
Authentication
| Type | Default | Details |
|---|---|---|
oauth_2 | ✅ | Google OAuth with the https://www.googleapis.com/auth/spreadsheets scope |
The plugin's oauthConfig defaults to access_type=offline + prompt=consent so you get a refresh token on first authorization.
Endpoints
| Path | Risk | Description |
|---|---|---|
spreadsheets.get | read | Spreadsheet metadata + sheet list. |
values.get | read | Read values from a range ('Sheet1!A1:C100'). |
values.append | write | Append rows to a range. |
values.update | write | Overwrite values at a range. |
values.clear | destructive | Clear values at a range (formatting preserved). |
values.get
const { values } = await fabric.googlesheets.api.values.get({
spreadsheetId: '1abcDEF...',
range: 'Sheet1!A1:E10',
});values.append
await fabric.googlesheets.api.values.append({
spreadsheetId: '1abcDEF...',
range: 'Sheet1!A:E',
values: [
['Customer', 'Email', 'Plan', 'MRR', 'Created'],
['Acme', 'ar@acme.com', 'Pro', 99, new Date().toISOString()],
],
valueInputOption: 'USER_ENTERED',
});valueInputOption: 'USER_ENTERED' lets Sheets parse formulas + dates; 'RAW' writes literal strings.
Factory
import { googleSheets } from '@fabricorg/integrations/plugins';
const fabric = createFabric({
plugins: [
googleSheets({ accessToken: process.env.GOOGLESHEETS_ACCESS_TOKEN }),
],
});Pair with refreshAccessToken from @fabricorg/integrations/oauth to keep tokens current.