-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Enhance Gmail component with thread message listing functionality #18984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import gmail from "../../gmail.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "gmail-list-thread-messages", | ||
| name: "List Thread Messages", | ||
| description: "List messages in a thread. [See the docs](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.threads/get)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| gmail, | ||
| threadId: { | ||
| propDefinition: [ | ||
| gmail, | ||
| "threadId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { messages = [] } = await this.gmail.getThread({ | ||
| threadId: this.threadId, | ||
| }); | ||
|
|
||
| const suffix = messages.length === 1 | ||
| ? "" | ||
| : "s"; | ||
| $.export("$summary", `Successfully listed ${messages.length} message${suffix}`); | ||
| return messages; | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,7 +6,7 @@ export default { | |||||
| key: "gmail-new-sent-email", | ||||||
| name: "New Sent Email", | ||||||
| description: "Emit new event for each new email sent. (Maximum of 100 events emited per execution)", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix typo in description ("emited" → "emitted"). - description: "Emit new event for each new email sent. (Maximum of 100 events emited per execution)",
+ description: "Emit new event for each new email sent. (Maximum of 100 events emitted per execution)",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| version: "0.1.2", | ||||||
| version: "0.1.3", | ||||||
| type: "source", | ||||||
| dedupe: "unique", | ||||||
| props: { | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
Patch version bump looks good.
No functional changes here; the metadata bump to 0.0.4 is appropriate.
To keep versions consistent across the Gmail package and actions, you can run:
🏁 Script executed:
Length of output: 1468
Patch version bump is consistent across Gmail actions.
The metadata bump to 0.0.4 aligns with peer actions in components/gmail/actions.
Optional refactors:
response.datainstead of the full HTTP response for a more stable interface.textColor/backgroundColoroptional and validate hex codes.🤖 Prompt for AI Agents