n8n-nodes-gmail-custom 0.6.0 → 0.6.1
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/README.md +66 -53
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,66 +1,79 @@
|
|
|
1
1
|
# n8n-nodes-gmail-custom
|
|
2
2
|
|
|
3
|
-
Self-contained n8n
|
|
3
|
+
Self-contained n8n nodes for Gmail API via Google service accounts with domain-wide delegation. No n8n credential setup required — all parameters inline, supports expressions.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Nodes
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
| Node | Description |
|
|
8
|
+
|---|---|
|
|
9
|
+
| **Gmail Custom** | Send emails via Gmail API |
|
|
10
|
+
| **Gmail Trigger Custom** | Poll Gmail for new messages on a schedule |
|
|
11
|
+
| **Gmail Get Custom** | Get a single Message or Thread by ID |
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
- **Token caching**: access token reused for 58 minutes — only 1 oauth call per hour instead of per email
|
|
11
|
-
- **Domain-wide delegation**: send as any user in your Workspace domain
|
|
12
|
-
- **Sender name**: set a display name without extra API calls
|
|
13
|
-
- **Optional custom Message-ID**: auto-generated `<uuid@domain>` or specify your own — included in output
|
|
14
|
-
- **Attachments**: from binary data with graceful skip if missing
|
|
15
|
-
- **HTML and plain text email support**
|
|
13
|
+
All three share the same token cache — only 1 oauth call per hour across all nodes.
|
|
16
14
|
|
|
17
15
|
## Installation
|
|
18
16
|
|
|
19
17
|
In n8n: **Settings → Community Nodes → Install** → `n8n-nodes-gmail-custom`
|
|
20
18
|
|
|
21
|
-
##
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
`
|
|
55
|
-
|
|
56
|
-
##
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
19
|
+
## Gmail Custom (Send)
|
|
20
|
+
|
|
21
|
+
Sends an email via Gmail API. Supports HTML/text body, CC, BCC, Reply-To, attachments (with graceful skip), sender name, and optional custom Message-ID.
|
|
22
|
+
|
|
23
|
+
| Field | Description |
|
|
24
|
+
|---|---|
|
|
25
|
+
| Service Account Email | SA `client_email` (JWT `iss`) |
|
|
26
|
+
| Private Key | RSA PEM key (hidden) |
|
|
27
|
+
| From Email | User to impersonate via DWD (JWT `sub`) |
|
|
28
|
+
| To | Recipient(s), comma-separated |
|
|
29
|
+
| Subject | Email subject |
|
|
30
|
+
| Email Type | `HTML` or `Text` |
|
|
31
|
+
| Message | Email body |
|
|
32
|
+
|
|
33
|
+
Options: CC, BCC, Reply-To, Sender Name, Attachments (binary data), Custom Message-ID (auto-generated `<uuid@domain>` if empty).
|
|
34
|
+
|
|
35
|
+
Output: `{ id, threadId, labelIds, messageId }` (messageId only when Custom Message-ID enabled).
|
|
36
|
+
|
|
37
|
+
## Gmail Trigger Custom (Polling)
|
|
38
|
+
|
|
39
|
+
Polls Gmail inbox on a schedule and returns new messages. State persists between polls via workflow static data.
|
|
40
|
+
|
|
41
|
+
| Field | Description |
|
|
42
|
+
|---|---|
|
|
43
|
+
| Service Account Email | SA `client_email` |
|
|
44
|
+
| Private Key | RSA PEM key |
|
|
45
|
+
| Delegated Email | Mailbox to monitor (impersonated user) |
|
|
46
|
+
| Simplify | `true` = metadata only, `false` = raw |
|
|
47
|
+
| Max Emails per Poll | 1-50, excess queued for next poll |
|
|
48
|
+
| Mark as Read | Optional: marks processed emails as read (+1 API call per email) |
|
|
49
|
+
|
|
50
|
+
Filters: Include Spam/Trash, Include Drafts, Label IDs, Search query, Read Status, Sender.
|
|
51
|
+
|
|
52
|
+
Output: `[{ json: { id, threadId, labelIds, payload, ... } }]` — flat headers when simplify is true.
|
|
53
|
+
|
|
54
|
+
## Gmail Get Custom (Message / Thread)
|
|
55
|
+
|
|
56
|
+
Retrieves a single message or thread by ID.
|
|
57
|
+
|
|
58
|
+
| Field | Description |
|
|
59
|
+
|---|---|
|
|
60
|
+
| Service Account Email | SA `client_email` |
|
|
61
|
+
| Private Key | RSA PEM key |
|
|
62
|
+
| Delegated Email | Mailbox to access |
|
|
63
|
+
| Resource | `Message` or `Thread` |
|
|
64
|
+
| Message ID / Thread ID | The Gmail ID to retrieve |
|
|
65
|
+
| Simplify | `true` = metadata with flat headers, `false` = raw |
|
|
66
|
+
| Return Only Messages | (Thread only) Return message array without thread wrapper |
|
|
67
|
+
|
|
68
|
+
**Get Message output** (simple): `{ id, threadId, labelIds, snippet, From, To, Subject, Cc, Bcc, ... }`
|
|
69
|
+
|
|
70
|
+
**Get Thread output** (simple): `{ id, historyId, messages: [{ id, From, To, Subject, ... }, ...] }`
|
|
71
|
+
|
|
72
|
+
## Token caching
|
|
73
|
+
|
|
74
|
+
Access token is cached in-memory for 58 minutes (3500 seconds). Cache key: `${serviceAccountEmail}:${delegatedEmail}`. All three nodes share the same cache.
|
|
75
|
+
|
|
76
|
+
Per-email API calls: **1 Gmail API call** after the first oauth call of the hour.
|
|
64
77
|
|
|
65
78
|
## License
|
|
66
79
|
|
package/package.json
CHANGED