Upload images and video in n8n
Uploading an asset to PinBridge lets you publish a pin from your own hosted file instead of a public URL. It is also the only way to publish a video pin: you upload a video asset, then reference its ID. This page covers both.
Prerequisites
- A paid plan. Uploading assets requires the
uploaded_media_assetsfeature, which is off on Free (Playground). A Free-plan upload returns a 403; on Free, use Publish your first pin with a public image URL instead. - The PinBridge credential set up. See Set up your PinBridge credential.
- Binary file data in your workflow (from an HTTP Request, Read Binary File, Google Drive, or similar node).
Supported formats and size limits
- Images: gif, jpeg, png, webp.
- Videos: mp4, quicktime (mov).
Per-file size is plan-based: Starter 10 MiB image / 250 MiB video, Growth 50 MiB / 500 MiB, Agency 100 MiB / 1 GiB, Enterprise 100 MiB / 1 GiB. Each project also has a total disk quota (Starter 2 GiB, Growth 7 GiB, Agency 20 GiB, Enterprise 20 GiB); exceeding it returns a 402 storage_quota_exceeded. Assets have no expiry.
The binary property
Both upload operations read the file from a Binary Property field (binaryPropertyName), which defaults to data. Whatever node produces your file must expose it on a binary property, and that property name must match this field. Most upstream nodes (HTTP Request with response format “File”, Read Binary File) output binary data as data by default, so you usually leave this field alone.
Step 1: Upload the file
- Add a PinBridge node set to Resource = Asset.
- Set Operation to Upload Image or Upload Video.
- Confirm Binary Property matches the property holding your file (default
data). - Execute the node. It calls
POST /v1/assets/images(or.../videos) asmultipart/form-dataand returns the created asset, including itsid.
The response’s id is the asset ID you reference in the next step.
Step 2: Publish a pin from the uploaded asset
- Add a PinBridge node set to Pin → Publish.
- Select your Connection and Board.
- Set Media Source to Uploaded Asset.
- In the Asset ID field, use
={{$json["id"]}}. This is the field’s default expression and it reads theidfrom the previous Upload node’s output. - Set a Title, keep the default Idempotency Key, and execute.
For a video pin, upload with Upload Video, then publish with Media Source = Uploaded Asset and Asset ID pointing at the video asset. There is no video URL field; a video pin always references an uploaded video asset. To add a cover image, set Video Cover Source to a URL or an uploaded image asset (a cover asset must be an image).
curl equivalent
Upload, then publish from the returned id:
# 1) Upload an image
curl -sS -X POST "https://api.pinbridge.io/v1/assets/images" \
-H "X-API-Key: $PINBRIDGE_API_KEY" \
-F "file=@./pin.png"
# → {"id": "e3a7c5f9-1b4d-4c8e-a2f6-7d9b3e5a1c80", "asset_type": "image", ...}
# 2) Publish using the asset_id from step 1
curl -sS -X POST "https://api.pinbridge.io/v1/pins" \
-H "X-API-Key: $PINBRIDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_id": "6f1c2e4a-3b7d-4c9e-8a21-5d0f9b3e7c41",
"board_id": "987654321098765432",
"title": "Pin from an uploaded asset",
"asset_id": "e3a7c5f9-1b4d-4c8e-a2f6-7d9b3e5a1c80",
"idempotency_key": "asset-pin-001"
}'
Verify it worked
Check the publish node’s output status, or add a Pin → Get node with Pin ID = ={{$json["id"]}}. When it reaches published, the asset was accepted and the pin is live. A missing or wrong asset reference fails with asset_not_found; see Troubleshooting.
Common errors
- 403 on upload — your plan does not include uploaded assets (Free), or the per-file limit for your plan is 0. Publish from a public image URL, or upgrade.
- 400 file_too_large — the file exceeds your plan’s per-file cap.
- 402 storage_quota_exceeded — your project disk quota is full. Delete unused assets or upgrade.
- Binary property not found — the Binary Property name does not match the property holding your file. See Troubleshooting.
Next steps
- Publish your first pin — the URL-based flow.
- Bulk import pins — publish many pins at once.
- Node reference — every Asset operation and endpoint.
