Skip to content

Commit 084cee1

Browse files
committed
会社メールをdiscordに転送する
1 parent abbc527 commit 084cee1

File tree

1 file changed

+6
-2
lines changed
  • packages/uplim-info-gmail/src

1 file changed

+6
-2
lines changed

packages/uplim-info-gmail/src/main.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import { postMessage } from "utils";
22
import { createMessage } from "./functions/createMessage";
33

44
function main() {
5-
const threads = GmailApp.search("in:Inbox is:Unread", 0, 100);
5+
const threads = GmailApp.search(
6+
"in:Inbox is:Unread to:info@uplim.co.jp",
7+
0,
8+
100,
9+
);
610
const label = GmailApp.getUserLabelByName("isNotified");
711

812
for (const thread of threads) {
@@ -20,7 +24,7 @@ function main() {
2024
text.length > 2000 ? `${text.substring(0, 1995)}...` : text;
2125

2226
postMessage({
23-
username: "Uplim Info Gmail",
27+
username: "info@uplim.co.jp",
2428
parse: "full",
2529
avatar_url:
2630
"https://cdn.discordapp.com/attachments/792765244040675389/921661726863282176/pngegg.png",

0 commit comments

Comments
 (0)