longrun.
Choose output storage
Build with LongRun / Choose output storage

Choose output storage

Choose where results go, name your files, and keep them for later.

1. Choose a destination

The output.storage field accepts exactly two values: temporary stores the result in LongRun; bubble delivers it to a connected Bubble app. For a direct action, leaving output out uses temporary. A published workflow uses its configured destination unless your request overrides it. The example uses HTML to PDF, one of the available actions.

Store a result in LongRun
curl --request POST "https://api.uselongrun.app/v1/pdf/html-to-pdf" \
  --header "Authorization: Bearer ${API_KEY}" \
  --header "Content-Type: application/json" \
  --data '{
  "inputs": {
    "html": "<h1>Receipt</h1>"
  },
  "output": {
    "storage": "temporary"
  }
}'

2. Choose an output name

Set output.file_name when you need a particular filename. Include the correct extension and use at most 255 characters. Leave it out to use the generated timestamp-based name.

Name the PDF
curl --request POST "https://api.uselongrun.app/v1/pdf/html-to-pdf" \
  --header "Authorization: Bearer ${API_KEY}" \
  --header "Content-Type: application/json" \
  --data '{
  "inputs": {
    "html": "<h1>Receipt</h1>"
  },
  "output": {
    "storage": "temporary",
    "file_name": "receipt.pdf"
  }
}'

3. Retrieve and keep the result

Copy the returned run ID, then check it until status is completed, failed, or cancelled. A completed HTML-to-PDF run returns its file in outputs.file. Use that file ID to download. Temporary files expire: read expires_at. To keep an eligible LongRun file, save it before expiry. saved is a retention setting, not a valid output.storage value.

Check the run
curl --request GET "https://api.uselongrun.app/v1/runs/${RUN_ID}" \
  --header "Authorization: Bearer ${API_KEY}"
Download the result
curl --fail-with-body "https://api.uselongrun.app/v1/files/${FILE_ID}/content" \
  --header "Authorization: Bearer ${API_KEY}" \
  --output result.pdf
Keep the file
curl --request POST "https://api.uselongrun.app/v1/files/${FILE_ID}/save" \
  --header "Authorization: Bearer ${API_KEY}" \
  --header "Content-Type: application/json" \
  --data '{}'

4. Connect an external destination

For Bubble delivery, follow the Bubble guide in Integrations. It explains connection_id, private and attach_to, with complete request examples. For your own application, you can download a LongRun result and store it wherever your app needs. Never forward your LongRun API key to an external file URL.