n8n-nodes-imessage 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Photon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,116 @@
1
+ # n8n-nodes-imessage
2
+
3
+ [![npm version](https://img.shields.io/npm/v/n8n-nodes-imessage.svg)](https://www.npmjs.com/package/n8n-nodes-imessage)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ This is an n8n community node for [Photon iMessage](https://github.com/photon-hq/advanced-imessage-kit). It lets you send, receive, search, and automate iMessage conversations directly from your n8n workflows.
7
+
8
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
9
+
10
+ ## Prerequisites
11
+
12
+ You need a running **Photon iMessage server** on a Mac. The server exposes a REST API that this node communicates with over HTTP.
13
+
14
+ - Install and run the [advanced-imessage-kit](https://github.com/photon-hq/advanced-imessage-kit) server on your Mac
15
+ - Note your **Server URL** (e.g. `https://your-server.example.com`) and **API Key**
16
+
17
+ ## Installation
18
+
19
+ Follow the [n8n community nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) to install `n8n-nodes-imessage` in your n8n instance.
20
+
21
+ ```
22
+ npm install n8n-nodes-imessage
23
+ ```
24
+
25
+ ## Credentials
26
+
27
+ 1. In n8n, go to **Credentials** and create a new **Photon iMessage API** credential
28
+ 2. Enter your **Server URL** — the base URL of your Photon server (no trailing slash)
29
+ 3. Enter your **API Key** — the key is sent as an `X-API-Key` header on every request
30
+ 4. Click **Test** to verify the connection (calls `GET /api/v1/server/info`)
31
+
32
+ ## Nodes
33
+
34
+ ### Photon iMessage (Action Node)
35
+
36
+ Perform operations on your iMessage account.
37
+
38
+ #### Message
39
+
40
+ | Operation | Description |
41
+ |-----------|-------------|
42
+ | **Send Message** | Send a text message to a chat. Supports reply-to, message effects (confetti, fireworks, etc.), and subject lines. |
43
+ | **Send Attachment** | Send a file from the server Mac to a chat. Supports voice messages. |
44
+ | **Unsend Message** | Retract a sent message. |
45
+ | **Edit Message** | Edit the text of a sent message. |
46
+ | **React to Message** | Send a tapback reaction (love, like, dislike, laugh, emphasize, question). |
47
+ | **Download Attachment** | Download a received file or media attachment. |
48
+ | **Search Messages** | Search messages by text content across all chats or a specific chat. |
49
+ | **Get Messages** | Retrieve messages from a chat with date range and sort options. |
50
+
51
+ #### Chat
52
+
53
+ | Operation | Description |
54
+ |-----------|-------------|
55
+ | **List Chats** | List all conversations with optional last message preview. |
56
+ | **Create Chat** | Start a new conversation with one or more participants. |
57
+ | **Mark Chat Read** | Mark all messages in a chat as read. |
58
+ | **Start Typing** | Show the typing indicator in a chat. |
59
+ | **Stop Typing** | Hide the typing indicator in a chat. |
60
+
61
+ #### Contact
62
+
63
+ | Operation | Description |
64
+ |-----------|-------------|
65
+ | **Share Contact Card** | Share your Name and Photo contact card in a chat. |
66
+
67
+ #### Poll
68
+
69
+ | Operation | Description |
70
+ |-----------|-------------|
71
+ | **Create Poll** | Create an interactive poll in a chat. |
72
+ | **Vote** | Vote on a poll option. |
73
+ | **Unvote** | Remove your vote from a poll option. |
74
+ | **Add Option** | Add a new option to an existing poll. |
75
+
76
+ #### Scheduled Message
77
+
78
+ | Operation | Description |
79
+ |-----------|-------------|
80
+ | **Create Scheduled Message** | Schedule a message to send later. Supports one-time and recurring schedules (hourly, daily, weekly, monthly, yearly). |
81
+ | **List Scheduled Messages** | View all pending scheduled messages. |
82
+ | **Delete Scheduled Message** | Remove a scheduled message. |
83
+
84
+ #### Handle
85
+
86
+ | Operation | Description |
87
+ |-----------|-------------|
88
+ | **Check iMessage Availability** | Check if a phone number or email address supports iMessage. |
89
+
90
+ ### Photon iMessage Trigger (Polling Trigger)
91
+
92
+ Triggers your workflow when new iMessages are received.
93
+
94
+ | Parameter | Description |
95
+ |-----------|-------------|
96
+ | **Chat GUID** | Only trigger for messages in a specific chat (leave blank for all). |
97
+ | **Include Sent Messages** | Also trigger for messages you sent (default: off). |
98
+
99
+ The trigger polls for new messages and tracks the last message timestamp to avoid duplicates.
100
+
101
+ ## Chat GUID Format
102
+
103
+ The Chat GUID identifies a conversation:
104
+
105
+ - **iMessage DM**: `iMessage;-;+1234567890` or `iMessage;-;email@example.com`
106
+ - **SMS DM**: `SMS;-;+1234567890`
107
+ - **Group chat**: `iMessage;+;chat123456789`
108
+
109
+ ## Resources
110
+
111
+ - [Photon advanced-imessage-kit](https://github.com/photon-hq/advanced-imessage-kit) — The iMessage server SDK
112
+ - [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
113
+
114
+ ## License
115
+
116
+ [MIT](LICENSE)
@@ -0,0 +1,9 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class PhotonIMessageApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PhotonIMessageApi = void 0;
4
+ class PhotonIMessageApi {
5
+ constructor() {
6
+ this.name = 'photonIMessageApi';
7
+ this.displayName = 'Photon iMessage API';
8
+ this.documentationUrl = 'https://github.com/photon-hq/advanced-imessage-kit';
9
+ this.properties = [
10
+ {
11
+ displayName: 'Server URL',
12
+ name: 'serverUrl',
13
+ type: 'string',
14
+ default: 'http://localhost:1234',
15
+ placeholder: 'https://your-server.example.com',
16
+ description: 'Base URL of your Photon iMessage server (no trailing slash)',
17
+ required: true,
18
+ },
19
+ {
20
+ displayName: 'API Key',
21
+ name: 'apiKey',
22
+ type: 'string',
23
+ typeOptions: { password: true },
24
+ default: '',
25
+ description: 'API key for authenticating with the Photon server',
26
+ required: true,
27
+ },
28
+ ];
29
+ this.authenticate = {
30
+ type: 'generic',
31
+ properties: {
32
+ headers: {
33
+ 'X-API-Key': '={{$credentials.apiKey}}',
34
+ },
35
+ },
36
+ };
37
+ this.test = {
38
+ request: {
39
+ baseURL: '={{$credentials.serverUrl}}',
40
+ url: '/api/v1/server/info',
41
+ method: 'GET',
42
+ },
43
+ };
44
+ }
45
+ }
46
+ exports.PhotonIMessageApi = PhotonIMessageApi;
47
+ //# sourceMappingURL=PhotonIMessageApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhotonIMessageApi.credentials.js","sourceRoot":"","sources":["../../credentials/PhotonIMessageApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,iBAAiB;IAA9B;QACC,SAAI,GAAG,mBAAmB,CAAC;QAC3B,gBAAW,GAAG,qBAAqB,CAAC;QACpC,qBAAgB,GAAG,oDAAoD,CAAC;QACxE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uBAAuB;gBAChC,WAAW,EAAE,iCAAiC;gBAC9C,WAAW,EAAE,6DAA6D;gBAC1E,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,mDAAmD;gBAChE,QAAQ,EAAE,IAAI;aACd;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,WAAW,EAAE,0BAA0B;iBACvC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,6BAA6B;gBACtC,GAAG,EAAE,qBAAqB;gBAC1B,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAzCD,8CAyCC"}
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class PhotonIMessage implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }