n8n-nodes-cloudinary 0.0.9 → 0.1.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 +51 -0
- package/dist/credentials/CloudinaryApi.credentials.js +16 -0
- package/dist/credentials/CloudinaryApi.credentials.js.map +1 -1
- package/dist/nodes/Cloudinary/Cloudinary.node.d.ts +0 -1
- package/dist/nodes/Cloudinary/Cloudinary.node.js +26 -707
- package/dist/nodes/Cloudinary/Cloudinary.node.js.map +1 -1
- package/dist/nodes/Cloudinary/Cloudinary.node.json +5 -1
- package/dist/nodes/Cloudinary/cloudinary.utils.d.ts +34 -0
- package/dist/nodes/Cloudinary/cloudinary.utils.js +114 -3
- package/dist/nodes/Cloudinary/cloudinary.utils.js.map +1 -1
- package/dist/nodes/Cloudinary/descriptions/admin/getTags.fields.d.ts +2 -0
- package/dist/nodes/Cloudinary/descriptions/admin/getTags.fields.js +64 -0
- package/dist/nodes/Cloudinary/descriptions/admin/getTags.fields.js.map +1 -0
- package/dist/nodes/Cloudinary/descriptions/admin/search.fields.d.ts +2 -0
- package/dist/nodes/Cloudinary/descriptions/admin/search.fields.js +119 -0
- package/dist/nodes/Cloudinary/descriptions/admin/search.fields.js.map +1 -0
- package/dist/nodes/Cloudinary/descriptions/asset.fields.d.ts +2 -0
- package/dist/nodes/Cloudinary/descriptions/asset.fields.js +357 -0
- package/dist/nodes/Cloudinary/descriptions/asset.fields.js.map +1 -0
- package/dist/nodes/Cloudinary/descriptions/index.d.ts +2 -0
- package/dist/nodes/Cloudinary/descriptions/index.js +22 -0
- package/dist/nodes/Cloudinary/descriptions/index.js.map +1 -0
- package/dist/nodes/Cloudinary/descriptions/resource.d.ts +2 -0
- package/dist/nodes/Cloudinary/descriptions/resource.js +267 -0
- package/dist/nodes/Cloudinary/descriptions/resource.js.map +1 -0
- package/dist/nodes/Cloudinary/descriptions/transform.fields.d.ts +2 -0
- package/dist/nodes/Cloudinary/descriptions/transform.fields.js +742 -0
- package/dist/nodes/Cloudinary/descriptions/transform.fields.js.map +1 -0
- package/dist/nodes/Cloudinary/descriptions/updateAsset.fields.d.ts +2 -0
- package/dist/nodes/Cloudinary/descriptions/updateAsset.fields.js +262 -0
- package/dist/nodes/Cloudinary/descriptions/updateAsset.fields.js.map +1 -0
- package/dist/nodes/Cloudinary/descriptions/upload.fields.d.ts +2 -0
- package/dist/nodes/Cloudinary/descriptions/upload.fields.js +191 -0
- package/dist/nodes/Cloudinary/descriptions/upload.fields.js.map +1 -0
- package/dist/nodes/Cloudinary/descriptions/widget.fields.d.ts +2 -0
- package/dist/nodes/Cloudinary/descriptions/widget.fields.js +268 -0
- package/dist/nodes/Cloudinary/descriptions/widget.fields.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/admin/getMetadataFields.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/admin/getMetadataFields.js +17 -0
- package/dist/nodes/Cloudinary/operations/admin/getMetadataFields.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/admin/getTags.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/admin/getTags.js +28 -0
- package/dist/nodes/Cloudinary/operations/admin/getTags.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/admin/search.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/admin/search.js +92 -0
- package/dist/nodes/Cloudinary/operations/admin/search.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/asset/updateMetadata.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/asset/updateMetadata.js +25 -0
- package/dist/nodes/Cloudinary/operations/asset/updateMetadata.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/asset/updateTags.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/asset/updateTags.js +30 -0
- package/dist/nodes/Cloudinary/operations/asset/updateTags.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/index.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/index.js +50 -0
- package/dist/nodes/Cloudinary/operations/index.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/tagAppend.d.ts +4 -0
- package/dist/nodes/Cloudinary/operations/tagAppend.js +44 -0
- package/dist/nodes/Cloudinary/operations/tagAppend.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/convertImage.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/transform/convertImage.js +23 -0
- package/dist/nodes/Cloudinary/operations/transform/convertImage.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/cropImage.d.ts +3 -0
- package/dist/nodes/Cloudinary/operations/transform/cropImage.js +31 -0
- package/dist/nodes/Cloudinary/operations/transform/cropImage.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/customTransformation.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/transform/customTransformation.js +28 -0
- package/dist/nodes/Cloudinary/operations/transform/customTransformation.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/multiStep.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/transform/multiStep.js +78 -0
- package/dist/nodes/Cloudinary/operations/transform/multiStep.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/optimizeImage.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/transform/optimizeImage.js +22 -0
- package/dist/nodes/Cloudinary/operations/transform/optimizeImage.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/optimizeVideo.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/transform/optimizeVideo.js +22 -0
- package/dist/nodes/Cloudinary/operations/transform/optimizeVideo.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/resizeImage.d.ts +3 -0
- package/dist/nodes/Cloudinary/operations/transform/resizeImage.js +28 -0
- package/dist/nodes/Cloudinary/operations/transform/resizeImage.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/shared.d.ts +47 -0
- package/dist/nodes/Cloudinary/operations/transform/shared.js +179 -0
- package/dist/nodes/Cloudinary/operations/transform/shared.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/trimVideo.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/transform/trimVideo.js +24 -0
- package/dist/nodes/Cloudinary/operations/transform/trimVideo.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/transform/videoThumbnail.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/transform/videoThumbnail.js +34 -0
- package/dist/nodes/Cloudinary/operations/transform/videoThumbnail.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/types.d.ts +10 -0
- package/dist/nodes/Cloudinary/operations/types.js +5 -0
- package/dist/nodes/Cloudinary/operations/types.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/deleteAssets.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/deleteAssets.js +36 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/deleteAssets.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/getAsset.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/getAsset.js +20 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/getAsset.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/updateMetadata.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/updateMetadata.js +27 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/updateMetadata.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/updateTags.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/updateTags.js +32 -0
- package/dist/nodes/Cloudinary/operations/updateAsset/updateTags.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/upload/uploadFile.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/upload/uploadFile.js +44 -0
- package/dist/nodes/Cloudinary/operations/upload/uploadFile.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/upload/uploadUrl.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/upload/uploadUrl.js +34 -0
- package/dist/nodes/Cloudinary/operations/upload/uploadUrl.js.map +1 -0
- package/dist/nodes/Cloudinary/operations/widget/videoPlayer.d.ts +2 -0
- package/dist/nodes/Cloudinary/operations/widget/videoPlayer.js +170 -0
- package/dist/nodes/Cloudinary/operations/widget/videoPlayer.js.map +1 -0
- package/dist/package.json +7 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -3
- package/dist/nodes/Cloudinary/sha1.utils.d.ts +0 -1
- package/dist/nodes/Cloudinary/sha1.utils.js +0 -68
- package/dist/nodes/Cloudinary/sha1.utils.js.map +0 -1
package/README.md
CHANGED
|
@@ -12,6 +12,53 @@ On this page, you'll find a list of operations the Cloudinary node supports.
|
|
|
12
12
|
* Update asset metadata fields
|
|
13
13
|
* Get tags
|
|
14
14
|
* Get structured metadata definitions
|
|
15
|
+
* Search assets
|
|
16
|
+
* Transform (builds a delivery URL — no API call)
|
|
17
|
+
* Image: Optimize, Resize, Crop, Convert
|
|
18
|
+
* Video: Optimize, Resize, Crop, Trim, Thumbnail
|
|
19
|
+
* Custom Transformation (raw transformation string)
|
|
20
|
+
* Compose: Combine Transformations (multi-step, in one node)
|
|
21
|
+
* Widget
|
|
22
|
+
* Video Player (builds an embed URL + player config)
|
|
23
|
+
|
|
24
|
+
### Search assets
|
|
25
|
+
|
|
26
|
+
Uses the [Cloudinary Search API](https://cloudinary.com/documentation/search_api) to find assets by tag, folder, metadata, or any supported expression (e.g. `tags=cat AND uploaded_at>1d`, `folder:products/*`, `tags="back to school"`).
|
|
27
|
+
|
|
28
|
+
The node emits **one n8n item per matching asset**, so downstream nodes can map over results directly without a Split Out step.
|
|
29
|
+
|
|
30
|
+
- **Resource Types** — Cloudinary's Search API defaults to image-only when no `resource_type:` clause is in the expression. This node injects the clause automatically based on the Resource Types you select (defaults to `image`). To search across all types, select all three. If your expression already contains a `resource_type:` clause, the selection is ignored.
|
|
31
|
+
- **Return All** — when enabled, the node automatically paginates through Cloudinary's `next_cursor` until all matching assets have been returned. When disabled, only the first page (up to *Max Results*, capped at 500) is returned.
|
|
32
|
+
- **Rate limits** — the node surfaces `429`/`420` responses with a clear "rate limit exceeded" error including the server's `Retry-After`.
|
|
33
|
+
- **Eventual consistency** — newly uploaded assets may take a few seconds to appear in search results. Avoid searching for something you just uploaded in the same workflow without a delay.
|
|
34
|
+
|
|
35
|
+
### Transformations and chaining
|
|
36
|
+
|
|
37
|
+
A **transformation** is the instruction string Cloudinary applies when delivering an asset — for example `c_fill,w_400` (crop to 400px wide) or `f_auto/q_auto` (auto format and quality). Each Transform operation builds one and returns it on the output as **`transformation`**, alongside the finished `secure_url`.
|
|
38
|
+
|
|
39
|
+
Real edits usually need several transformations applied in sequence ("first crop, then optimize"). In Cloudinary's URL these are **components joined with `/`**, applied left to right — each acts on the output of the one before it. For example `c_fill,w_400/f_auto/q_auto` means *crop, then auto-format, then auto-quality*. There are three ways to build a chain with this node, from simplest to most flexible:
|
|
40
|
+
|
|
41
|
+
1. **One operation.** A single Transform op (e.g. *Image: Resize*) when one step is all you need.
|
|
42
|
+
|
|
43
|
+
2. **Combine Transformations (one node).** The *Compose → Combine Transformations* operation takes an ordered, reorderable list of steps and chains them inside a single node. Best when the whole recipe is known up front and lives in one place.
|
|
44
|
+
|
|
45
|
+
3. **Continue From Transformation (across nodes).** Every chainable Transform op has an optional **Continue From Transformation** field. This is the bridge that makes chaining work across separate nodes, and it relies on one property mapping:
|
|
46
|
+
|
|
47
|
+
> The upstream op's **`transformation`** output → the downstream op's **Continue From Transformation** input.
|
|
48
|
+
|
|
49
|
+
Wire it with an expression: set *Continue From Transformation* to `{{ $json.transformation }}`. The node prepends that incoming string before the current op's own transformation, so the two compound into one delivery URL. Example — a *Resize* node outputs `transformation: "c_fill,w_400"`; feed it into an *Optimize* node's *Continue From Transformation*, and the Optimize node delivers `c_fill,w_400/f_auto/q_auto`.
|
|
50
|
+
|
|
51
|
+
This field is available on all single-purpose Transform ops. It is intentionally **not** offered on *Custom Transformation* (you already control the entire string there) or *Combine Transformations* (which chains its own steps internally).
|
|
52
|
+
|
|
53
|
+
**Tip:** *Resize* and *Crop* don't auto-optimize. To also get `f_auto/q_auto`, either add an *Optimize* step in *Combine Transformations*, or chain an *Optimize* node after them via *Continue From Transformation*.
|
|
54
|
+
|
|
55
|
+
### Video Player (Widget)
|
|
56
|
+
|
|
57
|
+
The *Widget → Video Player* operation builds a [Cloudinary Video Player](https://cloudinary.com/documentation/video_player_quickstart_guide) embed URL plus a player config. Its **Transformation** field applies to the **played video stream** (it accepts the same `transformation` string the Transform ops emit, so you can wire `{{ $json.transformation }}` here too). A few constraints worth knowing:
|
|
58
|
+
|
|
59
|
+
- **Use video-capable transforms.** Image-only effects (e.g. `e_grayscale`) are silently ignored on video and have no visible effect. See [video effects](https://cloudinary.com/documentation/video_effects_and_enhancements).
|
|
60
|
+
- **Adaptive streaming vs. format selection.** If you select an adaptive-streaming **Source Type** (HLS or MPEG-DASH), the transformation must **not** pin a delivery format (an `f_` component such as `f_auto:video`, which an *Optimize* step adds). The two are incompatible — Cloudinary can't apply a streaming profile to a fixed non-streaming format. The node detects this and fails with a clear message; for adaptive streaming, keep the transformation to resize/crop/trim only.
|
|
61
|
+
- **Aspect Ratio crops on top of your Transformation.** Setting an **Aspect Ratio** makes the player re-crop the video to those proportions using the **Crop Mode** field (*Smart*, *Fill*, or *Pad* — default *Smart*). With the default *Smart* mode, that re-crop can't be combined with a Transformation that already crops the video, and the player rejects it. The node fails fast with a clear message; to render either set *Crop Mode* to *Fill* or *Pad*, or clear *Aspect Ratio* and let your Transformation define the framing.
|
|
15
62
|
|
|
16
63
|
## Supported authentication methods
|
|
17
64
|
|
|
@@ -34,6 +81,10 @@ If you're a user with a Master admin, Admin, or Technical admin role, you can fi
|
|
|
34
81
|
4. From the top of the page copy the **Cloud name**.
|
|
35
82
|
5. Enter the cloud name, api key and api secret to your n8n credential.
|
|
36
83
|
|
|
84
|
+
#### Private CDN / custom delivery hostname (advanced)
|
|
85
|
+
|
|
86
|
+
Most users can skip this. If your organization is on a **Advanced plan** that uses a [private CDN distribution or a custom delivery hostname (CNAME)](https://cloudinary.com/documentation/advanced_url_delivery_options#private_cdns_and_custom_delivery_hostnames_cnames), enable **Private CDN** in the credential and enter your **Custom Delivery Hostname** so the node builds delivery URLs against your private distribution instead of the default `res.cloudinary.com`. Leave these off if you're unsure — they don't apply to standard accounts.
|
|
87
|
+
|
|
37
88
|
|
|
38
89
|
## Related resources
|
|
39
90
|
|
|
@@ -27,6 +27,22 @@ class CloudinaryApi {
|
|
|
27
27
|
default: '',
|
|
28
28
|
typeOptions: { password: true },
|
|
29
29
|
},
|
|
30
|
+
{
|
|
31
|
+
displayName: 'Private CDN',
|
|
32
|
+
name: 'privateCdn',
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
default: false,
|
|
35
|
+
description: 'Whether your account delivers from a private CDN distribution (<cloud>-res.cloudinary.com). Only affects the delivery URLs built by Transform operations.',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Custom Delivery Hostname',
|
|
39
|
+
name: 'secureDistribution',
|
|
40
|
+
type: 'string',
|
|
41
|
+
default: '',
|
|
42
|
+
placeholder: 'assets.example.com',
|
|
43
|
+
description: 'Custom delivery hostname (CNAME) for your private CDN account. Leave empty to use the default <cloud>-res.cloudinary.com subdomain.',
|
|
44
|
+
displayOptions: { show: { privateCdn: [true] } },
|
|
45
|
+
},
|
|
30
46
|
];
|
|
31
47
|
this.authenticate = {
|
|
32
48
|
type: 'generic',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudinaryApi.credentials.js","sourceRoot":"","sources":["../../credentials/CloudinaryApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,aAAa;IAA1B;QACC,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,qBAAgB,GAAG,iEAAiE,CAAC;QACrF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;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;aACX;YACD;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;aAC/B;SACD,CAAC;QAGF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,IAAI,EAAE;oBACL,QAAQ,EAAE,0BAA0B;oBACpC,QAAQ,EAAE,6BAA6B;iBACvC;aACD;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,8DAA8D;gBACvE,GAAG,EAAE,OAAO;aACZ;SACD,CAAC;IACH,CAAC;CAAA;
|
|
1
|
+
{"version":3,"file":"CloudinaryApi.credentials.js","sourceRoot":"","sources":["../../credentials/CloudinaryApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,aAAa;IAA1B;QACC,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,qBAAgB,GAAG,iEAAiE,CAAC;QACrF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;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;aACX;YACD;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;aAC/B;YACD;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EACV,2JAA2J;aAC5J;YACD;gBACC,WAAW,EAAE,0BAA0B;gBACvC,IAAI,EAAE,oBAAoB;gBAC1B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,oBAAoB;gBACjC,WAAW,EACV,qIAAqI;gBACtI,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;aAChD;SACD,CAAC;QAGF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,IAAI,EAAE;oBACL,QAAQ,EAAE,0BAA0B;oBACpC,QAAQ,EAAE,6BAA6B;iBACvC;aACD;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,8DAA8D;gBACvE,GAAG,EAAE,OAAO;aACZ;SACD,CAAC;IACH,CAAC;CAAA;AA/DD,sCA+DC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { INodeType, INodeTypeDescription, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
|
2
2
|
export declare class Cloudinary implements INodeType {
|
|
3
|
-
private static readonly CREDENTIAL_TYPE;
|
|
4
3
|
description: INodeTypeDescription;
|
|
5
4
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
6
5
|
}
|