Skip to main content

Populate an Excel Template from JSON in Power Automate: A 4-Step Dropbox Workflow with Aspose Smart Markers

· 17 min read
SEO and Content Writer

Drop an Excel template that uses Aspose Smart Markers (cells written like &=RootData.Items.ItemName) into Dropbox, paste a matching JSON payload into a Power Automate flow, and the populated workbook lands back in Dropbox with totals already calculated. This guide walks through the exact four-action flow shown in the screenshots: Manual trigger, Dropbox Get file content using path, PDF4me Excel - Populate, and Dropbox Create file. Every field value comes from a real run; the input template, JSON payload, and output workbook are all linked at the end.

The flow at a glance
1. Manual trigger
Manually trigger a flow. Replace with any trigger later.
2. Get file content (path)
Dropbox path: /pdf4metest/excel/populate excel/aspose template.xlsx
3. Excel - Populate
PDF4me action. JSON Data with RootData.Items array. Worksheet Indexes: 1 (Invoice sheet).
4. Create file
Dropbox /pdf4metest/excel/populate excel/output, name Excel_populate.xlsx.
The short version

A manual trigger starts the flow. Dropbox Get file content using path reads aspose template.xlsx (the workbook contains a real Excel Table named SimpleInvoice with cells like &=RootData.Items.ItemName in row 2). PDF4me Excel - Populate merges the JSON payload (3 records: Laptop, Mouse's, Keyboard) into Worksheet Index 1 with formulas recalculated. Dropbox Create file writes Excel_populate.xlsx (Invoice Subtotal $1,635.00, Sales Tax $98.10, TOTAL $1,585.00) back into /output.

The two things that decide whether your output is correct

First, the JSON Data top-level keys must match the data-source names used in the cell markers. Markers like &=RootData.Items.ItemName require the JSON to wrap the records under RootData.Items[]. Field names are case sensitive. Second, the Worksheet Indexes field is 1-based, comma-separated. The template ships with three sheets (Invoice, Sheet1, Sheet2). Pass 1 to populate only the rich Invoice sheet shown in this guide.

What you are building

A four-action Power Automate flow that converts a designed Excel template plus a JSON payload into a fully populated workbook with live formulas. The same pattern works for invoices, inventory reports, payroll summaries, sales recaps, and any other Excel deliverable where the structure stays the same but the rows change every run.

Power Automate flow with four actions: Manually trigger a flow, Dropbox Get file content using path, PDF4me Excel - Populate, Dropbox Create file. Each action shows the run duration (0s, 1s, 0.7s, 1s) and a green checkmark.
The complete flow runs in under 3 seconds end-to-end.

What you need

  • Power Automate account with a flow open in the cloud designer.
  • PDF4me API key. Get your API key. Add the PDF4me Connect connection the first time you drop the action.
  • Dropbox with two folders ready: one for the template, one for the output. (Any storage works: SharePoint Get file content, OneDrive Get file content, and Dataverse Download file all map the same way.)
  • An Excel template using Aspose Smart Markers. Download template.xlsx (also referenced as aspose template.xlsx in the screenshots) to follow along exactly.
  • JSON sample data. Download sheet1-data.json (the nested RootData.Items payload used in the run).

A tour of the input template

Before you build the flow, it helps to see what Smart Markers actually look like inside the Excel file. Open the Invoice sheet of template.xlsx. Row 1 is the header. Row 2 contains the markers (one per column). Rows 3 to 6 are pre-formatted empty rows. Below that sits a totals block with a SimpleInvoice Excel Table aggregation.

Excel Invoice sheet. Header row (1) contains Item Name, Description, Qty, Unit price, Discount, Price. Row 2 contains the Smart Marker cells: &=RootData.Items.ItemName, &=RootData.Items.Description, &=RootData.Items.Qty, &=RootData.Items.UnitPrice, &=RootData.Items.Discount, &=RootData.Items.Price. Below the data block, an Invoice Subtotal $0.00, Tax Rate 6.00%, Sales Tax $0.00, Deposit Received $50.00, TOTAL -$50.00 block.
The template before population. Markers in row 2; subtotal / tax / total formulas reference the SimpleInvoice Excel Table.

The six markers are:

CellMarker
B2&=RootData.Items.ItemName
C2&=RootData.Items.Description
D2&=RootData.Items.Qty
E2&=RootData.Items.UnitPrice
F2&=RootData.Items.Discount
G2&=RootData.Items.Price

The totals block uses structured references instead of plain A1 addresses:

G7 =SUM(SimpleInvoice[Price])
G9 =IFERROR(G7*G8,"")
G11 =SUM(G2:G4)-G10

When Excel - Populate expands the marker row from 1 record to 3, the SimpleInvoice table range automatically grows, and SUM(SimpleInvoice[Price]) keeps summing the right column. That is the entire reason this pattern beats writing per-row formulas manually.


Build the flow

Action 1: Manually trigger a flow

For testing, the manual trigger is fastest. In production, replace it with When a file is created (Dropbox), When an item is created or modified (SharePoint), Recurrence, or any event that gives you a fresh JSON payload.

Action 2: Dropbox - Get file content using path

Set File Path to the full Dropbox path of the template, including the filename:

/pdf4metest/excel/populate excel/aspose template.xlsx

Under Advanced parameters, Infer Content Type is set to Yes (the default).

Dropbox Get file content using path action. File Path is set to /pdf4metest/excel/populate excel/aspose template.xlsx. Advanced parameters Infer Content Type is Yes.
Dropbox Get file content using path with the exact File Path used in the run.

Action 3: PDF4me - Excel - Populate

This is where the merge happens. Search for PDF4me in the action picker, then pick Excel - Populate. Configure these fields:

FieldValue used in the run
File ContentFile Content from the previous Dropbox step (dynamic content)
JSON DataNested RootData.Items[] array with 3 records (Laptop, Mouse's, Keyboard)
File NamePopulate.xlsx
Worksheet Indexes1 (Invoice sheet)

The full JSON Data payload (copy-paste from sheet1-data.json):

{
"RootData": {
"Items": [
{ "ItemName": "Laptop", "Description": "Dell Inspiron 15", "Qty": 2, "UnitPrice": 750, "Discount": 50, "Price": 1450 },
{ "ItemName": "Mouse's", "Description": "Wireless Mouse", "Qty": 3, "UnitPrice": 25, "Discount": 0, "Price": 75 },
{ "ItemName": "Keyboard", "Description": "Mechanical Keyboard", "Qty": 1, "UnitPrice": 120, "Discount": 10, "Price": 110 }
]
}
}
PDF4me Excel - Populate action with File Content mapped from the prior Dropbox step. JSON Data text box holding the nested RootData.Items array with Laptop, Mouse's, Keyboard records. File Name Populate.xlsx. Worksheet Indexes 1.
Excel - Populate with the exact JSON Data block and Worksheet Indexes set to 1.

Expand Advanced parameters for the four optional controls. The defaults are usually correct, but the screenshots show what each value looks like in the UI:

Advanced parameters of Excel - Populate. Strict JSON Strings Yes. Culture and Language Settings en-US. Calculate Formulas Yes. Quote Prefix To Style Yes.
The four advanced settings used in the run.
Advanced fieldValueWhy this matters
Strict JSON StringsYesPreserves quoted string primitives (like "55") as text in cells. Set No to coerce them to numbers during merge.
Culture & Language Settingsen-USControls number, date, and currency formatting written into cells. Use fr-FR, de-DE, ja-JP, etc. for non-US locales.
Calculate FormulasYesRecalculates the workbook after population so totals are accurate at open. Set No to skip and recalc downstream.
Quote Prefix To StyleYesCarries Excel's quote-prefix onto styled values so account numbers and ZIPs stay text.

Action 4: Dropbox - Create file

The final step uploads the populated workbook back into Dropbox:

FieldValue
Folder Path/pdf4metest/excel/populate excel/output
File NameExcel_populate.xlsx
File ContentOutput File Content (dynamic content from Excel - Populate)
Dropbox Create file action. Folder Path /pdf4metest/excel/populate excel/output. File Name Excel_populate.xlsx. File Content mapped from Excel - Populate.
Dropbox Create file with the populated workbook on the File Content slot.

That is the entire flow. Save and click Test.


The result

When you open Excel_populate.xlsx from the /output folder, the Invoice sheet now carries the three records on rows 2 to 4, and the totals block has computed live values from the SimpleInvoice table aggregation.

Populated Invoice sheet. Row 2: Laptop / Dell Inspiron 15 / 2 / 750 / $50.00 / $1,450.00. Row 3: Mouse's / Wireless Mouse / 3 / 25 / $0.00 / $75.00. Row 4: Keyboard / Mechanical Keyboard / 1 / 120 / $10.00 / $110.00. Invoice Subtotal $1,635.00, Tax Rate 6.00%, Sales Tax $98.10, Deposit Received $50.00, TOTAL $1,585.00.
The same workbook after the flow ran. Three records populated; subtotal, sales tax, and total computed live.

The exact numeric proof that formulas recalculated correctly:

CellFormulaResult
G7=SUM(SimpleInvoice[Price])$1,635.00 (1450 + 75 + 110)
G9=IFERROR(G7*G8,"") with G8 = 6.00%$98.10
G10Static 50$50.00 (Deposit Received)
G11=SUM(G2:G4)-G10$1,585.00 (1635 + 98.10 - 50 ≈ rounded display)

Download the actual output workbook produced by this run: output-excel-populate.xlsx.


Troubleshooting

A column comes out empty. Your JSON property name does not match the marker field name. Markers are case sensitive. &=RootData.Items.ItemName will NOT pick up itemName from the JSON.

The wrong sheet got populated. Check Worksheet Indexes. The value is 1-based (not 0-based). Pass 1 for the first sheet, 2 for the second, etc. Leave empty to populate every sheet.

Totals show $0.00 after the run. Calculate Formulas is set to No. Switch it to Yes.

Strings that look numeric got converted to numbers (or vice versa). Toggle Strict JSON Strings. Yes keeps quoted JSON primitives as text. No coerces them.

Decimal separators or date formats look wrong for your locale. Change Culture & Language Settings. en-US, fr-FR, de-DE, ja-JP, etc. are all valid.

The data lands but only fills the first row even when you sent multiple records. The marker was authored with the (noadd) modifier (&=RootData.Items.ItemName(noadd)). Remove the modifier so the engine inserts new rows.


When to use this pattern

  • Invoice generation from CRM line items. Pull lines from Dynamics, Salesforce, or HubSpot into a JSON Items array; render with a designed Excel invoice template.
  • Monthly inventory and sales reports. Recurrence trigger plus Dataverse List rows plus this flow gives you a polished Excel deliverable in minutes.
  • HR roster, payroll summary, expense reports. Anywhere a designed Excel layout meets fresh row data.
  • Excel deliverables a recipient will open and edit. Excel - Populate returns native .xlsx (not PDF), so recipients can sort, filter, and adjust formulas downstream.


FAQ

What is the difference between this and Generate Document Single?+
Excel - Populate is the right action when your deliverable is native .xlsx with live formulas and Excel Tables. Generate Document Single targets Word, HTML, or PDF templates and produces a Word, PDF, Excel, or HTML output (template engine is mustache-style, not Smart Markers). Choose based on whether the recipient will work with the file inside Excel or just consume the rendered output.
Does this work with SharePoint or OneDrive instead of Dropbox?+
Yes. Swap the Dropbox actions for SharePoint Get file content / Create file, or OneDrive Get file content / Create file. The Excel - Populate action and all its parameters are identical regardless of the storage source.
How big can the JSON Data payload be?+
Practical limits are bounded by the Power Automate action body size cap (about 100 MB on premium plans, smaller on standard) plus Excel cell limits. For larger payloads, write the JSON to a SharePoint or OneDrive file and reference it via a custom dispatcher pattern, or split the work into one call per sheet using Worksheet Indexes.
Can I populate multiple sheets in a single call?+
Yes. Leave Worksheet Indexes empty (populates every sheet) or pass a comma-separated list like 1,3. The JSON Data top-level keys must contain a data source for each sheet you want populated.
Does this work in Power Automate Desktop?+
PDF4me Connect is a cloud connector available in Power Automate (the web flow designer). For Power Automate Desktop, call the Excel Populate REST endpoint with the HTTP action.
Can I trigger this from email, SharePoint, or a webhook instead of manually?+
Yes. Replace the manual trigger with When a new email arrives (Outlook), When a file is created (Dropbox / SharePoint / OneDrive), When an HTTP request is received, or any other trigger that produces a fresh JSON payload. The remaining three actions stay identical.

Get started