@mookielianhd/n8n-nodes-instagram 2.2.0 → 2.4.0
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 +103 -12
- package/dist/nodes/Instagram/Instagram.node.js +889 -14
- package/dist/nodes/Instagram/Instagram.node.js.map +1 -1
- package/dist/nodes/Instagram/resources/index.d.ts +2 -2
- package/dist/nodes/Instagram/resources/index.js +28 -1
- package/dist/nodes/Instagram/resources/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @mookielianhd/n8n-nodes-instagram
|
|
2
2
|
|
|
3
|
-
This package adds an Instagram
|
|
3
|
+
This package adds an Instagram node to n8n so you can publish media to your Instagram Business accounts, moderate comments, and send private replies — all from within your workflows.
|
|
4
4
|
|
|
5
|
-
Instagram
|
|
5
|
+
Instagram features are powered by the Facebook/Instagram Graph API and allow programmatic upload of images, reels and stories, plus comment moderation and private replies, for any Instagram Business or Creator account.
|
|
6
6
|
|
|
7
7
|
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
|
|
8
8
|
|
|
@@ -20,17 +20,28 @@ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes
|
|
|
20
20
|
|
|
21
21
|
## Operations
|
|
22
22
|
|
|
23
|
-
The node exposes
|
|
23
|
+
The node exposes several resources:
|
|
24
24
|
|
|
25
25
|
| Resource | Description |
|
|
26
26
|
| --- | --- |
|
|
27
|
-
| `Image` | Publish a single image with an optional caption. |
|
|
28
|
-
| `Reels` | Publish a reel video. Handles container polling until the video is processed. |
|
|
27
|
+
| `Image` | Publish a single image with an optional caption. Uses the two-step container → publish flow. |
|
|
28
|
+
| `Reels` | Publish a reel video. Handles container polling until the video is processed before publishing. |
|
|
29
29
|
| `Stories` | Publish a story video using the same logic as reels with `media_type=STORIES`. |
|
|
30
|
+
| `Comments` | List comments on media, hide/unhide or delete individual comments, disable/enable comments on media, and send **private replies** to commenters. |
|
|
31
|
+
| `IG User` | Read basic profile data for an Instagram Business/Creator account and list its media using the IG User Graph API. |
|
|
32
|
+
| `IG Hashtag` | Search for hashtags by name and fetch top or recent media for a hashtag with paging and limit/return-all support. |
|
|
33
|
+
| `Messaging` | Send direct messages (DMs) to Instagram users via the Instagram Messaging API. |
|
|
34
|
+
| `Auth` | Exchange short-lived Instagram User tokens for long-lived tokens, refresh long-lived tokens, and call the Graph API `/me` endpoint. |
|
|
30
35
|
|
|
31
36
|
## Credentials
|
|
32
37
|
|
|
33
|
-
Create an **Instagram API** credential that stores a long-lived Facebook Graph API user access token with
|
|
38
|
+
Create an **Instagram API** credential that stores a long-lived Facebook Graph API user access token with at least:
|
|
39
|
+
|
|
40
|
+
* `instagram_basic`
|
|
41
|
+
* `pages_show_list`
|
|
42
|
+
* `instagram_content_publish`
|
|
43
|
+
* `pages_read_engagement`
|
|
44
|
+
* `instagram_manage_comments` (or `instagram_business_manage_comments` if using Instagram Login)
|
|
34
45
|
Steps:
|
|
35
46
|
|
|
36
47
|
1. Make sure the Instagram account is a Business/Creator account connected to a Facebook Page.
|
|
@@ -40,25 +51,105 @@ Steps:
|
|
|
40
51
|
|
|
41
52
|
## Compatibility
|
|
42
53
|
|
|
43
|
-
- Built against **n8n
|
|
44
|
-
- Requires n8n `>=1.0` with community nodes enabled.
|
|
54
|
+
- Built and tested against **n8n 2.6.3** (community-node CLI v0.16).
|
|
55
|
+
- Requires n8n `>=1.0` with community nodes enabled (recommended `>=2.x`).
|
|
45
56
|
- Uses only built-in n8n dependencies, so it is Cloud-compatible.
|
|
46
57
|
|
|
47
58
|
## Usage
|
|
48
59
|
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
### Publishing media (Image / Reels / Stories)
|
|
61
|
+
|
|
62
|
+
1. Add the **Instagram** node to your workflow and select one of the resources (`Image` / `Reels` / `Stories`).
|
|
63
|
+
2. Provide the Instagram Business Account ID (the `Node` parameter), media URL and caption.
|
|
51
64
|
3. The node first creates the media container, polls Graph API until processing completes, then triggers `media_publish`.
|
|
52
|
-
4. Handle any errors returned by the API (rate limits, permissions) via the node’s error output or `Continue On Fail`.
|
|
65
|
+
4. Handle any errors returned by the API (rate limits, permissions, validation) via the node’s error output or `Continue On Fail`.
|
|
66
|
+
|
|
67
|
+
### Comment moderation and private replies (Comments)
|
|
68
|
+
|
|
69
|
+
1. Add the **Instagram** node and set **Resource** to `Comments`.
|
|
70
|
+
2. Choose an **Operation**:
|
|
71
|
+
- `List` – fetch comments for a given media ID.
|
|
72
|
+
- `Hide` / `Unhide` / `Delete` – moderate a specific comment by its comment ID.
|
|
73
|
+
- `Disable Comments` / `Enable Comments` – toggle comments on a media object by its media ID.
|
|
74
|
+
- `Send Private Reply` – send a private reply message to a commenter using their comment ID.
|
|
75
|
+
3. Provide the required IDs:
|
|
76
|
+
- `Media ID` for listing comments or enabling/disabling comments.
|
|
77
|
+
- `Comment ID` for hide/unhide/delete/private reply operations.
|
|
78
|
+
4. For **Send Private Reply**, also fill in:
|
|
79
|
+
- `Node` – the Instagram professional account ID that owns the commented media.
|
|
80
|
+
- `Message` – the private reply text that will be sent to the commenter’s inbox/request folder (subject to the 7‑day and messaging window rules defined by Meta).
|
|
81
|
+
|
|
82
|
+
### Reading IG User profile and media (IG User)
|
|
83
|
+
|
|
84
|
+
1. Add the **Instagram** node and set **Resource** to `IG User`.
|
|
85
|
+
2. Choose an **Operation**:
|
|
86
|
+
- `Get` – fetch basic profile information for an Instagram Business/Creator account (username, name, bio, website, media_count, followers/follows, profile picture URL).
|
|
87
|
+
- `Get Media` – list media owned by that account, including media type, URLs, caption, permalink, timestamp and username.
|
|
88
|
+
3. Provide:
|
|
89
|
+
- `Node` – the IG User ID of the professional account you want to read (or `me` if your credential token belongs to that account).
|
|
90
|
+
- `Graph API Version` – the Graph version to use (for example `v24.0`).
|
|
91
|
+
|
|
92
|
+
### Searching hashtags and fetching hashtag media (IG Hashtag)
|
|
93
|
+
|
|
94
|
+
1. Add the **Instagram** node and set **Resource** to `IG Hashtag`.
|
|
95
|
+
2. Choose an **Operation**:
|
|
96
|
+
- `Search` – look up a hashtag by name and get its global hashtag ID.
|
|
97
|
+
- `Get Recent Media` – get the most recently published media tagged with a hashtag.
|
|
98
|
+
- `Get Top Media` – get the most popular media tagged with a hashtag.
|
|
99
|
+
3. For **Search**, provide:
|
|
100
|
+
- `Node` – the IG User ID performing the query.
|
|
101
|
+
- `Hashtag Name` – the hashtag name, without `#`.
|
|
102
|
+
4. For **Get Recent Media** / **Get Top Media**, provide:
|
|
103
|
+
- `Node` – the IG User ID performing the query.
|
|
104
|
+
- `Hashtag ID` – the ID returned from the search operation.
|
|
105
|
+
- `Return All` / `Limit` – choose whether to fetch all available media (within a safety cap) or only up to a limit.
|
|
106
|
+
|
|
107
|
+
### Sending direct messages (Messaging)
|
|
108
|
+
|
|
109
|
+
1. Add the **Instagram** node and set **Resource** to `Messaging`.
|
|
110
|
+
2. Choose **Operation** `Send Message`.
|
|
111
|
+
3. Provide:
|
|
112
|
+
- `Node` – the IG professional account ID that will send the message.
|
|
113
|
+
- `Graph API Version` – the Graph version to use (for example `v24.0`).
|
|
114
|
+
- `Recipient IG User ID` – the Instagram-scoped user ID (IGSID) of the recipient, typically obtained from Messaging webhook events.
|
|
115
|
+
- `Message Text` – the text body of the direct message.
|
|
116
|
+
|
|
117
|
+
### Token exchange, refresh and `/me` (Auth)
|
|
118
|
+
|
|
119
|
+
1. Add the **Instagram** node and set **Resource** to `Auth`.
|
|
120
|
+
2. Choose an **Operation**:
|
|
121
|
+
- `Exchange Access Token` – exchange a **short-lived** Instagram User access token for a **long-lived** token.
|
|
122
|
+
- `Refresh Access Token` – refresh an existing long-lived token using the Instagram Platform refresh endpoint.
|
|
123
|
+
- `Get Me` – call the Graph API `/me` endpoint using the `instagramApi` credential’s access token.
|
|
124
|
+
3. For **Exchange Access Token**, provide:
|
|
125
|
+
- `Short-Lived Access Token` – the short-lived token from your login flow.
|
|
126
|
+
- `App Secret` – the Instagram App Secret from your Meta App Dashboard.
|
|
127
|
+
4. For **Refresh Access Token**, optionally provide:
|
|
128
|
+
- `Access Token` – the long-lived token to refresh. Leave empty to use the token from the credential.
|
|
129
|
+
5. For **Get Me**, provide:
|
|
130
|
+
- `Graph API Version` – the Graph version to use (for example `v24.0`). The node will read `/me` using the credential’s token.
|
|
53
131
|
|
|
54
132
|
## Resources
|
|
55
133
|
|
|
56
134
|
* [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
|
|
57
135
|
* [Instagram Graph API - Publishing](https://developers.facebook.com/docs/instagram-api/reference/ig-user/media)
|
|
58
|
-
* [Video/Reels publishing guide](https://developers.facebook.com/docs/instagram-api/guides/content-publishing/reels/)
|
|
136
|
+
* [Video/Reels publishing guide](https://developers.facebook.com/docs/instagram-api/guides/content-publishing/reels/)
|
|
137
|
+
* [Comment Moderation](https://developers.facebook.com/docs/instagram-platform/comment-moderation)
|
|
138
|
+
* [Private Replies](https://developers.facebook.com/docs/instagram-platform/private-replies)
|
|
139
|
+
* [IG User](https://developers.facebook.com/docs/instagram-platform/instagram-graph-api/reference/ig-user)
|
|
140
|
+
* [IG Hashtag Search](https://developers.facebook.com/docs/instagram-platform/instagram-graph-api/reference/ig-hashtag-search/)
|
|
141
|
+
* [IG Hashtag Recent Media](https://developers.facebook.com/docs/instagram-platform/instagram-graph-api/reference/ig-hashtag/recent-media/)
|
|
142
|
+
* [IG Hashtag Top Media](https://developers.facebook.com/docs/instagram-platform/instagram-graph-api/reference/ig-hashtag/top-media/)
|
|
143
|
+
* [Instagram Messaging API](https://developers.facebook.com/docs/messenger-platform/instagram/features/)
|
|
144
|
+
* [Instagram Platform Access Token](https://developers.facebook.com/docs/instagram-platform/reference/access_token/)
|
|
145
|
+
* [Instagram Platform Refresh Access Token](https://developers.facebook.com/docs/instagram-platform/reference/refresh_access_token/)
|
|
146
|
+
* [Instagram Platform /me](https://developers.facebook.com/docs/instagram-platform/reference/me/)
|
|
59
147
|
|
|
60
148
|
## Version history
|
|
61
149
|
|
|
62
150
|
| Version | Notes |
|
|
63
151
|
| --- | --- |
|
|
152
|
+
| 2.3.0 | Upcoming: Adds `Comments` resource with comment moderation (list/hide/unhide/delete, enable/disable comments) and **Private Replies** support, an `IG User` resource for reading profile data and listing media, `IG Hashtag` resource for hashtag search and hashtag media, `Messaging` resource for sending DMs, and `Auth` helpers for access token exchange/refresh and `/me`. |
|
|
153
|
+
| 2.2.0 | Improved publishing UX, adds alt text, location ID, user tags, and product tags support for media publishing. |
|
|
154
|
+
| 2.1.0 | Stable release of Instagram publishing (Image/Reels/Stories) using the container → publish flow with robust polling and error handling. |
|
|
64
155
|
| 0.1.0 | Initial release with Image, Reels and Stories publishing & built-in container polling. |
|