@0m4r/n8n-nodes-gramflow 0.0.0-stage → 1.0.0-beta.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/LICENSE +21 -0
- package/README.md +288 -2
- package/dist/credentials/credentials.test.d.ts +1 -0
- package/dist/credentials/credentials.test.js +49 -0
- package/dist/credentials/credentials.test.js.map +1 -0
- package/dist/credentials/gramflow.svg +27 -0
- package/dist/credentials/gramflowApi.credentials.d.ts +10 -0
- package/dist/credentials/gramflowApi.credentials.js +60 -0
- package/dist/credentials/gramflowApi.credentials.js.map +1 -0
- package/dist/credentials/gramflowWebhookApi.credentials.d.ts +8 -0
- package/dist/credentials/gramflowWebhookApi.credentials.js +24 -0
- package/dist/credentials/gramflowWebhookApi.credentials.js.map +1 -0
- package/dist/credentials/instagram.svg +27 -0
- package/dist/nodes/Gramflow/Gramflow.node.d.ts +10 -0
- package/dist/nodes/Gramflow/Gramflow.node.js +160 -0
- package/dist/nodes/Gramflow/Gramflow.node.js.map +1 -0
- package/dist/nodes/Gramflow/Instagram.node.json +18 -0
- package/dist/nodes/Gramflow/Instagram.node.test.d.ts +1 -0
- package/dist/nodes/Gramflow/Instagram.node.test.js +227 -0
- package/dist/nodes/Gramflow/Instagram.node.test.js.map +1 -0
- package/dist/nodes/Gramflow/containerPolling.d.ts +22 -0
- package/dist/nodes/Gramflow/containerPolling.js +137 -0
- package/dist/nodes/Gramflow/containerPolling.js.map +1 -0
- package/dist/nodes/Gramflow/containerPolling.test.d.ts +1 -0
- package/dist/nodes/Gramflow/containerPolling.test.js +48 -0
- package/dist/nodes/Gramflow/containerPolling.test.js.map +1 -0
- package/dist/nodes/Gramflow/containerStatus.d.ts +9 -0
- package/dist/nodes/Gramflow/containerStatus.js +41 -0
- package/dist/nodes/Gramflow/containerStatus.js.map +1 -0
- package/dist/nodes/Gramflow/containerStatus.test.d.ts +1 -0
- package/dist/nodes/Gramflow/containerStatus.test.js +75 -0
- package/dist/nodes/Gramflow/containerStatus.test.js.map +1 -0
- package/dist/nodes/Gramflow/gramflow.dark.svg +27 -0
- package/dist/nodes/Gramflow/gramflow.svg +27 -0
- package/dist/nodes/Gramflow/httpLogging.d.ts +5 -0
- package/dist/nodes/Gramflow/httpLogging.js +87 -0
- package/dist/nodes/Gramflow/httpLogging.js.map +1 -0
- package/dist/nodes/Gramflow/httpLogging.test.d.ts +1 -0
- package/dist/nodes/Gramflow/httpLogging.test.js +54 -0
- package/dist/nodes/Gramflow/httpLogging.test.js.map +1 -0
- package/dist/nodes/Gramflow/instagram.dark.svg +27 -0
- package/dist/nodes/Gramflow/instagram.svg +27 -0
- package/dist/nodes/Gramflow/operations/auth.d.ts +2 -0
- package/dist/nodes/Gramflow/operations/auth.js +156 -0
- package/dist/nodes/Gramflow/operations/auth.js.map +1 -0
- package/dist/nodes/Gramflow/operations/auth.test.d.ts +1 -0
- package/dist/nodes/Gramflow/operations/auth.test.js +14 -0
- package/dist/nodes/Gramflow/operations/auth.test.js.map +1 -0
- package/dist/nodes/Gramflow/operations/carousel.d.ts +2 -0
- package/dist/nodes/Gramflow/operations/carousel.js +336 -0
- package/dist/nodes/Gramflow/operations/carousel.js.map +1 -0
- package/dist/nodes/Gramflow/operations/carousel.test.d.ts +1 -0
- package/dist/nodes/Gramflow/operations/carousel.test.js +56 -0
- package/dist/nodes/Gramflow/operations/carousel.test.js.map +1 -0
- package/dist/nodes/Gramflow/operations/comments.d.ts +2 -0
- package/dist/nodes/Gramflow/operations/comments.js +248 -0
- package/dist/nodes/Gramflow/operations/comments.js.map +1 -0
- package/dist/nodes/Gramflow/operations/comments.test.d.ts +1 -0
- package/dist/nodes/Gramflow/operations/comments.test.js +14 -0
- package/dist/nodes/Gramflow/operations/comments.test.js.map +1 -0
- package/dist/nodes/Gramflow/operations/igHashtag.d.ts +2 -0
- package/dist/nodes/Gramflow/operations/igHashtag.js +132 -0
- package/dist/nodes/Gramflow/operations/igHashtag.js.map +1 -0
- package/dist/nodes/Gramflow/operations/igHashtag.test.d.ts +1 -0
- package/dist/nodes/Gramflow/operations/igHashtag.test.js +32 -0
- package/dist/nodes/Gramflow/operations/igHashtag.test.js.map +1 -0
- package/dist/nodes/Gramflow/operations/igUser.d.ts +2 -0
- package/dist/nodes/Gramflow/operations/igUser.js +113 -0
- package/dist/nodes/Gramflow/operations/igUser.js.map +1 -0
- package/dist/nodes/Gramflow/operations/igUser.test.d.ts +1 -0
- package/dist/nodes/Gramflow/operations/igUser.test.js +23 -0
- package/dist/nodes/Gramflow/operations/igUser.test.js.map +1 -0
- package/dist/nodes/Gramflow/operations/messaging.d.ts +2 -0
- package/dist/nodes/Gramflow/operations/messaging.js +97 -0
- package/dist/nodes/Gramflow/operations/messaging.js.map +1 -0
- package/dist/nodes/Gramflow/operations/messaging.test.d.ts +1 -0
- package/dist/nodes/Gramflow/operations/messaging.test.js +19 -0
- package/dist/nodes/Gramflow/operations/messaging.test.js.map +1 -0
- package/dist/nodes/Gramflow/operations/page.d.ts +2 -0
- package/dist/nodes/Gramflow/operations/page.js +62 -0
- package/dist/nodes/Gramflow/operations/page.js.map +1 -0
- package/dist/nodes/Gramflow/operations/page.test.d.ts +1 -0
- package/dist/nodes/Gramflow/operations/page.test.js +14 -0
- package/dist/nodes/Gramflow/operations/page.test.js.map +1 -0
- package/dist/nodes/Gramflow/operations/publish.d.ts +2 -0
- package/dist/nodes/Gramflow/operations/publish.js +367 -0
- package/dist/nodes/Gramflow/operations/publish.js.map +1 -0
- package/dist/nodes/Gramflow/operations/publish.test.d.ts +1 -0
- package/dist/nodes/Gramflow/operations/publish.test.js +91 -0
- package/dist/nodes/Gramflow/operations/publish.test.js.map +1 -0
- package/dist/nodes/Gramflow/operations/testUtils.d.ts +9 -0
- package/dist/nodes/Gramflow/operations/testUtils.js +29 -0
- package/dist/nodes/Gramflow/operations/testUtils.js.map +1 -0
- package/dist/nodes/Gramflow/pagination.d.ts +15 -0
- package/dist/nodes/Gramflow/pagination.js +53 -0
- package/dist/nodes/Gramflow/pagination.js.map +1 -0
- package/dist/nodes/Gramflow/pagination.test.d.ts +1 -0
- package/dist/nodes/Gramflow/pagination.test.js +70 -0
- package/dist/nodes/Gramflow/pagination.test.js.map +1 -0
- package/dist/nodes/Gramflow/properties.d.ts +2 -0
- package/dist/nodes/Gramflow/properties.js +1065 -0
- package/dist/nodes/Gramflow/properties.js.map +1 -0
- package/dist/nodes/Gramflow/properties.test.d.ts +1 -0
- package/dist/nodes/Gramflow/properties.test.js +59 -0
- package/dist/nodes/Gramflow/properties.test.js.map +1 -0
- package/dist/nodes/Gramflow/resources/image/index.d.ts +2 -0
- package/dist/nodes/Gramflow/resources/image/index.js +40 -0
- package/dist/nodes/Gramflow/resources/image/index.js.map +1 -0
- package/dist/nodes/Gramflow/resources/index.d.ts +5 -0
- package/dist/nodes/Gramflow/resources/index.js +48 -0
- package/dist/nodes/Gramflow/resources/index.js.map +1 -0
- package/dist/nodes/Gramflow/resources/reels/index.d.ts +2 -0
- package/dist/nodes/Gramflow/resources/reels/index.js +40 -0
- package/dist/nodes/Gramflow/resources/reels/index.js.map +1 -0
- package/dist/nodes/Gramflow/resources/resources.test.d.ts +1 -0
- package/dist/nodes/Gramflow/resources/resources.test.js +75 -0
- package/dist/nodes/Gramflow/resources/resources.test.js.map +1 -0
- package/dist/nodes/Gramflow/resources/stories/index.d.ts +2 -0
- package/dist/nodes/Gramflow/resources/stories/index.js +40 -0
- package/dist/nodes/Gramflow/resources/stories/index.js.map +1 -0
- package/dist/nodes/Gramflow/resources/types.d.ts +12 -0
- package/dist/nodes/Gramflow/resources/types.js +3 -0
- package/dist/nodes/Gramflow/resources/types.js.map +1 -0
- package/dist/nodes/Gramflow/utils.d.ts +5 -0
- package/dist/nodes/Gramflow/utils.js +83 -0
- package/dist/nodes/Gramflow/utils.js.map +1 -0
- package/dist/nodes/Gramflow/utils.test.d.ts +1 -0
- package/dist/nodes/Gramflow/utils.test.js +78 -0
- package/dist/nodes/Gramflow/utils.test.js.map +1 -0
- package/dist/nodes/GramflowTrigger/GramflowTrigger.node.d.ts +17 -0
- package/dist/nodes/GramflowTrigger/GramflowTrigger.node.js +347 -0
- package/dist/nodes/GramflowTrigger/GramflowTrigger.node.js.map +1 -0
- package/dist/nodes/GramflowTrigger/InstagramTrigger.node.json +24 -0
- package/dist/nodes/GramflowTrigger/InstagramTrigger.node.test.d.ts +1 -0
- package/dist/nodes/GramflowTrigger/InstagramTrigger.node.test.js +222 -0
- package/dist/nodes/GramflowTrigger/InstagramTrigger.node.test.js.map +1 -0
- package/dist/nodes/GramflowTrigger/gramflow.dark.svg +27 -0
- package/dist/nodes/GramflowTrigger/gramflow.svg +27 -0
- package/dist/package.json +86 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +84 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mookie Lian
|
|
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
CHANGED
|
@@ -1,3 +1,289 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @0m4r/n8n-nodes-gramflow
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
> Gramflow is a production-ready Instagram automation toolkit for n8n. Publish images, Reels, Stories, and carousels; moderate comments; send DMs; search hashtags; manage tokens; and react to real-time Instagram events—using Meta's official Instagram and Facebook Graph APIs.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
This package’s Instagram nodes for n8n let you publish and manage content, moderate comments, send DMs, and react to real-time events (comments, messages, mentions, story insights, etc.) on Instagram Business and Creator accounts via the Facebook/Instagram Graph API.
|
|
11
|
+
|
|
12
|
+
All functionality is built on the Facebook/Instagram Graph API, including media publishing (images, Reels, Stories, carousels), comment moderation, private replies, messaging, hashtag search, IG User/Page helpers, and webhook-based triggers for Business and Creator accounts.
|
|
13
|
+
|
|
14
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
|
|
15
|
+
|
|
16
|
+
[Installation](#installation)
|
|
17
|
+
[Operations](#operations)
|
|
18
|
+
[Credentials](#credentials)
|
|
19
|
+
[Compatibility](#compatibility)
|
|
20
|
+
[Usage](#usage)
|
|
21
|
+
[Resources](#resources)
|
|
22
|
+
[Version history](#version-history)
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
The npm package name is `@0m4r/n8n-nodes-gramflow`. On a self-hosted n8n instance, install it from **Settings → Community nodes** or use n8n's [manual installation instructions](https://docs.n8n.io/integrations/community-nodes/installation-and-management/). Unverified community nodes require self-hosting; n8n Cloud only makes verified community nodes available.
|
|
27
|
+
|
|
28
|
+
## Operations
|
|
29
|
+
|
|
30
|
+
The node exposes several resources:
|
|
31
|
+
|
|
32
|
+
| Resource | Description |
|
|
33
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
+
| `Image` | Publish a single image with an optional caption. Uses the two-step container → publish flow. Supports alt text, location, user tags, and product tags. |
|
|
35
|
+
| `Reels` | Publish a reel video. Handles container polling until the video is processed before publishing. Supports product tags and **Trial Reels** via `trial_params`. |
|
|
36
|
+
| `Stories` | Publish a story video using the same logic as reels with `media_type=STORIES`. |
|
|
37
|
+
| `Carousel` | Publish a carousel (album) post with up to 10 images and/or videos. The node creates child containers, builds a carousel container, waits for it to be ready, then publishes it. Includes detailed per-item error reporting and progress messages. |
|
|
38
|
+
| `Comments` | List comments on media, hide/unhide or delete individual comments, disable/enable comments on media, and send **private replies** to commenters. |
|
|
39
|
+
| `IG User` | Read basic profile data for an Instagram Business/Creator account and list its media using the IG User Graph API. |
|
|
40
|
+
| `IG Hashtag` | Search for hashtags by name and fetch top or recent media for a hashtag with cursor pagination and limit/return-all support. |
|
|
41
|
+
| `Messaging` | Send direct messages (DMs) to Instagram users via the Instagram Messaging API. |
|
|
42
|
+
| `Page` | Given a Facebook Page ID, fetch the connected Instagram Business/Creator account (`instagram_business_account`). |
|
|
43
|
+
| `Auth` | Exchange short-lived Instagram User tokens for long-lived tokens, refresh long-lived tokens, and call the Graph API `/me` endpoint. |
|
|
44
|
+
| **Instagram Trigger** | **Trigger:** receive real-time webhook events from Meta (comments, messages, mentions, story insights, etc.) and run a workflow for each event. Requires a separate **Instagram Webhook** credential (App Secret) and Meta App Dashboard webhook configuration. |
|
|
45
|
+
|
|
46
|
+
## Credentials
|
|
47
|
+
|
|
48
|
+
Create an **Instagram API** credential and provide a token issued for the selected Meta API setup. The endpoint setting chooses the Graph API host; it does not convert a token or grant permissions.
|
|
49
|
+
|
|
50
|
+
For **Instagram Login** (`graph.instagram.com`), use an Instagram User access token with:
|
|
51
|
+
|
|
52
|
+
- `instagram_business_basic`
|
|
53
|
+
- `instagram_business_content_publish`
|
|
54
|
+
- `instagram_business_manage_comments`
|
|
55
|
+
- `instagram_business_manage_messages`
|
|
56
|
+
|
|
57
|
+
For **Facebook Login** (`graph.facebook.com`), use a Facebook User or Page access token with the permissions required by the operations you use. A typical setup includes:
|
|
58
|
+
|
|
59
|
+
- `instagram_basic`
|
|
60
|
+
- `pages_show_list`
|
|
61
|
+
- `instagram_content_publish`
|
|
62
|
+
- `pages_read_engagement`
|
|
63
|
+
- `instagram_manage_comments`
|
|
64
|
+
- `instagram_manage_messages`
|
|
65
|
+
- `pages_messaging` (for Facebook Login messaging)
|
|
66
|
+
- `pages_manage_metadata` (for webhook subscriptions)
|
|
67
|
+
|
|
68
|
+
Steps:
|
|
69
|
+
|
|
70
|
+
1. Make sure the Instagram account is a Business/Creator (professional) account. A linked Facebook Page is required for Facebook Login/Page-token operations, but is not a general requirement for Instagram Login.
|
|
71
|
+
2. Use Meta's Graph Explorer or your own app to generate an access token that includes the scopes listed above.
|
|
72
|
+
3. Convert it to a long-lived token and paste it into the credential's **Access Token** field.
|
|
73
|
+
4. **Select API Endpoint**: Choose the host that matches the token:
|
|
74
|
+
- **Instagram Graph API** (`graph.instagram.com`) - default; use with an Instagram User token from Instagram Login.
|
|
75
|
+
- **Facebook Graph API** (`graph.facebook.com`) - use with a Facebook User or Page token from Facebook Login.
|
|
76
|
+
5. The built-in credential test uses v26.0 to confirm the token works.
|
|
77
|
+
|
|
78
|
+
Changing the endpoint does not convert your token, change its login flow, or grant permissions. Use the token type and permissions required by the selected Meta login flow and operation. Both API setups support content publishing and comment moderation. Facebook Login is required for Page lookup and hashtag search; product tagging is available through the Facebook Login setup. Stories can only be published to eligible Business accounts. The **Auth** token exchange and refresh operations use Instagram Login endpoints and Instagram User tokens.
|
|
79
|
+
|
|
80
|
+
For the full operation-by-operation permission matrix and access requirements, see Meta's [Instagram Platform overview](https://developers.facebook.com/documentation/instagram-platform/overview), [content publishing requirements](https://developers.facebook.com/documentation/instagram-platform/content-publishing), and [webhook field permissions](https://developers.facebook.com/documentation/instagram-platform/webhooks).
|
|
81
|
+
|
|
82
|
+
> **Note on Messaging:** The Instagram Messaging API (Send Message and Send Private Reply) supports two host URLs depending on your credential's **API Endpoint** setting:
|
|
83
|
+
>
|
|
84
|
+
> - **Instagram Graph API** (`graph.instagram.com`) - Use with Instagram Login access token
|
|
85
|
+
> - **Facebook Graph API** (`graph.facebook.com`) - Use with Facebook Page access token
|
|
86
|
+
>
|
|
87
|
+
> The node uses the host URL selected in your credential. The default is `graph.instagram.com`.
|
|
88
|
+
>
|
|
89
|
+
> **Important:** You must use the correct access token type for your chosen API endpoint:
|
|
90
|
+
>
|
|
91
|
+
> - Instagram Login: Use an **Instagram User access token**
|
|
92
|
+
> - Facebook Login: Use the Facebook token and permissions required by Meta's [Instagram Messaging via Messenger Platform](https://developers.facebook.com/documentation/business-messaging/instagram-messaging) setup.
|
|
93
|
+
>
|
|
94
|
+
> See Meta's [Send a Private Reply to a Commenter](https://developers.facebook.com/documentation/instagram-platform/private-replies) and [Instagram Send API reference](https://developers.facebook.com/docs/messenger-platform/instagram/reference/send-api/) for more details.
|
|
95
|
+
|
|
96
|
+
### Instagram Webhook Trigger credentials
|
|
97
|
+
|
|
98
|
+
For the **Instagram Trigger** node, create an **Instagram Webhook API** credential and enter the Meta **App Secret** (App Dashboard → Settings → Basic). Signature verification is enabled by default and checks `X-Hub-Signature-256` against the raw request body. The **Verify Token** is set in the node parameters and must match the value entered in the Meta App Dashboard for the callback URL. Disable signature verification only for a trusted test environment. Existing workflows may have the previous skip-verification setting saved; set it to false and update the old webhook credential with the App Secret.
|
|
99
|
+
|
|
100
|
+
## Instagram Webhook Trigger
|
|
101
|
+
|
|
102
|
+
The **Instagram Trigger** receives Meta webhook notifications and starts a workflow for each included event. For direct messages with **Instagram Login** (`graph.instagram.com`), follow Meta's Instagram Platform Webhooks setup. This flow uses an Instagram User access token to subscribe the professional account to webhook fields; it does not use a Facebook Page access token.
|
|
103
|
+
|
|
104
|
+
### Requirements
|
|
105
|
+
|
|
106
|
+
- The Instagram account must be a **Business or Creator (professional) account**, and must authorize your app.
|
|
107
|
+
- For Instagram Login, request `instagram_business_basic` and `instagram_business_manage_messages` to receive the `messages` field. The app needs **Advanced Access** for production use and the business must be verified. The app must be Live/published to receive notifications from app users; in development, delivery is limited to eligible app roles/testers.
|
|
108
|
+
- Meta must be able to reach the callback URL over **HTTPS** with a valid TLS certificate. Self-signed certificates are not supported.
|
|
109
|
+
- Subscribe to fields in **both** places: select them for your app in the Meta App Dashboard, then enable notifications on each Instagram professional account using that account's token. Account subscription applies the fields selected for the app; it does not select a different field set per account.
|
|
110
|
+
|
|
111
|
+
The trigger can filter `comments`, `live_comments`, `message_echoes`, `messaging_reactions`, `messages`, `mentions`, `messaging_handover`, `messaging_referrals`, `messaging_optins`, `messaging_seen`, `messaging_postbacks`, and `standby`. `story_insights` is also available with Facebook Login. Meta's supported fields and permissions depend on the API setup; check the [Instagram Webhooks field and permission matrix](https://developers.facebook.com/documentation/instagram-platform/webhooks) before subscribing.
|
|
112
|
+
|
|
113
|
+
### Setup
|
|
114
|
+
|
|
115
|
+
1. **Configure the trigger in n8n**
|
|
116
|
+
Add the **Instagram Trigger** node. Set **Verify Token** to a random string; you will enter the same value in Meta. Add an **Instagram Webhook API** credential containing your Meta **App Secret** (App Dashboard → App settings → Basic). The App Secret is used to validate webhook signatures; it is not an access token.
|
|
117
|
+
|
|
118
|
+
2. **Configure the app-level callback and fields in Meta**
|
|
119
|
+
In the Meta App Dashboard, open your Instagram API setup's **Webhooks** configuration. Add the n8n callback URL and the matching Verify Token. Use the **Production URL** for an active workflow, or the **Test URL** while the workflow is listening for a test event. Verify the callback, then subscribe the app to `messages` (and any other fields you need).
|
|
120
|
+
|
|
121
|
+
3. **Enable notifications on each Instagram account**
|
|
122
|
+
For Instagram Login, make a `POST` to the professional account's `subscribed_apps` edge using its Instagram User access token. Set `subscribed_fields` to the fields selected for the app. For example, to receive DMs:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
curl -i -X POST \
|
|
126
|
+
"https://graph.instagram.com/v{api-version}/{IG_USER_ID}/subscribed_apps" \
|
|
127
|
+
-d "subscribed_fields=messages" \
|
|
128
|
+
-d "access_token={INSTAGRAM_USER_ACCESS_TOKEN}"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
A successful response is `{"success":true}`. Use the supported Graph API version for your app. Do not use an Instagram User access token with `graph.facebook.com`, or a Facebook/Page token with `graph.instagram.com`. For Unified Login or Facebook Login, use the matching host, account/Page ID, token type, and permissions in Meta's [setup guide](https://developers.facebook.com/documentation/instagram-platform/webhooks).
|
|
132
|
+
|
|
133
|
+
4. **Optional: filter events**
|
|
134
|
+
Use **Events to Include** to pass only selected event types (for DMs, include `messages`). If left empty, all received event types are output. This filter only affects events after Meta has delivered them; it does not create Meta subscriptions.
|
|
135
|
+
|
|
136
|
+
Meta verifies the callback with a GET request containing `hub.mode`, `hub.verify_token`, and `hub.challenge`; the node checks the token and returns the challenge. For POST notifications, Meta signs the raw JSON body with the app secret and sends `X-Hub-Signature-256`. The node validates this signature by default and responds to accepted events with HTTP 200. Meta retries failed deliveries, so keep signature verification enabled and avoid slow downstream work before acknowledging events.
|
|
137
|
+
|
|
138
|
+
Each accepted event is output as an item with `object`, `field`, `value`, `id`, `time`, and the event payload. Use the **Instagram** node (for example, Messaging or Comments) in the same workflow to act on it.
|
|
139
|
+
|
|
140
|
+
## Compatibility
|
|
141
|
+
|
|
142
|
+
- Development and CI use **`n8n-workflow 2.41.2`** as the build and typecheck target. This records the tested development dependency; it isn't a claim that this is the latest n8n release.
|
|
143
|
+
- Declares a peer dependency on **`n8n-workflow *`** as required by n8n's strict community-node linter. Compatibility with earlier workflow versions is not verified.
|
|
144
|
+
- Requires n8n with community nodes enabled.
|
|
145
|
+
- The runtime package has no third-party production dependencies. n8n Cloud availability depends on n8n verification; unverified community nodes must be installed on a self-hosted instance.
|
|
146
|
+
|
|
147
|
+
## Usage
|
|
148
|
+
|
|
149
|
+
### Publishing media (Image / Reels / Stories)
|
|
150
|
+
|
|
151
|
+
1. Add the **Instagram** node to your workflow and select one of the resources (`Image` / `Reels` / `Stories`).
|
|
152
|
+
2. Provide:
|
|
153
|
+
- **Account**: Select your Instagram account from the dropdown or enter the IG User ID manually
|
|
154
|
+
- **Graph API Version**: defaults to `v26.0`; select a version currently supported by Meta for the operation.
|
|
155
|
+
- **Media URL**: a public URL Meta can fetch. The node does not upload n8n binary data directly. Feed images and Reels accept an optional **Caption**; Stories do not.
|
|
156
|
+
3. Add optional fields only where supported: alt text for feed images and carousel image slides; location tags for feed images, Reels, and carousels; product tags for feed images and Reels (up to 20 per post) and carousel slides (up to 5 per slide and 20 per carousel), using Facebook Login; user tags for images, Reels, Stories, and carousel image slides; collaborators for feed images, Reels, and carousels. Cover/audio/thumbnail/Trial Reel settings are Reels-only; share-to-feed is available for Reels and carousels.
|
|
157
|
+
4. The node first creates the media container, polls Graph API until processing completes, then triggers `media_publish`.
|
|
158
|
+
5. For long-running uploads (large videos), the node uses robust polling and retry logic and surfaces progress via the n8n execution logs (for example, when publishing Reels or Trial Reels).
|
|
159
|
+
6. Handle any errors returned by the API (rate limits, permissions, validation) via the node's error output or `Continue On Fail`.
|
|
160
|
+
|
|
161
|
+
### Publishing carousel posts (Carousel)
|
|
162
|
+
|
|
163
|
+
1. Add the **Instagram** node and set **Resource** to `Carousel`, **Operation** to `Publish`.
|
|
164
|
+
2. Provide:
|
|
165
|
+
- **Account** – Select your Instagram account from the list (loaded automatically) or enter the IG User ID manually
|
|
166
|
+
- **Graph API Version** – defaults to `v26.0`; select a version currently supported by Meta for the operation.
|
|
167
|
+
- `Caption` – optional caption for the published carousel.
|
|
168
|
+
- `Carousel Media` – 2–10 items, each with:
|
|
169
|
+
- `Media Type` – `Image` or `Video`.
|
|
170
|
+
- `Image URL` or `Video URL` – public URLs Meta can fetch.
|
|
171
|
+
- For image slides, optional `Alt Text` and `User Tags`; carousel slides may have up to 5 `Product Tags` each (20 total per carousel, using Facebook Login).
|
|
172
|
+
- **Additional Fields → Collaborators** – optional, up to 3 Instagram usernames.
|
|
173
|
+
3. The node:
|
|
174
|
+
- Creates one child container per image/video (`is_carousel_item=true` for each).
|
|
175
|
+
- Waits for each child container to become ready.
|
|
176
|
+
- Creates a carousel container (`media_type=CAROUSEL`, `children=<child_ids>`) with the caption.
|
|
177
|
+
- Waits for the carousel container to be ready, then calls `/{ig-user-id}/media_publish`.
|
|
178
|
+
4. Errors during any step are annotated with **which child item failed** (for example, “Carousel item 3 (video)…”), making it easier to debug problematic URLs.
|
|
179
|
+
|
|
180
|
+
### Comment moderation and private replies (Comments)
|
|
181
|
+
|
|
182
|
+
1. Add the **Instagram** node and set **Resource** to `Comments`.
|
|
183
|
+
2. Choose an **Operation**:
|
|
184
|
+
- `List` – fetch comments for a given media ID.
|
|
185
|
+
- `Hide` / `Unhide` / `Delete` – moderate a specific comment by its comment ID.
|
|
186
|
+
- `Disable Comments` / `Enable Comments` – toggle comments on a media object by its media ID.
|
|
187
|
+
- `Send Private Reply` – send a private reply message to a commenter using their comment ID.
|
|
188
|
+
3. Provide the required IDs:
|
|
189
|
+
- `Media ID` for listing comments or enabling/disabling comments.
|
|
190
|
+
- `Comment ID` for hide/unhide/delete/private reply operations.
|
|
191
|
+
4. For **Send Private Reply**, also fill in:
|
|
192
|
+
- `Node` – the Instagram professional account ID that owns the commented media.
|
|
193
|
+
- `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).
|
|
194
|
+
|
|
195
|
+
### Reading IG User profile and media (IG User)
|
|
196
|
+
|
|
197
|
+
1. Add the **Instagram** node and set **Resource** to `IG User`.
|
|
198
|
+
2. Choose an **Operation**:
|
|
199
|
+
- `Get` – fetch basic profile information for an Instagram Business/Creator account (username, name, bio, website, media_count, followers/follows, profile picture URL).
|
|
200
|
+
- `Get Media` – list media owned by that account, including media type, URLs, caption, permalink, timestamp and username.
|
|
201
|
+
3. Provide:
|
|
202
|
+
- `Node` – the IG User ID of the professional account you want to read (or `me` if your credential token belongs to that account).
|
|
203
|
+
- **Graph API Version** – defaults to `v26.0`; select a version currently supported by Meta for the operation.
|
|
204
|
+
|
|
205
|
+
### Searching hashtags and fetching hashtag media (IG Hashtag)
|
|
206
|
+
|
|
207
|
+
1. Add the **Instagram** node and set **Resource** to `IG Hashtag`.
|
|
208
|
+
2. Choose an **Operation**:
|
|
209
|
+
- `Search` – look up a hashtag by name and get its global hashtag ID.
|
|
210
|
+
- `Get Recent Media` – get the most recently published media tagged with a hashtag.
|
|
211
|
+
- `Get Top Media` – get the most popular media tagged with a hashtag.
|
|
212
|
+
3. For **Search**, provide:
|
|
213
|
+
- `Node` – the IG User ID performing the query.
|
|
214
|
+
- `Hashtag Name` – the hashtag name, without `#`.
|
|
215
|
+
4. For **Get Recent Media** / **Get Top Media**, provide:
|
|
216
|
+
- `Node` – the IG User ID performing the query.
|
|
217
|
+
- `Hashtag ID` – the ID returned from the search operation.
|
|
218
|
+
- `Return All` / `Limit` – choose whether to follow all pages returned by Meta or stop at the configured limit. The default limit is 50; the limit field accepts values from 1 to 500.
|
|
219
|
+
|
|
220
|
+
### Sending direct messages (Messaging)
|
|
221
|
+
|
|
222
|
+
1. Add the **Instagram** node and set **Resource** to `Messaging`.
|
|
223
|
+
2. Choose **Operation** `Send Message`.
|
|
224
|
+
3. Provide:
|
|
225
|
+
- `Node` – the IG professional account ID that will send the message.
|
|
226
|
+
- **Graph API Version** – defaults to `v26.0`; select a version currently supported by Meta for the operation.
|
|
227
|
+
- `Recipient IG User ID` – the Instagram-scoped user ID (IGSID) of the recipient, typically obtained from Messaging webhook events.
|
|
228
|
+
- `Message Text` – the text body of the direct message.
|
|
229
|
+
|
|
230
|
+
The recipient must have initiated a conversation with the professional account; the Messaging API does not send first-contact DMs to arbitrary usernames. The recipient IGSID is required by Meta. See the [Instagram Messaging API](https://developers.facebook.com/documentation/instagram-platform/instagram-api-with-instagram-login/messaging-api).
|
|
231
|
+
|
|
232
|
+
### Token exchange, refresh and `/me` (Auth)
|
|
233
|
+
|
|
234
|
+
1. Add the **Instagram** node and set **Resource** to `Auth`.
|
|
235
|
+
2. Choose an **Operation**:
|
|
236
|
+
- `Exchange Access Token` – exchange a **short-lived** Instagram User access token for a **long-lived** token.
|
|
237
|
+
- `Refresh Access Token` – refresh an existing long-lived token using the Instagram Platform refresh endpoint.
|
|
238
|
+
- `Get Me` – call the Graph API `/me` endpoint using the `instagramApi` credential’s access token.
|
|
239
|
+
3. For **Exchange Access Token**, provide:
|
|
240
|
+
- `Short-Lived Access Token` – the short-lived token from your login flow.
|
|
241
|
+
- `App Secret` – the Instagram App Secret from your Meta App Dashboard.
|
|
242
|
+
4. For **Refresh Access Token**, optionally provide:
|
|
243
|
+
- `Access Token` – the long-lived token to refresh. Leave empty to use the token from the credential.
|
|
244
|
+
5. For **Get Me**, provide the **Graph API Version**. The request uses the host selected in the credential and the access token stored in that credential.
|
|
245
|
+
|
|
246
|
+
### Getting the Instagram account for a Facebook Page (Page)
|
|
247
|
+
|
|
248
|
+
1. Add the **Instagram** node and set **Resource** to `Page`, **Operation** to `Get Instagram Account`.
|
|
249
|
+
2. Provide:
|
|
250
|
+
- **Graph API Version** – defaults to `v26.0`; select a version currently supported by Meta for the operation.
|
|
251
|
+
- `Page ID` – the Facebook Page ID that is linked to your Instagram professional account.
|
|
252
|
+
3. The node calls:
|
|
253
|
+
- `GET /{page-id}?fields=instagram_business_account`
|
|
254
|
+
and returns the `instagram_business_account` object (including the Instagram User ID) so you can feed it into other resources (Image/Reels/Stories/Carousel/IG User).
|
|
255
|
+
|
|
256
|
+
### Trial Reels (Reels with `trial_params`)
|
|
257
|
+
|
|
258
|
+
1. Add the **Instagram** node and set **Resource** to `Reels`, **Operation** to `Publish`.
|
|
259
|
+
2. Under **Additional Fields**, set **Trial Reel – Graduation Strategy**:
|
|
260
|
+
- `MANUAL` – you will decide in the Instagram app when (or if) to graduate the trial reel.
|
|
261
|
+
- `SS_PERFORMANCE` – Instagram will automatically graduate the trial reel if it performs well.
|
|
262
|
+
3. The node sends a `trial_params` JSON object in the create-container request, as documented in the IG User Media reference.
|
|
263
|
+
|
|
264
|
+
## Resources
|
|
265
|
+
|
|
266
|
+
- [Example workflows](examples/README.md), including manual examples that do not need webhook setup or hard-coded account IDs.
|
|
267
|
+
|
|
268
|
+
- [n8n community node installation and management](https://docs.n8n.io/integrations/community-nodes/installation-and-management/)
|
|
269
|
+
- [n8n create nodes documentation](https://docs.n8n.io/connect/create-nodes/overview/)
|
|
270
|
+
- [Instagram Platform overview](https://developers.facebook.com/documentation/instagram-platform/overview)
|
|
271
|
+
- [Instagram content publishing](https://developers.facebook.com/documentation/instagram-platform/content-publishing)
|
|
272
|
+
- [Instagram webhooks](https://developers.facebook.com/documentation/instagram-platform/webhooks)
|
|
273
|
+
- [Comment Moderation](https://developers.facebook.com/docs/instagram-platform/comment-moderation)
|
|
274
|
+
- [Private Replies](https://developers.facebook.com/docs/instagram-platform/private-replies)
|
|
275
|
+
- [IG User](https://developers.facebook.com/docs/instagram-platform/instagram-graph-api/reference/ig-user)
|
|
276
|
+
- [IG Hashtag Search](https://developers.facebook.com/docs/instagram-platform/instagram-graph-api/reference/ig-hashtag-search/)
|
|
277
|
+
- [IG Hashtag Recent Media](https://developers.facebook.com/docs/instagram-platform/instagram-graph-api/reference/ig-hashtag/recent-media/)
|
|
278
|
+
- [IG Hashtag Top Media](https://developers.facebook.com/docs/instagram-platform/instagram-graph-api/reference/ig-hashtag/top-media/)
|
|
279
|
+
- [Instagram Messaging API with Instagram Login](https://developers.facebook.com/documentation/instagram-platform/instagram-api-with-instagram-login/messaging-api)
|
|
280
|
+
- [Instagram Messaging via Messenger Platform](https://developers.facebook.com/documentation/business-messaging/instagram-messaging)
|
|
281
|
+
- [Instagram Platform Access Token](https://developers.facebook.com/docs/instagram-platform/reference/access_token/)
|
|
282
|
+
- [Instagram Platform Refresh Access Token](https://developers.facebook.com/docs/instagram-platform/reference/refresh_access_token/)
|
|
283
|
+
- [Instagram Platform /me](https://developers.facebook.com/docs/instagram-platform/reference/me/)
|
|
284
|
+
- [Webhooks from Meta (getting started)](https://developers.facebook.com/docs/graph-api/webhooks/getting-started)
|
|
285
|
+
- [Instagram webhook reference](https://developers.facebook.com/docs/graph-api/webhooks/reference/instagram)
|
|
286
|
+
|
|
287
|
+
## Version history
|
|
288
|
+
|
|
289
|
+
See [CHANGELOG.md](CHANGELOG.md)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const gramflowApi_credentials_1 = require("./gramflowApi.credentials");
|
|
5
|
+
const gramflowWebhookApi_credentials_1 = require("./gramflowWebhookApi.credentials");
|
|
6
|
+
(0, vitest_1.describe)('Instagram credential definitions', () => {
|
|
7
|
+
(0, vitest_1.it)('defaults the API credential to Instagram Login and keeps Facebook Login selectable', () => {
|
|
8
|
+
const credential = new gramflowApi_credentials_1.gramflowApi();
|
|
9
|
+
(0, vitest_1.expect)(credential.name).toBe('gramflowApi');
|
|
10
|
+
(0, vitest_1.expect)(credential.displayName).toBe('Gramflow Instagram API');
|
|
11
|
+
(0, vitest_1.expect)(credential.icon).toEqual({ light: 'file:../credentials/gramflow.svg', dark: 'file:../credentials/gramflow.svg' });
|
|
12
|
+
const accessToken = credential.properties.find((property) => property.name === 'accessToken');
|
|
13
|
+
const apiEndpoint = credential.properties.find((property) => property.name === 'apiEndpoint');
|
|
14
|
+
(0, vitest_1.expect)(accessToken).toMatchObject({
|
|
15
|
+
type: 'string',
|
|
16
|
+
required: true,
|
|
17
|
+
default: '',
|
|
18
|
+
typeOptions: { password: true },
|
|
19
|
+
});
|
|
20
|
+
(0, vitest_1.expect)(apiEndpoint).toMatchObject({
|
|
21
|
+
type: 'options',
|
|
22
|
+
default: 'graph.instagram.com',
|
|
23
|
+
options: [{ value: 'graph.instagram.com' }, { value: 'graph.facebook.com' }],
|
|
24
|
+
});
|
|
25
|
+
(0, vitest_1.expect)(credential.authenticate).toEqual({
|
|
26
|
+
type: 'generic',
|
|
27
|
+
properties: { qs: { access_token: '={{$credentials.accessToken}}' } },
|
|
28
|
+
});
|
|
29
|
+
(0, vitest_1.expect)(credential.test).toEqual({
|
|
30
|
+
request: {
|
|
31
|
+
method: 'GET',
|
|
32
|
+
url: '=https://{{$credentials.apiEndpoint ?? "graph.instagram.com"}}/v26.0/me',
|
|
33
|
+
qs: { fields: 'id' },
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
(0, vitest_1.it)('stores the App Secret for webhook signature verification', () => {
|
|
38
|
+
const credential = new gramflowWebhookApi_credentials_1.gramflowWebhookApi();
|
|
39
|
+
(0, vitest_1.expect)(credential.name).toBe('gramflowWebhookApi');
|
|
40
|
+
(0, vitest_1.expect)(credential.displayName).toBe('Gramflow Instagram Webhook API');
|
|
41
|
+
(0, vitest_1.expect)(credential.properties).toContainEqual(vitest_1.expect.objectContaining({
|
|
42
|
+
name: 'appSecret',
|
|
43
|
+
type: 'string',
|
|
44
|
+
required: true,
|
|
45
|
+
typeOptions: { password: true },
|
|
46
|
+
}));
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=credentials.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.test.js","sourceRoot":"","sources":["../../credentials/credentials.test.ts"],"names":[],"mappings":";;AAAA,mCAA8C;AAC9C,uEAAwD;AACxD,qFAAsE;AAEtE,IAAA,iBAAQ,EAAC,kCAAkC,EAAE,GAAG,EAAE;IAChD,IAAA,WAAE,EAAC,oFAAoF,EAAE,GAAG,EAAE;QAC5F,MAAM,UAAU,GAAG,IAAI,qCAAW,EAAE,CAAC;QAErC,IAAA,eAAM,EAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5C,IAAA,eAAM,EAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAC9D,IAAA,eAAM,EAAC,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,kCAAkC,EAAE,IAAI,EAAE,kCAAkC,EAAE,CAAC,CAAC;QAEzH,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;QAC9F,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;QAE9F,IAAA,eAAM,EAAC,WAAW,CAAC,CAAC,aAAa,CAAC;YAChC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAChC,CAAC,CAAC;QACH,IAAA,eAAM,EAAC,WAAW,CAAC,CAAC,aAAa,CAAC;YAChC,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,qBAAqB;YAC9B,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;SAC7E,CAAC,CAAC;QACH,IAAA,eAAM,EAAC,UAAU,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;YACtC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,+BAA+B,EAAE,EAAE;SACtE,CAAC,CAAC;QACH,IAAA,eAAM,EAAC,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;YAC9B,OAAO,EAAE;gBACP,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,yEAAyE;gBAC9E,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;aACrB;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,0DAA0D,EAAE,GAAG,EAAE;QAClE,MAAM,UAAU,GAAG,IAAI,mDAAkB,EAAE,CAAC;QAC5C,IAAA,eAAM,EAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACnD,IAAA,eAAM,EAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QACtE,IAAA,eAAM,EAAC,UAAU,CAAC,UAAU,CAAC,CAAC,cAAc,CAC1C,eAAM,CAAC,gBAAgB,CAAC;YACtB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAChC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<svg width="800px" height="800px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<rect x="2" y="2" width="28" height="28" rx="6" fill="#654CE7"/>
|
|
4
|
+
<rect x="2" y="2" width="28" height="28" rx="6" fill="#818CF8"/>
|
|
5
|
+
<rect x="2" y="2" width="28" height="28" rx="6" fill="#A5F3FC"/>
|
|
6
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M23 10.5C23 11.3284 22.3284 12 21.5 12C20.6716 12 20 11.3284 20 10.5C20 9.67157 20.6716 9 21.5 9C22.3284 9 23 9.67157 23 10.5Z" fill="white"/>
|
|
7
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 21C18.7614 21 21 18.7614 21 16C21 13.2386 18.7614 11 16 11C13.2386 11 11 13.2386 11 16C11 18.7614 13.2386 21 16 21ZM16 19C17.6569 19 19 17.6569 19 16C19 14.3431 17.6569 13 16 13C14.3431 13 13 14.3431 13 16C13 17.6569 14.3431 19 16 19Z" fill="white"/>
|
|
8
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 15.6C6 12.2397 6 10.5595 6.65396 9.27606C7.2292 8.14708 8.14708 7.2292 9.27606 6.65396C10.5595 6 12.2397 6 15.6 6H16.4C19.7603 6 21.4405 6 22.7239 6.65396C23.8529 7.2292 24.7708 8.14708 25.346 9.27606C26 10.5595 26 12.2397 26 15.6V16.4C26 19.7603 26 21.4405 25.346 22.7239C24.7708 23.8529 23.8529 24.7708 22.7239 25.346C21.4405 26 19.7603 26 16.4 26H15.6C12.2397 26 10.5595 26 9.27606 25.346C8.14708 24.7708 7.2292 23.8529 6.65396 22.7239C6 21.4405 6 19.7603 6 16.4V15.6ZM15.6 8H16.4C18.1132 8 19.2777 8.00156 20.1779 8.0751C21.0548 8.14674 21.5032 8.27659 21.816 8.43597C22.5686 8.81947 23.1805 9.43139 23.564 10.184C23.7234 10.4968 23.8533 10.9452 23.9249 11.8221C23.9984 12.7223 24 13.8868 24 15.6V16.4C24 18.1132 23.9984 19.2777 23.9249 20.1779C23.8533 21.0548 23.7234 21.5032 23.564 21.816C23.1805 22.5686 22.5686 23.1805 21.816 23.564C21.5032 23.7234 21.0548 23.8533 20.1779 23.9249C19.2777 23.9984 18.1132 24 16.4 24H15.6C13.8868 24 12.7223 23.9984 11.8221 23.9249C10.9452 23.8533 10.4968 23.7234 10.184 23.564C9.43139 23.1805 8.81947 22.5686 8.43597 21.816C8.27659 21.5032 8.14674 21.0548 8.0751 20.1779C8.00156 19.2777 8 18.1132 8 16.4V15.6C8 13.8868 8.00156 12.7223 8.0751 11.8221C8.14674 10.9452 8.27659 10.4968 8.43597 10.184C8.81947 9.43139 9.43139 8.81947 10.184 8.43597C10.4968 8.27659 10.9452 8.14674 11.8221 8.0751C12.7223 8.00156 13.8868 8 15.6 8Z" fill="white"/>
|
|
9
|
+
<defs>
|
|
10
|
+
<radialGradient id="paint0_radial_87_7153" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12 23) rotate(-55.3758) scale(25.5196)">
|
|
11
|
+
<stop stop-color="#4F46E5"/>
|
|
12
|
+
<stop offset="0.79309" stop-color="#7C3AED"/>
|
|
13
|
+
<stop offset="1" stop-color="#A78BFA"/>
|
|
14
|
+
</radialGradient>
|
|
15
|
+
<radialGradient id="paint1_radial_87_7153" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(11 31) rotate(-65.1363) scale(22.5942)">
|
|
16
|
+
<stop stop-color="#10B981"/>
|
|
17
|
+
<stop offset="0.444662" stop-color": "#34D399"/>
|
|
18
|
+
<stop offset="0.71474" stop-color": "#6EE7B7"/>
|
|
19
|
+
<stop offset="1" stop-color": "#6EE7B7" stop-opacity": "0"/>
|
|
20
|
+
</radialGradient>
|
|
21
|
+
<radialGradient id="paint2_radial_87_7153" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.500002 3) rotate(-8.1301) scale(38.8909 8.31836)">
|
|
22
|
+
<stop offset="0.156701" stop-color": "#F472B6"/>
|
|
23
|
+
<stop offset="0.467799" stop-color": "#EC4899"/>
|
|
24
|
+
<stop offset="1" stop-color": "#EC4899" stop-opacity": "0"/>
|
|
25
|
+
</radialGradient>
|
|
26
|
+
</defs>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
|
|
2
|
+
export declare class gramflowApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gramflowApi = void 0;
|
|
4
|
+
class gramflowApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'gramflowApi';
|
|
7
|
+
this.displayName = 'Gramflow Instagram API';
|
|
8
|
+
this.icon = { light: 'file:../credentials/gramflow.svg', dark: 'file:../credentials/gramflow.svg' };
|
|
9
|
+
this.documentationUrl = 'https://github.com/0m4r/n8n-nodes-instagram#credentials';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Access Token',
|
|
13
|
+
name: 'accessToken',
|
|
14
|
+
type: 'string',
|
|
15
|
+
typeOptions: { password: true },
|
|
16
|
+
required: true,
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'Access token with permissions for the selected API endpoint',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'API Endpoint',
|
|
22
|
+
name: 'apiEndpoint',
|
|
23
|
+
type: 'options',
|
|
24
|
+
options: [
|
|
25
|
+
{
|
|
26
|
+
name: 'Instagram Graph API',
|
|
27
|
+
value: 'graph.instagram.com',
|
|
28
|
+
description: 'Use graph.instagram.com with an Instagram Login access token (default)',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Facebook Graph API',
|
|
32
|
+
value: 'graph.facebook.com',
|
|
33
|
+
description: 'Use graph.facebook.com with a Facebook Login access token. Page lookup and hashtag search require this endpoint.',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
default: 'graph.instagram.com',
|
|
37
|
+
description: 'Use an access token issued for the selected login flow. Page lookup and hashtag search are available only with Facebook Login.',
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
this.authenticate = {
|
|
41
|
+
type: 'generic',
|
|
42
|
+
properties: {
|
|
43
|
+
qs: {
|
|
44
|
+
access_token: '={{$credentials.accessToken}}',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
this.test = {
|
|
49
|
+
request: {
|
|
50
|
+
method: 'GET',
|
|
51
|
+
url: '=https://{{$credentials.apiEndpoint ?? "graph.instagram.com"}}/v26.0/me',
|
|
52
|
+
qs: {
|
|
53
|
+
fields: 'id',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.gramflowApi = gramflowApi;
|
|
60
|
+
//# sourceMappingURL=gramflowApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gramflowApi.credentials.js","sourceRoot":"","sources":["../../credentials/gramflowApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,WAAW;IAAxB;QACE,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAG,wBAAwB,CAAC;QACvC,SAAI,GAAS,EAAE,KAAK,EAAE,kCAAkC,EAAE,IAAI,EAAE,kCAAkC,EAAE,CAAC;QACrG,qBAAgB,GAAG,yDAAyD,CAAC;QAC7E,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,6DAA6D;aAC3E;YACD;gBACE,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,qBAAqB;wBAC3B,KAAK,EAAE,qBAAqB;wBAC5B,WAAW,EAAE,wEAAwE;qBACtF;oBACD;wBACE,IAAI,EAAE,oBAAoB;wBAC1B,KAAK,EAAE,oBAAoB;wBAC3B,WAAW,EACT,kHAAkH;qBACrH;iBACF;gBACD,OAAO,EAAE,qBAAqB;gBAC9B,WAAW,EACT,gIAAgI;aACnI;SACF,CAAC;QACF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,YAAY,EAAE,+BAA+B;iBAC9C;aACF;SACF,CAAC;QACF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,yEAAyE;gBAC9E,EAAE,EAAE;oBACF,MAAM,EAAE,IAAI;iBACb;aACF;SACF,CAAC;IACJ,CAAC;CAAA;AAtDD,kCAsDC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gramflowWebhookApi = void 0;
|
|
4
|
+
class gramflowWebhookApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'gramflowWebhookApi';
|
|
7
|
+
this.displayName = 'Gramflow Instagram Webhook API';
|
|
8
|
+
this.icon = { light: 'file:../credentials/gramflow.svg', dark: 'file:../credentials/gramflow.svg' };
|
|
9
|
+
this.documentationUrl = 'https://developers.facebook.com/docs/graph-api/webhooks/getting-started';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'App Secret',
|
|
13
|
+
name: 'appSecret',
|
|
14
|
+
type: 'string',
|
|
15
|
+
typeOptions: { password: true },
|
|
16
|
+
required: true,
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'Meta App Secret used to validate X-Hub-Signature-256 webhook signatures',
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.gramflowWebhookApi = gramflowWebhookApi;
|
|
24
|
+
//# sourceMappingURL=gramflowWebhookApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gramflowWebhookApi.credentials.js","sourceRoot":"","sources":["../../credentials/gramflowWebhookApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,kBAAkB;IAA/B;QACE,SAAI,GAAG,oBAAoB,CAAC;QAC5B,gBAAW,GAAG,gCAAgC,CAAC;QAC/C,SAAI,GAAS,EAAE,KAAK,EAAE,kCAAkC,EAAE,IAAI,EAAE,kCAAkC,EAAE,CAAC;QACrG,qBAAgB,GAAG,yEAAyE,CAAC;QAC7F,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,yEAAyE;aACvF;SACF,CAAC;IACJ,CAAC;CAAA;AAhBD,gDAgBC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
2
|
+
<svg width="800px" height="800px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<rect x="2" y="2" width="28" height="28" rx="6" fill="url(#paint0_radial_87_7153)"/>
|
|
4
|
+
<rect x="2" y="2" width="28" height="28" rx="6" fill="url(#paint1_radial_87_7153)"/>
|
|
5
|
+
<rect x="2" y="2" width="28" height="28" rx="6" fill="url(#paint2_radial_87_7153)"/>
|
|
6
|
+
<path d="M23 10.5C23 11.3284 22.3284 12 21.5 12C20.6716 12 20 11.3284 20 10.5C20 9.67157 20.6716 9 21.5 9C22.3284 9 23 9.67157 23 10.5Z" fill="white"/>
|
|
7
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 21C18.7614 21 21 18.7614 21 16C21 13.2386 18.7614 11 16 11C13.2386 11 11 13.2386 11 16C11 18.7614 13.2386 21 16 21ZM16 19C17.6569 19 19 17.6569 19 16C19 14.3431 17.6569 13 16 13C14.3431 13 13 14.3431 13 16C13 17.6569 14.3431 19 16 19Z" fill="white"/>
|
|
8
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 15.6C6 12.2397 6 10.5595 6.65396 9.27606C7.2292 8.14708 8.14708 7.2292 9.27606 6.65396C10.5595 6 12.2397 6 15.6 6H16.4C19.7603 6 21.4405 6 22.7239 6.65396C23.8529 7.2292 24.7708 8.14708 25.346 9.27606C26 10.5595 26 12.2397 26 15.6V16.4C26 19.7603 26 21.4405 25.346 22.7239C24.7708 23.8529 23.8529 24.7708 22.7239 25.346C21.4405 26 19.7603 26 16.4 26H15.6C12.2397 26 10.5595 26 9.27606 25.346C8.14708 24.7708 7.2292 23.8529 6.65396 22.7239C6 21.4405 6 19.7603 6 16.4V15.6ZM15.6 8H16.4C18.1132 8 19.2777 8.00156 20.1779 8.0751C21.0548 8.14674 21.5032 8.27659 21.816 8.43597C22.5686 8.81947 23.1805 9.43139 23.564 10.184C23.7234 10.4968 23.8533 10.9452 23.9249 11.8221C23.9984 12.7223 24 13.8868 24 15.6V16.4C24 18.1132 23.9984 19.2777 23.9249 20.1779C23.8533 21.0548 23.7234 21.5032 23.564 21.816C23.1805 22.5686 22.5686 23.1805 21.816 23.564C21.5032 23.7234 21.0548 23.8533 20.1779 23.9249C19.2777 23.9984 18.1132 24 16.4 24H15.6C13.8868 24 12.7223 23.9984 11.8221 23.9249C10.9452 23.8533 10.4968 23.7234 10.184 23.564C9.43139 23.1805 8.81947 22.5686 8.43597 21.816C8.27659 21.5032 8.14674 21.0548 8.0751 20.1779C8.00156 19.2777 8 18.1132 8 16.4V15.6C8 13.8868 8.00156 12.7223 8.0751 11.8221C8.14674 10.9452 8.27659 10.4968 8.43597 10.184C8.81947 9.43139 9.43139 8.81947 10.184 8.43597C10.4968 8.27659 10.9452 8.14674 11.8221 8.0751C12.7223 8.00156 13.8868 8 15.6 8Z" fill="white"/>
|
|
9
|
+
<defs>
|
|
10
|
+
<radialGradient id="paint0_radial_87_7153" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12 23) rotate(-55.3758) scale(25.5196)">
|
|
11
|
+
<stop stop-color="#B13589"/>
|
|
12
|
+
<stop offset="0.79309" stop-color="#C62F94"/>
|
|
13
|
+
<stop offset="1" stop-color="#8A3AC8"/>
|
|
14
|
+
</radialGradient>
|
|
15
|
+
<radialGradient id="paint1_radial_87_7153" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(11 31) rotate(-65.1363) scale(22.5942)">
|
|
16
|
+
<stop stop-color="#E0E8B7"/>
|
|
17
|
+
<stop offset="0.444662" stop-color="#FB8A2E"/>
|
|
18
|
+
<stop offset="0.71474" stop-color="#E2425C"/>
|
|
19
|
+
<stop offset="1" stop-color="#E2425C" stop-opacity="0"/>
|
|
20
|
+
</radialGradient>
|
|
21
|
+
<radialGradient id="paint2_radial_87_7153" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.500002 3) rotate(-8.1301) scale(38.8909 8.31836)">
|
|
22
|
+
<stop offset="0.156701" stop-color="#406ADC"/>
|
|
23
|
+
<stop offset="0.467799" stop-color="#6A45BE"/>
|
|
24
|
+
<stop offset="1" stop-color="#6A45BE" stop-opacity="0"/>
|
|
25
|
+
</radialGradient>
|
|
26
|
+
</defs>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodeListSearchResult, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class Instagram implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
listSearch: {
|
|
6
|
+
searchInstagramAccounts(this: ILoadOptionsFunctions): Promise<INodeListSearchResult>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|