Skip to main content
The Copy file business rule lets you copy documents uploaded in questions, generated by document generation rules, or stored in SharePoint document libraries, to SharePoint document libraries you define. The rule can be found in the Communications section of the Add rules panel in the Flow Designer. Copy file rule in the Flow Designer

Title

The first part of the business rule lets you define a title for your rule and select the event on which it operates. The default title is the standard FlowForma rule name; change it by deleting the text and entering your own. In the event field you determine when the rule is executed. For a flow this can occur when the form is loaded, started, or completed. For a step this can occur when the step is started, saved, or completed. For questions it can occur when the question is updated.

Rule condition(s)

The second part of the business rule lets you set conditions. These are not required, but if entered they control when the rule is executed in relation to other items in the form.

Rule actions

SharePoint document Url: used to select the link to the document that you want to copy. You can do this in two ways. Click the Editor button next to the SharePoint document Url text box to display the screen below, showing all the file upload questions and document generation rules contained in the flow. Select one of these items and the document uploaded or generated will be copied to the SharePoint destination folder defined below. Selecting a file upload question or document generation rule Alternatively, you can type or paste the Url of the document you want to copy directly into the text box. This must include the filename and extension. SharePoint destination folder: this is the SharePoint document folder that the file you selected above will be copied to. You can select this in a number of ways. The first option is to select the Folder server relative url radio button, then click the Select folder button to display the file picker below. The first column shows all the sites in the current site collection. When you select a site, the document folders contained in the site are displayed. Select the folder you require. SharePoint folder file picker The second option is to enter or paste the Url of the document folder you want to copy the files to directly into the text box. The third option is to select a question from the flow where the folder Url will be input. Select the Folder Url defined in a question radio button to open a drop-down list containing all the questions in the flow. Click the required step, then select the question you require from the questions displayed for that step. Selecting a question that defines the folder Url You can also use text tokens in the destination folder path, so the folder changes each time the rule runs. The available tokens are {FormID}, {StepID}, {FlowTitle}, {StepTitle}, {FormTitle}, {FlowFormaUrl}, {FlowFormaParentUrl}, and {FlowFormaSiteCollectionRoot}. Tokens only work when the document is stored in a folder on the FlowForma site. Copy and delete source file: by default the rule copies the file (the Copy file option). Select Copy and delete source file to move the file instead, deleting it from the source location after it has been copied. Overwrite existing file: by default, if a file with the same name and extension already exists, a new file is created (with bracketed numbers added to the end of the file name). To overwrite the original file so only the latest version is retained, check the Overwrite existing file checkbox.
  • Stop execution: if stop execution is enabled and this rule is executed, no other rules are executed.
  • Enabled: rules aren’t saved to a list like questions and steps are, so if you want to stop a rule executing without deleting it, toggle this option to enable or disable the rule.
  • Enable audit: if checked, a record is added to the audit trail when this rule is executed. This option is available when the Compliance feature pack is activated.
The Copy file rule is available on
  1. Flow started and Flow completed
  2. Step started, Step saved and Step completed.