> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Push File to Box

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

The **Push File to Box** Flow action lets Salesforce admins automatically send
files stored in Salesforce (as `ContentVersion` records) to a designated folder
in Box. You can use it to automate file management workflows between
Salesforce and Box.

## Overview

With the Box for Salesforce integration, you can use Flow Builder to automate
file transfers from Salesforce to Box. The **Push File to Box** action is an
invocable Flow action that:

* Uploads files from Salesforce to Box.
* Associates files with a specific Box folder.
* Supports automation through record-triggered or screen flows.

This is useful for scenarios such as:

* Uploading attachments from Salesforce records into Box automatically.
* Automating document storage for compliance or collaboration.
* Syncing files as part of business workflows.

## Prerequisites

Before you use this action, make sure that:

* Box for Salesforce is [installed and configured][sf-install].
* A Box service account is connected.
* Users are authenticated with Box.
* A Box root folder and folder mapping are configured.
* The connected app is configured as described in the [Box Sign Sync in Salesforce setup guide][sf-connected-app].

## How it works

The **Push File to Box** action takes a Salesforce file and uploads it to
Box. Internally:

1. Salesforce stores files as `ContentVersion` records.
2. The Flow action retrieves the file data.
3. The file is uploaded to a specified Box folder.
4. The file becomes available in Box for collaboration and storage.

The action supports files up to 25 MB and includes built-in retry handling
for rate limits.

## Create a flow using Push File to Box

<Steps>
  <Step title="Create or open the flow">
    1. In Salesforce, navigate to **Setup → Flows**.
    2. Click **New Flow**.
    3. Choose a flow type:
       * **Record-Triggered Flow** (recommended for automation).
       * **Screen Flow** (for user-driven uploads).
  </Step>

  <Step title="Add the Push File to Box action">
    1. In Flow Builder, click **+ Add Element**.
    2. Select **Action**.
    3. Search for **Push File to Box** and select the action.
  </Step>

  <Step title="Configure input parameters">
    Provide the required inputs:

    | Parameter            | Required | Description                                                                 |
    | -------------------- | -------- | --------------------------------------------------------------------------- |
    | `Content Version ID` | Yes      | The ID of the Salesforce file (`ContentVersion`) you want to upload.        |
    | `Box Folder ID`      | Yes      | The numeric ID of the destination folder in Box (for example, `987654321`). |
    | `File Name`          | No       | Override the default file name if needed.                                   |
  </Step>

  <Step title="Connect the flow">
    1. Connect the action to your flow logic.
    2. Make sure the flow retrieves or stores the `ContentVersionId` before
       this step.
    3. Save and activate the flow.
  </Step>
</Steps>

## Example use case

A common implementation looks like this:

1. A user uploads a file to a Salesforce record.
2. A record-triggered flow runs.
3. The flow retrieves the file's `ContentVersionId`.
4. The **Push File to Box** action uploads the file to the corresponding
   Box folder.

This ensures all files related to Salesforce records are automatically stored
in Box.

## FAQs

<AccordionGroup>
  <Accordion title="Is there a file size limit for uploads?">
    Yes. Files larger than 25 MB are not supported and will fail to upload.
  </Accordion>

  <Accordion title="What happens if the Box OAuth token is invalid or expired?">
    If the admin OAuth token is missing or expired, the action returns
    nothing. Make sure the Box connection is active and validate results
    using `isSuccess` and `errorMessage` after the action with a **Decision**
    element.
  </Accordion>

  <Accordion title="In what format should the Box Folder ID be?">
    Use the numeric Box folder ID (for example, `987654321`). Using a
    Salesforce record ID or a folder name causes the action to fail.
  </Accordion>

  <Accordion title="Why do I get permission-related errors when uploading files?">
    The action runs under the Box admin (service account). That user must
    have access to the destination folder in Box. If access is missing, the
    upload fails.
  </Accordion>
</AccordionGroup>

[sf-install]: https://support.box.com/hc/en-us/articles/360044195713-Installing-Box-For-Salesforce

[sf-connected-app]: https://support.box.com/hc/en-us/articles/50000961566611-Using-Box-Sign-Sync-in-Salesforce

<RelatedLinks
  title="RELATED GUIDES"
  items={[
{ label: translate("Flow Actions"), href: "/guides/tooling/salesforce-toolkit/flow-actions", badge: "GUIDE" },
{ label: translate("Install Salesforce SDK"), href: "/guides/tooling/sdks/salesforce", badge: "GUIDE" }
]}
/>
