Rotate Image using n8n action
PDF4me Rotate Image rotates images with precise angle control through n8n automation workflows. Process images via n8n triggers, binary data, base64 strings, or public URLs to rotate at any angle (0-360 degrees, clockwise/counterclockwise) with background color customization, proportionate resizing options, quality preservation, and flexible rotation settings. This solution is ideal for orientation correction, photo editing, image standardization, content preparation, angle adjustments, and automated image rotation workflows that require accurate rotation with preserved quality and seamless integration.
Setup
Add the PDF4me "Rotate Image" 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 "Rotate Image" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Rotate Image action. Configure these parameters to control image rotation.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Credential to connect with | String | Yes | PDF4me authentication configuration - Select your PDF4me account credentials for API access. Choose from existing configured credentials or create new ones through the n8n credential management system |
| Action | String | Yes | PDF4me operation selection - Choose the specific PDF4me action to perform. This parameter determines which processing operation will be executed on your images |
| Input Data Type | String | Yes | PDF4me image input format selection Choose the format of your source image data input. PDF4me supports multiple input types with different field requirements |
| 1) Binary Data | Yes (One Required) | 1) Binary Data - Use "Input Binary Field" to reference image file from previous node | |
| 2) Base64 String | Yes (One Required) | 2) Base64 String - Use "Base64 Image Content" field for encoded image data | |
| 3) URL | Yes (One Required) | 3) URL - Use "Image URL" field to provide a public/open permission URL to the image file | |
| Input Binary Field | Binary | Yes (If Binary Data) | PDF4me binary image file input - Reference source image file (.jpg, .png, .gif, .bmp) from previous n8n node or file upload. PDF4me processes binary image files with automatic format detection and validation. Required when Input Data Type is "Binary Data" |
| Base64 Image Content | String | Yes (If Base64 String) | PDF4me base64 encoded image input - Provide source image data (.jpg, .png, .gif, .bmp) as base64 encoded string for secure transmission. PDF4me automatically decodes and processes the image content. Required when Input Data Type is "Base64 String" |
| Image URL | String | Yes (If URL) | PDF4me public image URL input - Provide a public/open permission URL to the source image file (.jpg, .png, .gif, .bmp) to be processed for rotation. PDF4me downloads and processes the file from the provided URL. Required when Input Data Type is "URL" |
| Output File Name | String | Yes | PDF4me output filename configuration - Specify the name for the generated rotated image file with proper extension (.jpg, .png, .gif, .bmp). This is an input parameter that configures what the output file will be named. PDF4me ensures unique naming and validates file format compliance |
| Background Color | String | No | PDF4me background color specification - Define the background color for areas exposed during rotation using hex color codes (e.g., "#FFFFFF" for white, "#000000" for black). PDF4me automatically fills transparent areas with the specified color |
| Proportionate Resize | Boolean | Yes | PDF4me proportional scaling control - Enable to maintain proportional dimensions during rotation, preventing image distortion. When enabled, PDF4me automatically adjusts dimensions to preserve aspect ratio |
| Rotation Angle | Number | Yes | PDF4me rotation angle specification - Define the rotation angle in degrees (0-360). Positive values rotate clockwise, negative values rotate counterclockwise. PDF4me supports precise angle control with quality preservation during rotation |
| Async | Boolean | No | PDF4me asynchronous processing - Enable asynchronous processing for large images or when processing time is not critical. When enabled, the operation runs in the background and returns immediately |
| Binary Data Output Name | String | Yes | PDF4me output variable configuration - Define the variable name for accessing the generated rotated image binary data in your n8n workflow. This binary data can be used as input data in subsequent actions within your workflow |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | PDF4me image rotation status indicator - Boolean flag indicating the success or failure of the image rotation process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflows | true |
| message | String | PDF4me rotation status message - Human-readable status message providing details about the image rotation process result. Includes success confirmation or error details for troubleshooting | Image rotated successfully |
| fileName | String | PDF4me generated image filename - The complete filename of the successfully generated rotated image file with proper extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processes | rotate_image_output.png |
| mimeType | String | PDF4me output MIME type - MIME type of the generated image file (e.g., "image/jpeg", "image/png"). Useful for content type validation and proper file handling in web applications | image/png |
| fileSize | Number | PDF4me processed image file size in bytes - The exact size of the generated rotated image file in bytes, provided by PDF4me for storage planning and file transfer monitoring | 3350 |
| rotationAngle | Number | PDF4me applied rotation angle - The actual rotation angle that was applied to the image in degrees. Useful for tracking and verification of the rotation operation | 90 |
N8N Action Response
The PDF4me Rotate Image 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:
[
{
"success": true,
"message": "Image rotated successfully",
"fileName": "rotate_image_output.webp",
"mimeType": "image/png",
"fileSize": 3350,
"rotationAngle": 90
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| message | Image rotated successfully |
| fileName | rotate_image_output.png |
| mimeType | image/png |
| fileSize | 3350 |
| rotationAngle | 90 |
Schema View
The data structure and types of the response:
1 item
success: ☑ true
message: AB Image rotated successfully
fileName: AB rotate_image_output.png
mimeType: AB image/png
fileSize: # 3350
rotationAngle: # 90
Type Indicators:
AB= String#= Number☑= Boolean
Binary Data View
The actual processed image file and information:
data
─────────────────────────────
File Name: rotate_image_output.png
File Extension: png
Mime Type: image/png
File Size: 3,350 bytes
Rotation Angle: 90°
Background Color: #FFFFFF
Proportionate Resize: Enabled
Quality: Preserved
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
Photography and Image Orientation Correction
- Automatically correct orientation issues from mobile devices and digital cameras that capture images in incorrect orientations
- Process batch uploads of user-generated content to ensure consistent orientation across photo galleries and portfolios
- Standardize image orientations for professional photography workflows and client deliverables
Document Processing and Digital Asset Management
- Rotate scanned documents and images to proper reading orientation for OCR processing and archival systems
- Automate the correction of misoriented images in bulk document processing workflows for improved readability
- Standardize image orientations in content management systems and digital asset libraries for consistent presentation
Web Content and Social Media Optimization
- Automatically orient images for optimal display across different platforms and device orientations
- Process user-uploaded images for social media platforms that have specific orientation requirements
- Create standardized image orientations for responsive web design and mobile application interfaces