Backblaze B2
Upload and list files in Backblaze B2 cloud storage.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("backblaze", action, input) resolves with the provider's answer and rejects when Backblaze B2 isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "backblaze"} says whether yours can call it.
// workflows/notify.ts: call Backblaze B2 when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellBackblaze = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Backblaze B2 isn't connected.
const output = await step.run("Backblaze B2", () =>
step.ctx.integrations.invoke("backblaze", "read-backblaze-file", {
"key": "<key>"
}),
);
step.ctx.log("Backblaze B2 answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "backblaze",
"piece_action": "read-backblaze-file",
"input": {
"key": "<key>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/backblaze/read-backblaze-file" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"key":"<key>"}}'Actions
read-backblaze-file
Read File. Read a file from Backblaze bucket to use it in other steps.
| Input | Type | Description |
|---|---|---|
keyrequired | text | The key of the file to read. include extension if file has any extension. |
upload-backblaze-file
Upload File. Upload an File to bucket.
| Input | Type | Description |
|---|---|---|
filerequired | file | File |
fileNameoptional | text | my-file-name (no extension). write full path if you want to store in the directories or sub-directories. |
acloptional | one of "private" | "public-read" | "public-read-write" | "authenticated-read" | "aws-exec-read" | "bucket-owner-read" | "bucket-owner-full-control" | ACL |
typerequired | one of "image/png" | "image/jpeg" | "image/gif" | "audio/mpeg" | "audio/wav" | "video/mp4" | "application/pdf" | "application/msword" | "text/plain" | "application/json" | Type |
Details
- Id
backblaze- Category
- Data and storage
- Tags
- storage, cloud, backup, files
- Package
@activepieces/piece-backblaze@0.1.3- Runs
- Through the integration runner