1. Template Guidelines
  2. Files and File Permissions

Template Guidelines

Files and File Permissions

Covers file references, private and public visibility, and creating and editing images.

See Files for the concept and managing files on the platform.

File basics

  • Files are passed around the Stubber Framework by reference, never by content. Every file has a fileuuid that uniquely identifies it in the Stubber file store. It is a v5 UUID, for example 94434525-8bc2-5e52-ae9b-fbc9a0481c5a (note the 5 at the start of the third group).
  • Systems that accept or capture files use an array of file objects. Only fileuuid is required; filename, f_id (a shorter, org-specific ID), originalname (used by some upload parts of Stubber) and contentType are optional:
        [
  {
    "filename": "Stubber_Logo - Primary.png",
    "fileuuid": "94434525-8bc2-5e52-ae9b-fbc9a0481c5a",
    "f_id": "fwnvc",
    "originalname": "Stubber_Logo - Primary.png",
    "contentType": "image/png"
  }
]

      
  • Notification platforms such as WhatsApp and email automatically capture and store incoming files, and pass the file array to the feedback action. Tasks that work on files accept a file array.
  • Anyone with the right permissions can download a file at https://app.stubber.com/api/fileserver/file/[fileuuid].

Images for your templates

When a build needs a visual asset, such as a webchat banner or welcome image, an agent avatar, an illustration or a thumbnail for a form, dashboard or layout, Flowpilot can create one for you, or edit an existing image.

Creating an image

Describe:

  • where it will be used
  • the subject, brand colors, style and composition, and any exact text
  • for banners, safe margins and space for any UI text laid over it, so key content isn't cropped or hidden

Match the size and aspect ratio to where the image will be used. Supported sizes include 1024x1024, 1536x1024, 1024x1536 and auto. Custom WIDTHxHEIGHT sizes must be multiples of 16, have an aspect ratio between 1:3 and 3:1, and total at least 1,048,576 pixels. For a smaller or more extreme banner shape, generate an image with a crop-safe composition, then resize or crop it to fit.

Create a static asset once and reuse its file reference. Only generate images per conversation in a workflow if you really need dynamic images.

Editing an image

Edit rather than start from scratch when visual continuity matters, for example to refine a supplied image, revise a banner, change a background or colors, update text, or adapt an image to another placement. Be clear about what must change and what must stay the same.

  • Editing produces a new image; the original and its permissions don't change. Use the new file reference for the revised asset.
  • Check the result before you use it, especially exact text, logos, colors, composition and crop safety. Generated images don't always reproduce branding or text perfectly.
  • Use ordinary image tasks for purely mechanical resizing, cropping, rotation or compression.

Creating an image doesn't apply it anywhere: set its file reference or public URL in the webchat, form, dashboard, layout or document configuration where you want it.

File visibility

  • private: access is limited to users in your org. Use this by default, including for drafts, internal assets, documents, evidence and sensitive material.
  • public: anyone with the file's URL can access it. Use it only when public access is intended, such as an approved webchat banner that must load for visitors who aren't signed in. Don't make internal or sensitive images public just to preview them.

Choose visibility separately for an edited image: a public source doesn't mean the edited version should be public. You can change a file's permissions later.

Private files can still be referenced by fileuuid in supported LLM tasks and in notification media, including WhatsApp. A file doesn't need to be public for an agent to inspect it.