Skip to content

Commit 96cdc59

Browse files
Adding Gmail List Labels action
1 parent 663754a commit 96cdc59

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import gmail from "../../gmail.app.mjs";
2+
3+
export default {
4+
key: "gmail-list-labels",
5+
name: "List Labels",
6+
description: "List all the existing labels in the connected account. [See the docs](https://developers.google.com/gmail/api/reference/rest/v1/users.labels/list)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
gmail,
11+
},
12+
async run({ $ }) {
13+
const resp = await this.gmail.listLabels();
14+
$.export("$summary", `Successfully retrieved ${resp.labels.length} labels`);
15+
return resp;
16+
},
17+
};

components/gmail/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/gmail",
3-
"version": "0.1.12",
3+
"version": "0.1.13",
44
"description": "Pipedream Gmail Components",
55
"main": "gmail.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)