Skip to main content

Add Rows to an Excel Worksheet in n8n

Add Rows is a PDF4me node action in n8n that writes JSON records into an Excel worksheet. Use it to push API results into a report, log webhook payloads to a shared workbook, or append CRM exports to a tracking sheet, with numbers and dates landing as real Excel values rather than text.

What this node does

PDF4me Excel: Add Rows takes an existing .xlsx workbook plus a JSON array in JSON Row Data, and writes one row per object. It has two placement modes: name a table in Target Excel Table and keys are matched to headers, or leave it blank and Insert From Row plus Insert From Column set the exact starting cell. It edits a workbook you supply rather than creating one from scratch.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog →

Authenticating Your API Request​

Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one that holds your PDF4me API key so the workflow can authenticate spreadsheet requests securely.

Important Facts You Should Not Miss​

Target Excel Table decides the mode
Filling it in switches the node to header matching. Leaving it blank switches to coordinate placement. Everything else about how rows land follows from that one field.
The JSON must be flat
Each object becomes a row and each key becomes a column. A nested object or array has no single cell to occupy, so flatten the payload before it reaches this node.
Coordinate mode can overwrite
Insert From Row and Insert From Column both default to 1, which is the top-left cell. Point them at an empty region unless you intend to replace what is already there.
The PDF4me Excel node in n8n with Operation set to Add Rows, Excel File Input Method set to From Previous Node, a JSON array in JSON Row Data, Insert From Row and Insert From Column set to 1, and Convert Numeric and Date Values toggled on

JSON Row Data holds a JSON array of flat objects. Target Excel Table is empty here, so Insert From Row and Insert From Column place the data at cell A1.

Table Mode vs Coordinate Mode​

QuestionTable modeCoordinate mode
How you switch to itName a table in Target Excel TableLeave Target Excel Table blank
How columns are matchedJSON keys matched against table headersValues written in key order from the start cell
Does column order matterNo, headers drive placementYes, position drives placement
Which fields control itTarget Excel Table and Excel Row NumberInsert From Row and Insert From Column
Best forStructured sheets that already have a tableBlank sheets or a fixed reporting layout
Overwrite riskLower, rows follow the table structureHigher, the start cell is written to directly

What Parameters Does Add Rows Need?​

ParameterRequiredWhat it doesExample
Credential to connect withRequiredThe PDF4me API credential the node authenticates with.PDF4me API
OperationRequiredThe action this node performs. Select Add Rows.Add Rows
Excel File Input MethodRequiredHow the workbook reaches the node: from the previous node as binary data, as a Base64 string, or from a URL.From Previous Node (Binary Data)
Binary Data Property NameConditionalName of the binary property holding the .xlsx. Appears when the workbook comes from the previous node.data
Worksheet NameRequiredSheet the rows are written to. Match the sheet tab name exactly.Sheet1
JSON Row DataRequiredJSON array of flat objects. Each object becomes one row and each key maps to a column.[{"Date":"2024-01-15","Amount":1500.00}]
Insert From RowConditionalRow number the data starts at, counting from 1. Used in coordinate mode when no table is named.1
Insert From ColumnConditionalColumn number the data starts at, counting from 1 for column A. Used in coordinate mode.1
Target Excel TableOptionalName of an existing table to write into. Filling this in switches the node to header matching instead of coordinates.Table1
Excel Row NumberConditionalRow index inside the named table where insertion begins. Used in table mode.1
Convert Numeric and Date ValuesOptionalToggle that turns numeric and date strings into real Excel values rather than text. Ships enabled.enabled
Date Format PatternOptionalPattern applied to converted dates. Match it to the shape of the dates in your JSON.yyyy-MM-dd
Numeric Format PatternOptionalFormat applied to converted numbers, such as two decimal places.N2
Skip JSON Property NamesOptionalToggle that omits the JSON keys, writing only values. Ships disabled so headers are included.disabled
Skip Null ValuesOptionalToggle that leaves cells untouched where a JSON value is null instead of clearing them. Ships disabled.disabled
Culture and Language SettingsOptionalCulture code used when parsing numbers and dates, which decides separator handling.en-US
Output File NameOptionalFilename of the returned workbook. Keep a valid Excel extension.excel_with_rows.xlsx

Output​

FieldTypeWhat it contains
fileNameStringName of the returned workbook after the rows were written.
fileSizeNumberSize of the returned workbook in bytes.
successBooleanWhether the insertion completed. Branch on this so failures surface as alerts.
originalFileNameStringName of the input workbook as supplied to the node.
worksheetNameStringThe worksheet the rows were written to.
rowsAddedNumberHow many rows were inserted. The most useful verification signal the node returns.
insertFromRowNumberStarting row used, echoed back when running in coordinate mode.
insertFromColumnNumberStarting column used, echoed back when running in coordinate mode.
tableNameStringThe table written into, or null when coordinate mode was used.
excelRowNumberNumberRow index inside the table where insertion began, in table mode.
convertNumericAndDateBooleanWhether numeric and date conversion was applied.
dateFormatStringThe date pattern applied during conversion.
numericFormatStringThe numeric format applied during conversion.
cultureNameStringThe culture code used to parse numbers and dates.
messageStringHuman-readable summary, including the row count and worksheet name.

The updated workbook itself is returned as binary data, ready to write to storage, attach to an email, or pass into a further Excel step.

How Do I Set Up Add Rows in n8n?​

  1. Add the PDF4me Excel node to your workflow and set Operation to Add Rows.
  2. Select your PDF4me credential, or create one and paste your API key.
  3. Pick an Excel File Input Method and supply the workbook through the field that appears beneath it.
  4. Set Worksheet Name to the exact sheet tab you are writing to.
  5. Put a JSON array of flat objects into JSON Row Data, one object per row.
  6. To use table mode, enter the table name in Target Excel Table and set Excel Row Number. To use coordinates, leave the table blank and set Insert From Row and Insert From Column.
  7. Leave Convert Numeric and Date Values enabled, then set Date Format Pattern, Numeric Format Pattern, and Culture and Language Settings to match your data.
  8. Set Output File Name, execute the node, and check rowsAdded in the response before routing the workbook onward.

Typical Setups​

Workflow ExamplesCommon n8n workflow patterns using Add Rows.
Log webhook payloads to a workbook
  1. A webhook receives a form submission as JSON.
  2. Add Rows appends it to a named table in a shared workbook.
  3. The team reads the sheet without anyone re-keying the data.
Push API results into a report
  1. A scheduled HTTP request pulls records from an internal API.
  2. A Code node flattens the response into a plain array.
  3. Add Rows writes it into the reporting template at fixed coordinates.
Append a nightly CRM export
  1. A nightly job fetches new opportunities as JSON.
  2. Table mode matches the keys to the existing headers.
  3. Column order changes in the source do not break the sheet.
Verify the write before distributing
  1. Add Rows returns rowsAdded alongside the workbook.
  2. An IF node compares it to the length of the input array.
  3. A mismatch raises an alert instead of shipping a short report.

Practical Tips​

Flatten the JSON first
A Set or Code node that removes nesting is cheaper than debugging why a column arrived empty or full of object text.
Prefer table mode when a table exists
Header matching survives column reordering in the source system, which fixed coordinates cannot.
Check rowsAdded, not just success
A run can succeed while inserting fewer rows than you sent. Comparing the count to your array length catches silent shortfalls.
Match culture to the data, not the reader
Culture drives how decimal and thousands separators are parsed. Set it to the format the JSON arrives in.
Point coordinates at empty cells
Insert From Row and Insert From Column both default to 1, so an unchanged run writes over the top-left of the sheet.
Keep a template workbook
This action edits an existing file. Storing a clean template that the workflow copies each run avoids gradual drift.

Cheat Sheet​

FieldValue
OperationAdd Rows
Excel File Input MethodFrom Previous Node (Binary Data)
Binary Data Property Namedata
Worksheet NameSheet1
JSON Row Data[{"Date":"2024-01-15","Amount":1500.00}]
Insert From Row / Column1 / 1
Target Excel TableTable1
Excel Row Number1
Convert Numeric and Date Valuesenabled
Date Format Patternyyyy-MM-dd
Numeric Format PatternN2
Culture and Language Settingsen-US
Output File Nameexcel_with_rows.xlsx

Common Questions​

What JSON format does Add Rows expect?+
A JSON array of flat objects, where each object is one row and each key is a column. Nested objects and arrays have no natural cell to land in, so flatten the structure first, for example with an n8n Code node. The array shape itself follows the ordinary JSON data model.
What is the difference between table mode and coordinate mode?+
Naming a table in Target Excel Table puts the node in table mode, where JSON keys are matched against the table headers so column order in your data does not matter. Leaving it blank uses coordinate mode, where Insert From Row and Insert From Column decide the exact starting cell and values are written in key order.
Why did my numbers and dates arrive as text?+
That happens when Convert Numeric and Date Values is turned off, or when the culture does not match the incoming data. The toggle ships enabled, and Date Format Pattern, Numeric Format Pattern, and Culture and Language Settings control how the strings are parsed and formatted on the way in.
Does Add Rows overwrite existing data?+
In coordinate mode the node writes starting at the row and column you name, so pointing it at occupied cells replaces what is there. Target an empty region, or use table mode so rows follow the table structure rather than a fixed address.
Can I add rows to several sheets in one run?+
Not in a single execution, because Worksheet Name takes one sheet. Chain a second Add Rows node fed by the first node output, or loop the workbook through the node once per sheet, so each pass writes to its own worksheet.

Same Task on Other Platforms​

Get Help​