@guayaba/workflow-piece-gmail 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +3 -0
- package/.eslintrc.json +37 -0
- package/README.md +5 -0
- package/assets/logo.png +0 -0
- package/package.json +31 -0
- package/src/i18n/ca.json +63 -0
- package/src/i18n/de.json +129 -0
- package/src/i18n/es.json +129 -0
- package/src/i18n/fr.json +129 -0
- package/src/i18n/hi.json +63 -0
- package/src/i18n/id.json +63 -0
- package/src/i18n/ja.json +129 -0
- package/src/i18n/nl.json +129 -0
- package/src/i18n/pt.json +129 -0
- package/src/i18n/ru.json +63 -0
- package/src/i18n/translation.json +129 -0
- package/src/i18n/vi.json +63 -0
- package/src/i18n/zh.json +129 -0
- package/src/index.ts +69 -0
- package/src/lib/actions/create-draft-reply-action.ts +306 -0
- package/src/lib/actions/get-mail-action.ts +44 -0
- package/src/lib/actions/get-thread-action.ts +39 -0
- package/src/lib/actions/reply-to-email-action.ts +220 -0
- package/src/lib/actions/request-approval-in-email.ts +194 -0
- package/src/lib/actions/search-email-action.ts +211 -0
- package/src/lib/actions/send-email-action.ts +205 -0
- package/src/lib/auth.ts +116 -0
- package/src/lib/common/data.ts +268 -0
- package/src/lib/common/models.ts +91 -0
- package/src/lib/common/props.ts +256 -0
- package/src/lib/triggers/new-attachment.ts +198 -0
- package/src/lib/triggers/new-conversation.ts +413 -0
- package/src/lib/triggers/new-email.ts +167 -0
- package/src/lib/triggers/new-label.ts +77 -0
- package/src/lib/triggers/new-labeled-email.ts +192 -0
- package/tsconfig.json +16 -0
- package/tsconfig.lib.json +15 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Email service by Google": "Email service by Google",
|
|
3
|
+
"Send Email": "Send Email",
|
|
4
|
+
"Request Approval in Email": "Request Approval in Email",
|
|
5
|
+
"Reply to Email": "Reply to Email",
|
|
6
|
+
"Create Draft Reply": "Create Draft Reply",
|
|
7
|
+
"Get Email": "Get Email",
|
|
8
|
+
"Find Email": "Find Email",
|
|
9
|
+
"Custom API Call": "Custom API Call",
|
|
10
|
+
"Send an email through a Gmail account": "Send an email through a Gmail account",
|
|
11
|
+
"Send approval request email and then wait until the email is approved or disapproved": "Send approval request email and then wait until the email is approved or disapproved",
|
|
12
|
+
"Reply to an existing email.": "Reply to an existing email.",
|
|
13
|
+
"Creates a draft reply to an existing email.": "Creates a draft reply to an existing email.",
|
|
14
|
+
"Get an email via Id.": "Get an email via Id.",
|
|
15
|
+
"Find emails using advanced search criteria. If no filters are provided, the latest emails are returned.": "Find emails using advanced search criteria. If no filters are provided, the latest emails are returned.",
|
|
16
|
+
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
|
17
|
+
"Receiver Email (To)": "Receiver Email (To)",
|
|
18
|
+
"CC Email": "CC Email",
|
|
19
|
+
"BCC Email": "BCC Email",
|
|
20
|
+
"Subject": "Subject",
|
|
21
|
+
"Body Type": "Body Type",
|
|
22
|
+
"Body": "Body",
|
|
23
|
+
"Reply-To Email": "Reply-To Email",
|
|
24
|
+
"Sender Name": "Sender Name",
|
|
25
|
+
"Sender Email": "Sender Email",
|
|
26
|
+
"Attachments": "Attachments",
|
|
27
|
+
"In reply to": "In reply to",
|
|
28
|
+
"Create draft": "Create draft",
|
|
29
|
+
"Message": "Message",
|
|
30
|
+
"Reply Type": "Reply Type",
|
|
31
|
+
"Reply Body": "Reply Body",
|
|
32
|
+
"Attachment": "Attachment",
|
|
33
|
+
"Attachment Name": "Attachment Name",
|
|
34
|
+
"Draft Reply Body": "Draft Reply Body",
|
|
35
|
+
"Include Original Message": "Include Original Message",
|
|
36
|
+
"Message ID": "Message ID",
|
|
37
|
+
"Email sender": "Email sender",
|
|
38
|
+
"Email recipient": "Email recipient",
|
|
39
|
+
"Email subject": "Email subject",
|
|
40
|
+
"Email Content": "Email Content",
|
|
41
|
+
"Has Attachment": "Has Attachment",
|
|
42
|
+
"Label": "Label",
|
|
43
|
+
"Category": "Category",
|
|
44
|
+
"After Date": "After Date",
|
|
45
|
+
"Before Date": "Before Date",
|
|
46
|
+
"Include Spam & Trash": "Include Spam & Trash",
|
|
47
|
+
"Max Results": "Max Results",
|
|
48
|
+
"Method": "Method",
|
|
49
|
+
"Headers": "Headers",
|
|
50
|
+
"Query Parameters": "Query Parameters",
|
|
51
|
+
"Response is Binary ?": "Response is Binary ?",
|
|
52
|
+
"No Error on Failure": "No Error on Failure",
|
|
53
|
+
"Timeout (in seconds)": "Timeout (in seconds)",
|
|
54
|
+
"Follow redirects": "Follow redirects",
|
|
55
|
+
"Body for the email you want to send": "Body for the email you want to send",
|
|
56
|
+
"Email address to set as the \"Reply-To\" header": "Email address to set as the \"Reply-To\" header",
|
|
57
|
+
"The address must be listed in your GMail account's settings": "The address must be listed in your GMail account's settings",
|
|
58
|
+
"Reply to this Message-ID": "Reply to this Message-ID",
|
|
59
|
+
"Create draft without sending the actual email": "Create draft without sending the actual email",
|
|
60
|
+
"The email address of the recipient who will receive the approval request.": "The email address of the recipient who will receive the approval request.",
|
|
61
|
+
"The email addresses of the recipients who will receive a carbon copy of the approval request.": "The email addresses of the recipients who will receive a carbon copy of the approval request.",
|
|
62
|
+
"The email addresses of the recipients who will receive a blind carbon copy of the approval request.": "The email addresses of the recipients who will receive a blind carbon copy of the approval request.",
|
|
63
|
+
"The subject of the approval request email.": "The subject of the approval request email.",
|
|
64
|
+
"Select a message from the list or enter a message ID manually.": "Select a message from the list or enter a message ID manually.",
|
|
65
|
+
"Choose whether to reply to sender only or to all recipients": "Choose whether to reply to sender only or to all recipients",
|
|
66
|
+
"Your reply message content": "Your reply message content",
|
|
67
|
+
"Optional sender name to display": "Optional sender name to display",
|
|
68
|
+
"Optional file to attach to your reply": "Optional file to attach to your reply",
|
|
69
|
+
"Custom name for the attachment": "Custom name for the attachment",
|
|
70
|
+
"Your draft reply message content": "Your draft reply message content",
|
|
71
|
+
"Include the original message content in the draft reply": "Include the original message content in the draft reply",
|
|
72
|
+
"Optional file to attach to your draft reply": "Optional file to attach to your draft reply",
|
|
73
|
+
"The messageId of the mail to read.": "The messageId of the mail to read.",
|
|
74
|
+
"Optional filteration, leave empty to filter based on the email sender": "Optional filteration, leave empty to filter based on the email sender",
|
|
75
|
+
"Optional filteration, leave empty to filter based on the email recipient": "Optional filteration, leave empty to filter based on the email recipient",
|
|
76
|
+
"The email subject": "The email subject",
|
|
77
|
+
"Search for specific text within email body": "Search for specific text within email body",
|
|
78
|
+
"Only find emails with attachments": "Only find emails with attachments",
|
|
79
|
+
"Search for emails with specific attachment filename": "Search for emails with specific attachment filename",
|
|
80
|
+
"Optional filteration, leave unselected to filter based on the email label": "Optional filteration, leave unselected to filter based on the email label",
|
|
81
|
+
"Optional filteration, leave unselected to filter based on the email category": "Optional filteration, leave unselected to filter based on the email category",
|
|
82
|
+
"Find emails sent after this date": "Find emails sent after this date",
|
|
83
|
+
"Find emails sent before this date": "Find emails sent before this date",
|
|
84
|
+
"Include emails from Spam and Trash folders in search results": "Include emails from Spam and Trash folders in search results",
|
|
85
|
+
"Maximum number of emails to return (1-500)": "Maximum number of emails to return (1-500)",
|
|
86
|
+
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
|
87
|
+
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
|
|
88
|
+
"plain text": "plain text",
|
|
89
|
+
"html": "html",
|
|
90
|
+
"Reply (to sender only)": "Reply (to sender only)",
|
|
91
|
+
"Reply All (to all recipients)": "Reply All (to all recipients)",
|
|
92
|
+
"Plain text": "Plain text",
|
|
93
|
+
"HTML": "HTML",
|
|
94
|
+
"Primary": "Primary",
|
|
95
|
+
"Social": "Social",
|
|
96
|
+
"Promotions": "Promotions",
|
|
97
|
+
"Updates": "Updates",
|
|
98
|
+
"Forums": "Forums",
|
|
99
|
+
"Reservations": "Reservations",
|
|
100
|
+
"Purchases": "Purchases",
|
|
101
|
+
"GET": "GET",
|
|
102
|
+
"POST": "POST",
|
|
103
|
+
"PATCH": "PATCH",
|
|
104
|
+
"PUT": "PUT",
|
|
105
|
+
"DELETE": "DELETE",
|
|
106
|
+
"HEAD": "HEAD",
|
|
107
|
+
"None": "None",
|
|
108
|
+
"JSON": "JSON",
|
|
109
|
+
"Form Data": "Form Data",
|
|
110
|
+
"Raw": "Raw",
|
|
111
|
+
"New Email": "New Email",
|
|
112
|
+
"New Labeled Email": "New Labeled Email",
|
|
113
|
+
"New Attachment": "New Attachment",
|
|
114
|
+
"New Label": "New Label",
|
|
115
|
+
"Triggers when new mail is found in your Gmail inbox": "Triggers when new mail is found in your Gmail inbox",
|
|
116
|
+
"Triggers when a label is added to an email": "Triggers when a label is added to an email",
|
|
117
|
+
"Triggers when an email with an attachment arrives.": "Triggers when an email with an attachment arrives.",
|
|
118
|
+
"Triggers when a new label is created.": "Triggers when a new label is created.",
|
|
119
|
+
"From": "From",
|
|
120
|
+
"To": "To",
|
|
121
|
+
"Subject Contains": "Subject Contains",
|
|
122
|
+
"File Extension": "File Extension",
|
|
123
|
+
"Filter by sender email.": "Filter by sender email.",
|
|
124
|
+
"Filter by recipient email.": "Filter by recipient email.",
|
|
125
|
+
"Only trigger for emails containing this text in the subject.": "Only trigger for emails containing this text in the subject.",
|
|
126
|
+
"Filter by Gmail label.": "Filter by Gmail label.",
|
|
127
|
+
"Filter by Gmail category.": "Filter by Gmail category.",
|
|
128
|
+
"Only trigger for attachments with this file extension (e.g., pdf, jpg, docx).": "Only trigger for attachments with this file extension (e.g., pdf, jpg, docx)."
|
|
129
|
+
}
|
package/src/i18n/vi.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Gmail": "Gmail",
|
|
3
|
+
"Email service by Google": "Email service by Google",
|
|
4
|
+
"Send Email": "Send Email",
|
|
5
|
+
"Custom API Call": "Custom API Call",
|
|
6
|
+
"Send an email through a Gmail account": "Send an email through a Gmail account",
|
|
7
|
+
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
|
8
|
+
"Receiver Email (To)": "Receiver Email (To)",
|
|
9
|
+
"CC Email": "CC Email",
|
|
10
|
+
"BCC Email": "BCC Email",
|
|
11
|
+
"Subject": "Subject",
|
|
12
|
+
"Body Type": "Body Type",
|
|
13
|
+
"Body": "Body",
|
|
14
|
+
"Reply-To Email": "Reply-To Email",
|
|
15
|
+
"Sender Name": "Sender Name",
|
|
16
|
+
"Sender Email": "Sender Email",
|
|
17
|
+
"Attachment": "Attachment",
|
|
18
|
+
"Attachment Name": "Attachment Name",
|
|
19
|
+
"In reply to": "In reply to",
|
|
20
|
+
"Create draft": "Create draft",
|
|
21
|
+
"Method": "Method",
|
|
22
|
+
"Headers": "Headers",
|
|
23
|
+
"Query Parameters": "Query Parameters",
|
|
24
|
+
"No Error on Failure": "No Error on Failure",
|
|
25
|
+
"Timeout (in seconds)": "Timeout (in seconds)",
|
|
26
|
+
"Body for the email you want to send": "Body for the email you want to send",
|
|
27
|
+
"Email address to set as the \"Reply-To\" header": "Email address to set as the \"Reply-To\" header",
|
|
28
|
+
"The address must be listed in your GMail account's settings": "The address must be listed in your GMail account's settings",
|
|
29
|
+
"File to attach to the email you want to send": "File to attach to the email you want to send",
|
|
30
|
+
"In case you want to change the name of the attachment": "In case you want to change the name of the attachment",
|
|
31
|
+
"Reply to this Message-ID": "Reply to this Message-ID",
|
|
32
|
+
"Create draft without sending the actual email": "Create draft without sending the actual email",
|
|
33
|
+
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
|
34
|
+
"plain text": "plain text",
|
|
35
|
+
"html": "html",
|
|
36
|
+
"GET": "GET",
|
|
37
|
+
"POST": "POST",
|
|
38
|
+
"PATCH": "PATCH",
|
|
39
|
+
"PUT": "PUT",
|
|
40
|
+
"DELETE": "DELETE",
|
|
41
|
+
"HEAD": "HEAD",
|
|
42
|
+
"New Email": "New Email",
|
|
43
|
+
"New Labeled Email": "New Labeled Email",
|
|
44
|
+
"Triggers when new mail is found in your Gmail inbox": "Triggers when new mail is found in your Gmail inbox",
|
|
45
|
+
"Triggers when a label is added to an email": "Triggers when a label is added to an email",
|
|
46
|
+
"Email subject": "Email subject",
|
|
47
|
+
"Email sender": "Email sender",
|
|
48
|
+
"Email recipient": "Email recipient",
|
|
49
|
+
"Label": "Label",
|
|
50
|
+
"Category": "Category",
|
|
51
|
+
"The email subject": "The email subject",
|
|
52
|
+
"Optional filteration, leave empty to filter based on the email sender": "Optional filteration, leave empty to filter based on the email sender",
|
|
53
|
+
"Optional filteration, leave empty to filter based on the email recipient": "Optional filteration, leave empty to filter based on the email recipient",
|
|
54
|
+
"Optional filteration, leave unselected to filter based on the email label": "Optional filteration, leave unselected to filter based on the email label",
|
|
55
|
+
"Optional filteration, leave unselected to filter based on the email category": "Optional filteration, leave unselected to filter based on the email category",
|
|
56
|
+
"Primary": "Primary",
|
|
57
|
+
"Social": "Social",
|
|
58
|
+
"Promotions": "Promotions",
|
|
59
|
+
"Updates": "Updates",
|
|
60
|
+
"Forums": "Forums",
|
|
61
|
+
"Reservations": "Reservations",
|
|
62
|
+
"Purchases": "Purchases"
|
|
63
|
+
}
|
package/src/i18n/zh.json
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Email service by Google": "Email service by Google",
|
|
3
|
+
"Send Email": "Send Email",
|
|
4
|
+
"Request Approval in Email": "Request Approval in Email",
|
|
5
|
+
"Reply to Email": "Reply to Email",
|
|
6
|
+
"Create Draft Reply": "Create Draft Reply",
|
|
7
|
+
"Get Email": "Get Email",
|
|
8
|
+
"Find Email": "Find Email",
|
|
9
|
+
"Custom API Call": "自定义 API 呼叫",
|
|
10
|
+
"Send an email through a Gmail account": "Send an email through a Gmail account",
|
|
11
|
+
"Send approval request email and then wait until the email is approved or disapproved": "Send approval request email and then wait until the email is approved or disapproved",
|
|
12
|
+
"Reply to an existing email.": "Reply to an existing email.",
|
|
13
|
+
"Creates a draft reply to an existing email.": "Creates a draft reply to an existing email.",
|
|
14
|
+
"Get an email via Id.": "Get an email via Id.",
|
|
15
|
+
"Find emails using advanced search criteria. At least one search filter (from, to, subject, label, category, date, content, or attachment) is required.": "Find emails using advanced search criteria. At least one search filter (from, to, subject, label, category, date, content, or attachment) is required.",
|
|
16
|
+
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
|
|
17
|
+
"Receiver Email (To)": "Receiver Email (To)",
|
|
18
|
+
"CC Email": "CC Email",
|
|
19
|
+
"BCC Email": "BCC Email",
|
|
20
|
+
"Subject": "Subject",
|
|
21
|
+
"Body Type": "Body Type",
|
|
22
|
+
"Body": "正文内容",
|
|
23
|
+
"Reply-To Email": "Reply-To Email",
|
|
24
|
+
"Sender Name": "发件人姓名",
|
|
25
|
+
"Sender Email": "发件人电子邮件",
|
|
26
|
+
"Attachments": "Attachments",
|
|
27
|
+
"In reply to": "In reply to",
|
|
28
|
+
"Create draft": "Create draft",
|
|
29
|
+
"Message": "Message",
|
|
30
|
+
"Reply Type": "Reply Type",
|
|
31
|
+
"Reply Body": "Reply Body",
|
|
32
|
+
"Attachment": "Attachment",
|
|
33
|
+
"Attachment Name": "Attachment Name",
|
|
34
|
+
"Draft Reply Body": "Draft Reply Body",
|
|
35
|
+
"Include Original Message": "Include Original Message",
|
|
36
|
+
"Message ID": "Message ID",
|
|
37
|
+
"Email sender": "Email sender",
|
|
38
|
+
"Email recipient": "Email recipient",
|
|
39
|
+
"Email subject": "Email subject",
|
|
40
|
+
"Email Content": "Email Content",
|
|
41
|
+
"Has Attachment": "Has Attachment",
|
|
42
|
+
"Label": "Label",
|
|
43
|
+
"Category": "Category",
|
|
44
|
+
"After Date": "After Date",
|
|
45
|
+
"Before Date": "Before Date",
|
|
46
|
+
"Include Spam & Trash": "Include Spam & Trash",
|
|
47
|
+
"Max Results": "Max Results",
|
|
48
|
+
"Method": "方法",
|
|
49
|
+
"Headers": "信头",
|
|
50
|
+
"Query Parameters": "查询参数",
|
|
51
|
+
"Response is Binary ?": "Response is Binary ?",
|
|
52
|
+
"No Error on Failure": "失败时没有错误",
|
|
53
|
+
"Timeout (in seconds)": "超时(秒)",
|
|
54
|
+
"Follow redirects": "Follow redirects",
|
|
55
|
+
"Body for the email you want to send": "Body for the email you want to send",
|
|
56
|
+
"Email address to set as the \"Reply-To\" header": "Email address to set as the \"Reply-To\" header",
|
|
57
|
+
"The address must be listed in your GMail account's settings": "The address must be listed in your GMail account's settings",
|
|
58
|
+
"Reply to this Message-ID": "Reply to this Message-ID",
|
|
59
|
+
"Create draft without sending the actual email": "Create draft without sending the actual email",
|
|
60
|
+
"The email address of the recipient who will receive the approval request.": "The email address of the recipient who will receive the approval request.",
|
|
61
|
+
"The email addresses of the recipients who will receive a carbon copy of the approval request.": "The email addresses of the recipients who will receive a carbon copy of the approval request.",
|
|
62
|
+
"The email addresses of the recipients who will receive a blind carbon copy of the approval request.": "The email addresses of the recipients who will receive a blind carbon copy of the approval request.",
|
|
63
|
+
"The subject of the approval request email.": "The subject of the approval request email.",
|
|
64
|
+
"Select a message from the list or enter a message ID manually.": "Select a message from the list or enter a message ID manually.",
|
|
65
|
+
"Choose whether to reply to sender only or to all recipients": "Choose whether to reply to sender only or to all recipients",
|
|
66
|
+
"Your reply message content": "Your reply message content",
|
|
67
|
+
"Optional sender name to display": "Optional sender name to display",
|
|
68
|
+
"Optional file to attach to your reply": "Optional file to attach to your reply",
|
|
69
|
+
"Custom name for the attachment": "Custom name for the attachment",
|
|
70
|
+
"Your draft reply message content": "Your draft reply message content",
|
|
71
|
+
"Include the original message content in the draft reply": "Include the original message content in the draft reply",
|
|
72
|
+
"Optional file to attach to your draft reply": "Optional file to attach to your draft reply",
|
|
73
|
+
"The messageId of the mail to read.": "The messageId of the mail to read.",
|
|
74
|
+
"Optional filteration, leave empty to filter based on the email sender": "Optional filteration, leave empty to filter based on the email sender",
|
|
75
|
+
"Optional filteration, leave empty to filter based on the email recipient": "Optional filteration, leave empty to filter based on the email recipient",
|
|
76
|
+
"The email subject": "The email subject",
|
|
77
|
+
"Search for specific text within email body": "Search for specific text within email body",
|
|
78
|
+
"Only find emails with attachments": "Only find emails with attachments",
|
|
79
|
+
"Search for emails with specific attachment filename": "Search for emails with specific attachment filename",
|
|
80
|
+
"Optional filteration, leave unselected to filter based on the email label": "Optional filteration, leave unselected to filter based on the email label",
|
|
81
|
+
"Optional filteration, leave unselected to filter based on the email category": "Optional filteration, leave unselected to filter based on the email category",
|
|
82
|
+
"Find emails sent after this date": "Find emails sent after this date",
|
|
83
|
+
"Find emails sent before this date": "Find emails sent before this date",
|
|
84
|
+
"Include emails from Spam and Trash folders in search results": "Include emails from Spam and Trash folders in search results",
|
|
85
|
+
"Maximum number of emails to return (1-500)": "Maximum number of emails to return (1-500)",
|
|
86
|
+
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
|
|
87
|
+
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
|
|
88
|
+
"plain text": "plain text",
|
|
89
|
+
"html": "html",
|
|
90
|
+
"Reply (to sender only)": "Reply (to sender only)",
|
|
91
|
+
"Reply All (to all recipients)": "Reply All (to all recipients)",
|
|
92
|
+
"Plain text": "Plain text",
|
|
93
|
+
"HTML": "HTML",
|
|
94
|
+
"Primary": "Primary",
|
|
95
|
+
"Social": "Social",
|
|
96
|
+
"Promotions": "Promotions",
|
|
97
|
+
"Updates": "Updates",
|
|
98
|
+
"Forums": "Forums",
|
|
99
|
+
"Reservations": "Reservations",
|
|
100
|
+
"Purchases": "Purchases",
|
|
101
|
+
"GET": "获取",
|
|
102
|
+
"POST": "帖子",
|
|
103
|
+
"PATCH": "PATCH",
|
|
104
|
+
"PUT": "弹出",
|
|
105
|
+
"DELETE": "删除",
|
|
106
|
+
"HEAD": "黑色",
|
|
107
|
+
"None": "无",
|
|
108
|
+
"JSON": "JSON",
|
|
109
|
+
"Form Data": "表单数据",
|
|
110
|
+
"Raw": "原始文件",
|
|
111
|
+
"New Email": "New Email",
|
|
112
|
+
"New Labeled Email": "New Labeled Email",
|
|
113
|
+
"New Attachment": "New Attachment",
|
|
114
|
+
"New Label": "New Label",
|
|
115
|
+
"Triggers when new mail is found in your Gmail inbox": "Triggers when new mail is found in your Gmail inbox",
|
|
116
|
+
"Triggers when a label is added to an email": "Triggers when a label is added to an email",
|
|
117
|
+
"Triggers when an email with an attachment arrives.": "Triggers when an email with an attachment arrives.",
|
|
118
|
+
"Triggers when a new label is created.": "Triggers when a new label is created.",
|
|
119
|
+
"From": "From",
|
|
120
|
+
"To": "To",
|
|
121
|
+
"Subject Contains": "Subject Contains",
|
|
122
|
+
"File Extension": "File Extension",
|
|
123
|
+
"Filter by sender email.": "Filter by sender email.",
|
|
124
|
+
"Filter by recipient email.": "Filter by recipient email.",
|
|
125
|
+
"Only trigger for emails containing this text in the subject.": "Only trigger for emails containing this text in the subject.",
|
|
126
|
+
"Filter by Gmail label.": "Filter by Gmail label.",
|
|
127
|
+
"Filter by Gmail category.": "Filter by Gmail category.",
|
|
128
|
+
"Only trigger for attachments with this file extension (e.g., pdf, jpg, docx).": "Only trigger for attachments with this file extension (e.g., pdf, jpg, docx)."
|
|
129
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { createCustomApiCallAction } from '@guayaba/workflows-common';
|
|
2
|
+
import { createPiece } from '@guayaba/workflows-framework';
|
|
3
|
+
import { PieceCategory } from '@guayaba/workflows-shared';
|
|
4
|
+
import { gmailSendEmailAction } from './lib/actions/send-email-action';
|
|
5
|
+
import { gmailReplyToEmailAction } from './lib/actions/reply-to-email-action';
|
|
6
|
+
import { gmailCreateDraftReplyAction } from './lib/actions/create-draft-reply-action';
|
|
7
|
+
import { gmailNewEmailTrigger } from './lib/triggers/new-email';
|
|
8
|
+
import { gmailNewLabeledEmailTrigger } from './lib/triggers/new-labeled-email';
|
|
9
|
+
import { requestApprovalInEmail } from './lib/actions/request-approval-in-email';
|
|
10
|
+
import { gmailNewAttachmentTrigger } from './lib/triggers/new-attachment';
|
|
11
|
+
import { gmailNewLabelTrigger } from './lib/triggers/new-label';
|
|
12
|
+
import { gmailSearchMailAction } from './lib/actions/search-email-action';
|
|
13
|
+
import { gmailGetEmailAction } from './lib/actions/get-mail-action';
|
|
14
|
+
import { gmailAuth, getAccessToken, GmailAuthValue } from './lib/auth';
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
gmailAuth,
|
|
18
|
+
getAccessToken,
|
|
19
|
+
GmailAuthValue,
|
|
20
|
+
createGoogleClient,
|
|
21
|
+
} from './lib/auth';
|
|
22
|
+
|
|
23
|
+
export const gmail = createPiece({
|
|
24
|
+
minimumSupportedRelease: '0.82.0',
|
|
25
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/gmail.png',
|
|
26
|
+
categories: [
|
|
27
|
+
PieceCategory.COMMUNICATION,
|
|
28
|
+
PieceCategory.BUSINESS_INTELLIGENCE,
|
|
29
|
+
],
|
|
30
|
+
actions: [
|
|
31
|
+
gmailSendEmailAction,
|
|
32
|
+
requestApprovalInEmail,
|
|
33
|
+
gmailReplyToEmailAction,
|
|
34
|
+
gmailCreateDraftReplyAction,
|
|
35
|
+
gmailGetEmailAction,
|
|
36
|
+
gmailSearchMailAction,
|
|
37
|
+
createCustomApiCallAction({
|
|
38
|
+
baseUrl: () => 'https://gmail.googleapis.com/gmail/v1',
|
|
39
|
+
auth: gmailAuth,
|
|
40
|
+
authMapping: async (auth) => ({
|
|
41
|
+
Authorization: `Bearer ${await getAccessToken(auth as GmailAuthValue)}`,
|
|
42
|
+
}),
|
|
43
|
+
}),
|
|
44
|
+
],
|
|
45
|
+
displayName: 'Gmail',
|
|
46
|
+
description: 'Email service by Google',
|
|
47
|
+
|
|
48
|
+
authors: [
|
|
49
|
+
'kanarelo',
|
|
50
|
+
'abdullahranginwala',
|
|
51
|
+
'BastienMe',
|
|
52
|
+
'Salem-Alaa',
|
|
53
|
+
'kishanprmr',
|
|
54
|
+
'MoShizzle',
|
|
55
|
+
'AbdulTheActivePiecer',
|
|
56
|
+
'khaledmashaly',
|
|
57
|
+
'abuaboud',
|
|
58
|
+
'AdamSelene',
|
|
59
|
+
'sanket-a11y',
|
|
60
|
+
'onyedikachi-david',
|
|
61
|
+
],
|
|
62
|
+
triggers: [
|
|
63
|
+
gmailNewEmailTrigger,
|
|
64
|
+
gmailNewLabeledEmailTrigger,
|
|
65
|
+
gmailNewAttachmentTrigger,
|
|
66
|
+
gmailNewLabelTrigger,
|
|
67
|
+
],
|
|
68
|
+
auth: gmailAuth,
|
|
69
|
+
});
|