Add Text Header/Footer to Excel using n8n action
PDF4me Add Text Header Footer to Excel enables adding customizable text headers and footers to Excel documents through n8n automation workflows. Process Excel files via n8n triggers, binary data, base64 strings, or public URLs to add document titles, page numbers, dates, branding, and custom text with full control over font styling (family, size, color, name), transparency levels, rotation angles, and orientation options (horizontal, vertical, diagonal, upside-down). This solution is ideal for document branding, professional presentation, corporate identity, and automated formatting workflows that require text headers and footers with comprehensive styling control and seamless integration.
Setup
Add the PDF4me "Add Text Header Footer" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites:
- PDF4me API credentials
- n8n workflow access
Configuration:
- Add PDF4me node to workflow
- Select "Add Text Header/Footer" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Add Text Header Footer action. Configure these parameters to control text formatting.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | Excel Input Format Selection • Choose the format of your Excel data input • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Input Binary Field*** | Binary | Binary Excel File Input (Required if Binary Data) • Reference Excel file (.xlsx, .xls) from previous n8n node or file upload • PDF4me processes binary Excel files with automatic format detection • Required when Input Data Type is "Binary Data" | {{ $binary.data }} |
| Base64 Excel Content*** | String | Base64 Encoded Excel Input (Required if Base64 String) • Provide Excel content (.xlsx, .xls) as base64 encoded string • PDF4me automatically decodes and processes the Excel content • Required when Input Data Type is "Base64 String" | UEsDBBQABgAI... |
| Excel URL*** | String | Public Excel URL Input (Required if URL) • Provide a public/open permission URL to the Excel file (.xlsx, .xls) • PDF4me downloads and processes the Excel file from the provided URL • Required when Input Data Type is "URL" | https://abc.com/data.xlsx |
| Excel Name*** | String | Excel Input Filename • Specify the name of the input Excel file with proper extension (.xlsx, .xls) • PDF4me uses this for format detection and processing optimization | data.xlsx |
| Watermark Text*** | String | Header/Footer Text Content • Text to be displayed as header or footer • Can include document title, dates, page numbers • Supports dynamic content from n8n expressions • Any alphanumeric characters and symbols | Confidential Report 2024 |
| Font Family | String | Font Family Name • Font family to use for text • Common families: Arial, Times New Roman, Calibri • Default: Arial if not specified • Used unless FontName overrides it | Arial |
| Font Size | Number | Text Size in Points • Font size of header/footer text • Standard range 8-72 points • Default: 72 if not specified • Larger values for better visibility | 12 |
| Font Color | String | Text Color • Hex color code (e.g., "#FF0000") or color name • Supports standard HTML color names • Determines text appearance • Default: black if not specified | #0000FF |
| Semi Transparent | Boolean | Transparency Level • True - Apply 50% opacity (semi-transparent) • False - Apply 100% opacity (fully opaque) • Default: false (fully opaque) • Useful for watermark-style headers | false |
| Rotation | Number | Rotation Angle in Degrees • Rotation angle for text (0-360 degrees) • Default: 0 (no rotation) • Clockwise rotation • Note: Orientation parameter takes priority if provided | 45 |
| Font Name | String | Specific Font Name • Specific font name to use • Overrides FontFamily if provided • Use for precise font control • Example: "Arial Bold", "Calibri Light" | Arial Bold |
| Orientation | String | Text Orientation • Horizontal - Standard left-to-right text • Vertical - Top-to-bottom vertical text • Diagonal - Diagonal text across page • Upside-Down - 180-degree rotated text • Takes priority over Rotation parameter | Horizontal |
| Culture Name | String | Culture Code • Culture/locale code for text rendering • Examples: "en-US", "de-DE", "fr-FR" • Ensures proper character rendering • Affects date/number formatting if applicable | en-US |
| Binary Data Output Name*** | String | Binary Data Output Mapping • Define the variable name for accessing generated Excel binary data • Used in subsequent workflow actions • Essential for workflow automation | document |
Note: The Orientation parameter takes priority over the Rotation parameter. If Orientation is specified, the Rotation value will be ignored.
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| fileName | String | Excel document filename with header/footer - The name of the output Excel document file after header/footer addition | excel_with_header_footer.xlsx |
| fileSize | Number | File size in bytes - The size of the Excel document in bytes after header/footer addition | 212749 |
| success | Boolean | PDF4me operation status - Boolean flag indicating the success or failure of the header/footer insertion process. PDF4me returns true for successful operations and false for any errors | true |
| originalFileName | String | Original Excel document filename - The name of the input Excel document file | myExcelFile.xlsx |
| headerLeft | String | Left header content - Text content displayed in the left section of the header | abc |
| headerCenter | String | Center header content - Text content displayed in the center section of the header | `` |
| headerRight | String | Right header content - Text content displayed in the right section of the header | `` |
| footerLeft | String | Left footer content - Text content displayed in the left section of the footer | `` |
| footerCenter | String | Center footer content - Text content displayed in the center section of the footer | `` |
| footerRight | String | Right footer content - Text content displayed in the right section of the footer | `` |
| worksheetName | String | Worksheet name - The name of the worksheet where header/footer was applied | Sheet1 |
| headerText | String | Header text - General header text content (if used) | `` |
| footerText | String | Footer text - General footer text content (if used) | `` |
| headerAlignment | String | Header alignment - Alignment of header text. Values: "left", "center", "right" | center |
| footerAlignment | String | Footer alignment - Alignment of footer text. Values: "left", "center", "right" | center |
| fontSize | Number | Font size in points - Font size used for header/footer text | 10 |
| fontColor | String | Font color - Color of the header/footer text in hex format | #000000 |
| applyToAllWorksheets | Boolean | Apply to all worksheets - Indicates whether header/footer was applied to all worksheets. true if applied to all, false if applied to specific worksheet only | false |
| message | String | Operation message - Descriptive message indicating the result of the header/footer addition operation | Header and footer added to Excel file successfully |
N8N Action Response
The PDF4me Add Text Header/Footer API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"fileName": "excel_with_header_footer.xlsx",
"fileSize": 212749,
"success": true,
"originalFileName": "myExcelFile.xlsx",
"headerLeft": "abc",
"headerCenter": "",
"headerRight": "",
"footerLeft": "",
"footerCenter": "",
"footerRight": "",
"worksheetName": "Sheet1",
"headerText": "",
"footerText": "",
"headerAlignment": "center",
"footerAlignment": "center",
"fontSize": 10,
"fontColor": "#000000",
"applyToAllWorksheets": false,
"message": "Header and footer added to Excel file successfully"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| fileName | excel_with_header_footer.xlsx |
| fileSize | 212749 |
| success | true |
| originalFileName | myExcelFile.xlsx |
| headerLeft | abc |
| headerCenter | "" |
| headerRight | "" |
| footerLeft | "" |
| footerCenter | "" |
| footerRight | "" |
| worksheetName | Sheet1 |
| headerText | "" |
| footerText | "" |
| headerAlignment | center |
| footerAlignment | center |
| fontSize | 10 |
| fontColor | #000000 |
| applyToAllWorksheets | false |
| message | Header and footer added to Excel file successfully |
Schema View
The data structure and types of the response:
1 item
fileName: T excel_with_header_footer.xlsx
fileSize: # 212749
success: ☑ true
originalFileName: T myExcelFile.xlsx
headerLeft: T abc
headerCenter: T ""
headerRight: T ""
footerLeft: T ""
footerCenter: T ""
footerRight: T ""
worksheetName: T Sheet1
headerText: T ""
footerText: T ""
headerAlignment: T center
footerAlignment: T center
fontSize: # 10
fontColor: T #000000
applyToAllWorksheets: ☑ false
message: T Header and footer added to Excel file successfully
Type Indicators:
T= String (Text)#= Number☑= Boolean[]= Array
Binary Data View
The actual Excel document file data and metadata:
data
─────────────────────────────
File Name: excel_with_header_footer.xlsx
File Extension: xlsx
Mime Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
File Size: 212.7 kB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
Use Cases
Document Branding and Professional Presentation
- Add company names, logos (as text), and branding elements to Excel reports
- Insert document titles, report names, and project identifiers in headers
- Apply corporate identity standards with consistent font and color styling
Automated Report Generation
- Add page numbers, dates, and generation timestamps to Excel reports
- Insert report metadata and version information in headers and footers
- Apply confidentiality notices and security labels to sensitive documents
Multi-Language and Localization
- Add headers and footers with proper character rendering for international documents
- Apply culture-specific formatting for dates and numbers in header/footer text
- Support multiple languages with appropriate font and character encoding