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.
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

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.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Operation | Required | Selects the PDF4me Excel action to run. Choose Add Image Header/Footer. | Add Image Header/Footer |
| Excel File Input Method | Required | How 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 Name | Conditional | Name 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 Method | Required | How 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 Name | Conditional | Name 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 Footer | Optional | Toggle that places the image in the header when on, or the footer when off. Default true (header). | true |
| Image Position | Optional | Horizontal placement of the image. Left, Center, or Right. Default Center. | Center |
| Target Worksheets | Optional | Comma-separated worksheet names to apply the image to. Leave blank to apply it to every worksheet. | Sheet1 |
| Top Margin | Optional | Top page margin in centimeters. Default 1.9. | 1.9 |
| Bottom Margin | Optional | Bottom page margin in centimeters. Default 1.9. | 1.9 |
| Left Margin | Optional | Left page margin in centimeters. Default 1.9. | 1.9 |
| Right Margin | Optional | Right page margin in centimeters. Default 1.9. | 1.9 |
| Output File Name | Required | Filename 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.
| Field | Type | What it contains |
|---|---|---|
success | Boolean | True when the image was applied successfully. Use it to route error-handling branches. |
fileName | String | Filename of the branded workbook, matching Output File Name. |
fileSize | Number | Size of the returned workbook in bytes. |
originalFileName | String | The filename of the input workbook, echoed back for tracking. |
isHeader | Boolean | True when the image was placed in the header, false when placed in the footer. |
position | String | Horizontal alignment applied to the image: Left, Center, or Right. |
worksheetNames | Array | Worksheet names the image was applied to. |
topMargin | Number | Top page margin in centimeters, matching the Top Margin input. |
bottomMargin | Number | Bottom page margin in centimeters, matching the Bottom Margin input. |
leftMargin | Number | Left page margin in centimeters, matching the Left Margin input. |
rightMargin | Number | Right page margin in centimeters, matching the Right Margin input. |
message | String | Human-readable result message for the operation. |
Binary (data) | Binary | The branded .xlsx workbook. Pass into Write Binary File, Email, or a cloud-storage upload. |
N8N Action Response
- JSON
- Schema
- Binary
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"
}
]
Schema View
1 item
fileName: T excel_with_image_header_footer.xlsx
fileSize: # 221849
success: true
originalFileName: T myExcelFile.xlsx
isHeader: true
position: T Center
worksheetNames: [] Array
[0]: T Sheet1
topMargin: # 1.9
bottomMargin: # 1.9
leftMargin: # 1.9
rightMargin: # 1.9
message: T Image header/footer added to Excel file successfully
Type Indicators: T = String, # = Number, [] = Array.
Binary Data View
data
File Name: excel_with_image_header_footer.xlsx
File Extension: xlsx
Mime Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
File Size: 221.8 kB
Binary Data Access: reach the workbook at $binary.data.data, ready for download, email, or storage.
How Do I Set Up Add Image Header/Footer in n8n?
- Add the PDF4me Excel node to your workflow and set Operation to Add Image Header/Footer.
- In Credential to connect with, select your PDF4me API credential or create one with your API key.
- Set Excel File Input Method and Binary Data Property Name for the source workbook.
- Set Image Input Method and Image Binary Data Property Name for the logo or picture.
- Switch Apply to Header or Footer on for a header image, or off for a footer image.
- Set Image Position to Left, Center, or Right.
- Set Target Worksheets, or leave it blank to apply the image everywhere, and adjust margins if needed.
- 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.
- A Schedule Trigger builds a weekly figures workbook.
- Add Image Header/Footer inserts the company logo with Apply to Header or Footer on, Image Position Right.
- The branded report is emailed to stakeholders.
- A workflow pulls the client's logo URL from a CRM record.
- Image Input Method is set to URL so the logo loads directly from that record.
- The workbook is delivered with the client's own branding in the header.
- An approval webhook fires once a manager signs off in an internal tool.
- Add Image Header/Footer runs with Apply to Header or Footer off, placing an approval graphic in the footer.
- The stamped workbook is archived to SharePoint.
- A multi-sheet workbook carries raw data tabs plus a summary sheet.
- Target Worksheets is set to Summary so raw data tabs stay unbranded.
- The branded summary sheet is exported to PDF for distribution.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Operation | Add Image Header/Footer |
| Excel File Input Method | From Previous Node (Binary Data) |
| Binary Data Property Name | data |
| Image Input Method | From Previous Node (Binary Data) |
| Image Binary Data Property Name | image |
| Apply to Header or Footer | on (header) |
| Image Position | Center |
| Target Worksheets | Sheet1 (blank for all) |
| Top / Bottom / Left / Right Margin | 1.9 cm each |
| Output File Name | excel_with_image_header_footer.xlsx |
| Credentials | PDF4me API credential |