Skip to main content

Add Image Header or Footer to Excel in n8n

Add Image Header/Footer is a PDF4me Excel operation in n8n that inserts a logo or branding image into the header or footer of an .xlsx workbook, positioned left, center, or right, on one worksheet or every worksheet. Use it to apply consistent corporate branding to generated reports without opening Excel.

What this node does

PDF4me Excel: Add Image Header/Footer takes a source workbook and a separate image input, then places the image into the page header or footer at a chosen horizontal position, with configurable page margins. Target Worksheets applies the image to specific sheets by name, or to the whole workbook when left blank.

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 holding your PDF4me API key so the workflow can authenticate branding requests securely.

Important Facts You Should Not Miss

Two separate inputs: the workbook and the image
Excel File Input Method and Image Input Method are configured independently, each with its own Binary Data Property Name, so the logo can come from a different upstream node than the workbook itself.
One toggle picks header or footer, not both
Apply to Header or Footer places the image in one location per run. Placing a logo in the header and a different mark in the footer needs two node executions.
Margins default to Excel's standard 1.9 cm
Top, Bottom, Left, and Right Margin all default to 1.9 centimeters, matching Excel's out-of-the-box page margin, so most workbooks need no margin changes at all.
PDF4me Excel node in n8n set to Operation Add Image Header/Footer, Excel File Input Method and Image Input Method both From Previous Node (Binary Data), Binary Data Property Name data, Image Binary Data Property Name image, Apply to Header or Footer toggle on, Image Position Center, Target Worksheets Sheet1, Top Bottom Left Right Margin 1.9, Output File Name excel_with_image_header_footer.xlsx

PDF4me Excel Add Image Header/Footer parameters panel in n8n

What Parameters Does Add Image Header/Footer Need?

Required: Operation, Excel File Input Method, Image Input Method, the input fields matching both methods, and Output File Name. Apply to Header or Footer, Image Position, Target Worksheets, and the four margin fields all ship with working defaults.

ParameterRequiredWhat it doesExample
OperationRequiredSelects the PDF4me Excel action to run. Choose Add Image Header/Footer.Add Image Header/Footer
Excel File Input MethodRequiredHow the workbook reaches the node. From Previous Node (Binary Data) reads it from an upstream item; the dropdown also offers base64 and file URL alternatives.From Previous Node (Binary Data)
Binary Data Property NameConditionalName of the binary property on the incoming n8n item holding the .xlsx workbook. Applies when the input method is binary data. Defaults to data.data
Image Input MethodRequiredHow the image reaches the node, chosen independently of the workbook input. Supports Binary Data, Base64 String, or URL.From Previous Node (Binary Data)
Image Binary Data Property NameConditionalName of the binary property on the incoming n8n item holding the image file. Applies when Image Input Method is binary data.image
Apply to Header or FooterOptionalToggle that places the image in the header when on, or the footer when off. Default true (header).true
Image PositionOptionalHorizontal placement of the image. Left, Center, or Right. Default Center.Center
Target WorksheetsOptionalComma-separated worksheet names to apply the image to. Leave blank to apply it to every worksheet.Sheet1
Top MarginOptionalTop page margin in centimeters. Default 1.9.1.9
Bottom MarginOptionalBottom page margin in centimeters. Default 1.9.1.9
Left MarginOptionalLeft page margin in centimeters. Default 1.9.1.9
Right MarginOptionalRight page margin in centimeters. Default 1.9.1.9
Output File NameRequiredFilename for the branded workbook the node returns. Include the .xlsx extension.excel_with_image_header_footer.xlsx

Output Fields

A successful run returns one n8n item carrying JSON metadata plus the branded workbook as binary data.

FieldTypeWhat it contains
successBooleanTrue when the image was applied successfully. Use it to route error-handling branches.
fileNameStringFilename of the branded workbook, matching Output File Name.
fileSizeNumberSize of the returned workbook in bytes.
originalFileNameStringThe filename of the input workbook, echoed back for tracking.
isHeaderBooleanTrue when the image was placed in the header, false when placed in the footer.
positionStringHorizontal alignment applied to the image: Left, Center, or Right.
worksheetNamesArrayWorksheet names the image was applied to.
topMarginNumberTop page margin in centimeters, matching the Top Margin input.
bottomMarginNumberBottom page margin in centimeters, matching the Bottom Margin input.
leftMarginNumberLeft page margin in centimeters, matching the Left Margin input.
rightMarginNumberRight page margin in centimeters, matching the Right Margin input.
messageStringHuman-readable result message for the operation.
Binary (data)BinaryThe branded .xlsx workbook. Pass into Write Binary File, Email, or a cloud-storage upload.

N8N Action Response

JSON Response Format

[
{
"fileName": "excel_with_image_header_footer.xlsx",
"fileSize": 221849,
"success": true,
"originalFileName": "myExcelFile.xlsx",
"isHeader": true,
"position": "Center",
"worksheetNames": ["Sheet1"],
"topMargin": 1.9,
"bottomMargin": 1.9,
"leftMargin": 1.9,
"rightMargin": 1.9,
"message": "Image header/footer added to Excel file successfully"
}
]

How Do I Set Up Add Image Header/Footer in n8n?

  1. Add the PDF4me Excel node to your workflow and set Operation to Add Image Header/Footer.
  2. In Credential to connect with, select your PDF4me API credential or create one with your API key.
  3. Set Excel File Input Method and Binary Data Property Name for the source workbook.
  4. Set Image Input Method and Image Binary Data Property Name for the logo or picture.
  5. Switch Apply to Header or Footer on for a header image, or off for a footer image.
  6. Set Image Position to Left, Center, or Right.
  7. Set Target Worksheets, or leave it blank to apply the image everywhere, and adjust margins if needed.
  8. Set Output File Name ending in .xlsx, execute the node, and route the branded workbook onward.

Typical Setups

Workflow ExamplesCommon n8n workflow patterns using Add Image Header/Footer for Excel.
Company logo on every generated report
  1. A Schedule Trigger builds a weekly figures workbook.
  2. Add Image Header/Footer inserts the company logo with Apply to Header or Footer on, Image Position Right.
  3. The branded report is emailed to stakeholders.
Client co-branding on delivered deliverables
  1. A workflow pulls the client's logo URL from a CRM record.
  2. Image Input Method is set to URL so the logo loads directly from that record.
  3. The workbook is delivered with the client's own branding in the header.
Approval stamp in the footer
  1. An approval webhook fires once a manager signs off in an internal tool.
  2. Add Image Header/Footer runs with Apply to Header or Footer off, placing an approval graphic in the footer.
  3. The stamped workbook is archived to SharePoint.
Branding only the summary sheet
  1. A multi-sheet workbook carries raw data tabs plus a summary sheet.
  2. Target Worksheets is set to Summary so raw data tabs stay unbranded.
  3. The branded summary sheet is exported to PDF for distribution.

Practical Tips

Header and footer need separate runs
Apply to Header or Footer only picks one location per execution. Add a second node for the other placement.
Image and workbook inputs are independent
Image Input Method does not have to match Excel File Input Method. A logo can come from a public URL while the workbook comes from binary data.
Target Worksheets is comma-separated
List multiple sheet names like Sheet1,Summary to brand several sheets at once, or leave it blank for the whole workbook.
Margins are in centimeters, not inches
The 1.9 default matches Excel's standard margin in centimeters. Adjust with that unit in mind when nudging image placement.
Output File Name needs the .xlsx extension
Omitting it can leave downstream nodes unable to detect the format when writing or emailing the file.
Use a transparent PNG for a cleaner look
A transparent-background logo blends into the page better than a solid rectangle, especially over shaded header rows.

Cheat Sheet

FieldValue
OperationAdd Image Header/Footer
Excel File Input MethodFrom Previous Node (Binary Data)
Binary Data Property Namedata
Image Input MethodFrom Previous Node (Binary Data)
Image Binary Data Property Nameimage
Apply to Header or Footeron (header)
Image PositionCenter
Target WorksheetsSheet1 (blank for all)
Top / Bottom / Left / Right Margin1.9 cm each
Output File Nameexcel_with_image_header_footer.xlsx
CredentialsPDF4me API credential

Common Questions

Does the toggle add the image to the header or the footer?+
Apply to Header or Footer is a single toggle that switches placement between the two. Switched on, the image goes into the header; switched off, it goes into the footer. The response echoes the placement back as isHeader true or false.
What happens if Target Worksheets is left empty?+
The image is applied to every worksheet in the workbook. Entering one or more comma-separated sheet names restricts the image to those sheets only, and the response lists them back in worksheetNames.
Can I place a logo in the header and a different image in the footer?+
Yes, but not in one execution. Run the Add Image Header/Footer operation twice in the same workflow, once with Apply to Header or Footer switched on for the header image and once switched off for the footer image.
What units are the margin fields in?+
Top Margin, Bottom Margin, Left Margin, and Right Margin are all in centimeters and default to 1.9, matching Excel's standard page margin. Increase a margin to push the image further from the page edge.
Which image formats does Image Input Method accept?+
Common raster formats such as PNG, JPG, JPEG, and GIF are supported, supplied through Binary Data, a Base64 String, or a public URL, the same input pattern used throughout n8n's integrations for binary data.

Same Task on Other Platforms

Get Help