Skip to content

Commit 7e4c00d

Browse files
authored
Airtable new actions (#16423)
* Airtable new actions * Package update
1 parent 4a30ccc commit 7e4c00d

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import airtable from "../../airtable_oauth.app.mjs";
2+
3+
export default {
4+
key: "airtable_oauth-list-bases",
5+
name: "List Bases",
6+
description:
7+
"Get the list of bases that can be accessed. [See the documentation](https://airtable.com/developers/web/api/list-bases)",
8+
type: "action",
9+
version: "0.0.1",
10+
props: {
11+
airtable,
12+
},
13+
async run({ $ }) {
14+
const { bases } = await this.airtable.listBases({
15+
$,
16+
});
17+
$.export(
18+
"$summary",
19+
`Successfully retrieved ${bases.length} bases`,
20+
);
21+
return bases;
22+
},
23+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import airtable from "../../airtable_oauth.app.mjs";
2+
3+
export default {
4+
key: "airtable_oauth-list-tables",
5+
name: "List Tables",
6+
description:
7+
"Get a list of tables in the selected base. [See the documentation](https://airtable.com/developers/web/api/get-base-schema)",
8+
type: "action",
9+
version: "0.0.1",
10+
props: {
11+
airtable,
12+
baseId: {
13+
propDefinition: [
14+
airtable,
15+
"baseId",
16+
],
17+
},
18+
},
19+
async run({ $ }) {
20+
const { tables } = await this.airtable.listTables({
21+
$,
22+
baseId: this.baseId,
23+
});
24+
$.export(
25+
"$summary",
26+
`Successfully retrieved ${tables.length} tables`,
27+
);
28+
return tables;
29+
},
30+
};

components/airtable_oauth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/airtable_oauth",
3-
"version": "0.4.4",
3+
"version": "0.5.0",
44
"description": "Pipedream Airtable (OAuth) Components",
55
"main": "airtable_oauth.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)