Use Create Workbook to create a new .xlsx workbook in a OneDrive for Business or SharePoint document-library folder. You can name the initial worksheet and choose whether an existing file with the same name is replaced.
Step Library: Microsoft Excel > Workbook
When to use this step
Use this step when you want to:
- create a new, empty Excel workbook in a selected Microsoft 365 folder;
- choose the destination through the folder picker, an Object variable, or drive and folder IDs;
- optionally give the first worksheet a specific name; or
- explicitly control whether an existing file with the same name is preserved or replaced.
Common examples include:
- creating a workbook for a monthly report before adding worksheets and data;
- preparing a new workbook for a case, project, or customer; or
- creating a workbook and passing its reference to later Microsoft Excel steps.
Use Create Worksheet instead when you want to add a worksheet to an existing workbook.
Before you begin
- Create or select a Microsoft Excel connection that uses a Microsoft work or school account. The connection requires delegated
Files.ReadWritepermission. - Ensure the connected account can write to the destination OneDrive for Business or SharePoint folder.
- If you enable Overwrite existing file, use a destination where replacing an existing workbook is safe.
Configure the step
- Add Create Workbook from Microsoft Excel > Workbook.
- Select the step to open its configuration panel.
- Select the Microsoft Excel Connection.
- In Destination source, select Microsoft 365 folder or Drive and folder IDs, then configure the displayed destination settings.
- Enter the
.xlsxFile name. - Optional: Enter an Initial worksheet name. When omitted, the worksheet is named
Sheet1. - Keep Overwrite existing file disabled to protect an existing file, or enable it only when replacing that file is intended.
- Save or publish the workflow.
Settings
| Setting | Required | Accepted values | Visible when | Description |
|---|---|---|---|---|
| Connection | Yes | Microsoft Excel connection | Always | Connection used to access Microsoft Graph. There is no default. The connection must be available to the workflow, remain authorized, and have write access to the destination. |
| Destination source | Yes | Microsoft 365 folder or Drive and folder IDs | Always | Selects how the destination folder is identified. The default is Microsoft 365 folder. |
| Destination folder | Yes | Selected Microsoft 365 folder or an Object variable with schema @microsoft/drive-item-reference@v1 | Destination source = Microsoft 365 folder | Supplies the destination drive and folder identity. There is no default folder. At runtime, the selected value or variable must resolve to a valid folder that the connection can access. |
| Drive ID | Yes | Fixed Text or Text variable | Destination source = Drive and folder IDs | Identifies the OneDrive for Business or SharePoint drive. There is no default. The resolved value must not be empty. |
| Parent folder ID | Yes | Fixed Text or Text variable | Destination source = Drive and folder IDs | Identifies the destination folder within the selected drive. There is no default. The resolved value must not be empty. |
| File name | Yes | Fixed Text or Text variable | Always | Name of the new workbook. There is no default. The resolved name must be at most 255 characters, have no surrounding whitespace, and end in .xlsx. Double quotes, asterisks, colons, angle brackets, question marks, slashes, backslashes, vertical bars, and square brackets are not supported. The name must not start with ~$ or use a reserved system or device name such as .lock, desktop.ini, CON, PRN, AUX, NUL, COM0–COM9, or LPT0–LPT9. |
| Initial worksheet name | No | Fixed Text or Text variable | Always | Name of the workbook's first worksheet. When omitted, the default is Sheet1. The resolved name must contain 1–31 characters, contain none of \ / ? * : [ ], not begin or end with an apostrophe, and not equal the reserved name History (case-insensitive). |
| Overwrite existing file | Yes | Fixed Boolean or Boolean variable | Always | Controls the provider conflict behavior. The default is false. When false, an existing file with the same name causes the step to fail without replacing it. When true, the existing file is replaced and its previous workbook contents are lost. |
Data and outputs
Workflow variable effects
This step does not modify workflow variables.
Step outputs
| Step output | Type | Available when | Scope | Description |
|---|---|---|---|---|
| Workbook | Object — Microsoft Excel Workbook (microsoft-excel/workbook@1) | After successful completion | Following steps in the current workflow context until the execution path ends | Reference to the created workbook. It contains Drive ID, Item ID, Name, and Web URL. No output is exposed when creation or provider-response validation fails. |
Workbook object
| Property | Type | Description |
|---|---|---|
| Drive ID | Text | Microsoft 365 drive that contains the created workbook. |
| Item ID | Text | Stable Microsoft 365 item ID of the created workbook. |
| Name | Text | File name returned by Microsoft Graph. |
| Web URL | Text | Browser URL returned for the created workbook. |
Runtime behavior
Execution and completion
When the step runs, Flowifier:
- Resolves the selected connection and destination values.
- Resolves File name, optional Initial worksheet name, and Overwrite existing file, including any referenced variables.
- Validates the resolved values.
- Builds a minimal
.xlsxworkbook containing one empty worksheet. The worksheet uses Initial worksheet name, orSheet1when no name is set. - Uploads the workbook to the destination folder. With Overwrite existing file disabled, the upload uses fail-on-conflict behavior. With it enabled, the upload uses replace-on-conflict behavior.
- Validates the Microsoft Graph response, exposes Workbook, and completes the step.
Workbook creation is an externally visible side effect. Replacing a workbook is destructive and is not rolled back if a later workflow step fails.
Branches and child steps
This step does not have branches or child steps.
Failure, retry and resume behavior
This step does not suspend execution or perform automatic retries. It has no resume point.
If validation, authentication, permission, provider, or response validation fails, the step fails and the workflow does not continue along its normal execution path. The instance activity displays a safe, actionable error without exposing Microsoft Graph request details or resource identifiers.
Because workbook creation is a mutation, Flowifier does not automatically retry throttled, timed-out, or unavailable-provider responses. If the connection is interrupted after Microsoft Graph receives the upload, or Graph returns an invalid response after creating the file, the result is reported as unknown. The workbook might already exist even though the step failed. Check the destination before retrying.
Cancellation or termination does not remove a workbook that Microsoft Graph has already created or restore a workbook that was replaced.
Errors and limits
| Situation | Result | Resolution |
|---|---|---|
| A required fixed setting is missing | Designer validation reports the affected setting and prevents a valid publish. | Complete Connection, the destination settings, and File name. |
| A fixed File name is invalid | Designer validation reports that a valid .xlsx file name is required. | Use a name that follows the length, extension, whitespace, character, and reserved-name rules in the settings table. |
| A fixed Initial worksheet name is invalid | Designer validation reports that a valid worksheet name is required. | Use 1–31 supported characters, remove leading or trailing apostrophes, and do not use History. |
| A Text, Boolean, or Object variable is missing, has the wrong type, or resolves to an invalid value | The step fails before uploading the workbook and reports a field-specific runtime validation error. | Ensure each variable exists, has the compatible type or object schema, and resolves to a value accepted by its setting. |
A file with the same name exists and Overwrite existing file is false | The provider reports a conflict. The existing file is preserved and the step fails. | Use another file name or enable overwrite only when replacing the existing workbook is intended. |
A file with the same name exists and Overwrite existing file is true | Microsoft Graph replaces the existing file with the new one-sheet workbook. Previous workbook data and formatting are lost. | Confirm that the existing workbook can be replaced, or use a different name or destination. |
| The connection is unavailable, expired, or lacks permission | The step fails without exposing connection credentials or provider details. | Reconnect Microsoft Excel, grant the required permission, confirm workflow access to the connection, and verify write access to the destination. |
| Microsoft Graph throttles or cannot complete the upload | The step fails without an automatic retry. For some network, timeout, server, or response failures, the outcome is reported as unknown. | Check the destination first. If no workbook was created or replaced, wait if necessary and start a new execution. |
| Microsoft Graph creates the workbook but returns an invalid response | The step fails with an unknown outcome and does not expose Workbook. The file may nevertheless exist. | Check the destination and inspect the created file before deciding whether to retry. |
Example
Create a monthly report workbook
Goal: Create a new workbook for a monthly report and make its reference available to following Excel steps.
Configuration:
- Connection:
Finance Microsoft Excel - Destination source:
Microsoft 365 folder - Destination folder:
Finance / Monthly reports - File name:
November 2026 report.xlsx - Initial worksheet name:
Summary - Overwrite existing file:
false
Result: Flowifier creates November 2026 report.xlsx with one empty worksheet named Summary. The Workbook output identifies the new file and can be selected by following Microsoft Excel steps. If the file already exists, the step fails and preserves it.
Related information
- Create Worksheet — add a worksheet to an existing workbook.
- List Worksheets — retrieve the worksheets in an existing workbook.
- Microsoft Excel connections — connect a Microsoft work or school account and authorize workbook access.
- Workflow variables — supply dynamic names, destination identities, and overwrite behavior.
Comments
0 comments
Please sign in to leave a comment.