AutomationFlowsWeb Scraping › Create PDF From Images for Free via Google Slides and Google Drive

Create PDF From Images for Free via Google Slides and Google Drive

ByNadia Privalikhina @nadiap on n8n.io

This n8n template offers a free and automated way to convert images from a Google Drive folder into a single PDF document. It uses Google Slides as an intermediary, allowing you to control the final PDF's page size and orientation.

Event trigger★★★★☆ complexity20 nodesGoogle DriveHTTP RequestGoogle Slides
Web Scraping Trigger: Event Nodes: 20 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #4540 — we link there as the canonical source.

This workflow follows the Google Drive → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "65d94bcc-e528-46a5-be6e-393a06ec620c",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -360,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "36d5034f-6d1a-4619-a009-f6e2e30ec7a5",
      "name": "Sort by Created Date",
      "type": "n8n-nodes-base.sort",
      "position": [
        1140,
        200
      ],
      "parameters": {
        "options": {},
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "createdTime"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bc3a71c4-e073-4ef0-b74e-62e6005ee3c7",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1360,
        200
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "5698ad5a-7635-423c-a63c-a1d5266551ea",
      "name": "Update Image Permissions",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1800,
        200
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Sort by Created Date').item.json.id }}"
        },
        "options": {},
        "operation": "share",
        "permissionsUi": {
          "permissionsValues": {
            "role": "reader",
            "type": "anyone"
          }
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "7862bbd3-2300-4dd5-9ad9-02c81d608f3d",
      "name": "Convert slides to PDF",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2020,
        0
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('CopyPdfTemplate').item.json.id }}"
        },
        "options": {
          "googleFileConversion": {
            "conversion": {
              "docsToFormat": "application/pdf",
              "slidesToFormat": "application/pdf"
            }
          }
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "07e69808-f221-4424-838c-e1d53ce7ca0c",
      "name": "Limit: 1Page",
      "type": "n8n-nodes-base.limit",
      "position": [
        1580,
        0
      ],
      "parameters": {
        "keep": "lastItems"
      },
      "typeVersion": 1
    },
    {
      "id": "0028a6c9-460b-4ee9-968c-f46b6102fd44",
      "name": "Filter: Only Images",
      "type": "n8n-nodes-base.filter",
      "position": [
        920,
        200
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "12999f01-4775-46ab-bc60-1c1e68a3c4d2",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.mimeType }}",
              "rightValue": "image/png"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9d0898a8-4f62-4c03-bf9f-5f62177854a7",
      "name": "Upload Final PDF File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2240,
        0
      ],
      "parameters": {
        "name": "={{ $('Set Pdf File Name').item.json.presentation_title }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Get Folder Id w Presentation').item.json.parents[0] }}"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "0d51a9da-0a99-47ab-a356-fd084d3d3a58",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -240
      ],
      "parameters": {
        "color": 4,
        "width": 400,
        "height": 1020,
        "content": "## \ud83d\udcda Create a PDF from Google Drive Images\n\nThis workflow takes all images from a Google Drive folder you specify, sorts them by creation date, and compiles them into a single PDF using a Google Slides template.\n\n**Key Things to Know Before You Start:**\n\n  **Set Your File Name:**\n- Go to the **'Set Pdf File Name'** node \n- Update the `presentation_title` value with your desired PDF name.\n\n\ud83d\udd11 **Connect Google Accounts:**\n- Authenticate your Google Drive & Google Slides accounts in all relevant Google nodes and HTTP nodes.\n\n\ud83d\udccf **Use a Google Slides Template for Custom Page Size:**\n- Google Slides defaults to a 16:9 aspect ratio. If you need specific PDF dimensions (e.g., A4, US Letter, square), **first create a Google Slides file with your desired page size.**\n- Then, select this custom Google Slides file in the **'CopyPdfTemplate'** node (under 'File').\n\n\ud83d\uddbc\ufe0f **Image & Folder Setup:**\n- In the **'CopyPdfTemplate'** node, also select the Google Drive **Folder** where your source images are located. The copied presentation and final PDF will also be created here.\n- The workflow filters for `.png` images by default. To use other types (like JPG), update the **'Filter: Only Images'** node.\n\n\u26a0\ufe0f **Image Size & Workflow Limits:**\n- Google Slides may have limitations on individual image size and the overall PDF file size when exporting.\n- This workflow works well for smaller presentations (10\u201320 pages). Larger files may run into errors or performance issues during export.\n\n\ud83d\udcb0 **Cost:** Free to use (relies on standard Google API calls, which are generally within free tier limits for typical usage)."
      },
      "typeVersion": 1
    },
    {
      "id": "478b42b2-ad5a-4e2d-bbe0-88f412cb57b2",
      "name": "Set Pdf File Name",
      "type": "n8n-nodes-base.set",
      "position": [
        -140,
        200
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b994aa5e-1580-43f6-90b0-f0ea8efd9614",
              "name": "presentation_title",
              "type": "string",
              "value": "[Your PDF Name Here]"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "eb4ef58f-77cd-408a-825a-720ced2a07f1",
      "name": "Delete First Empty Slide",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1800,
        0
      ],
      "parameters": {
        "url": "=https://slides.googleapis.com/v1/presentations/{{ $('Get Created Presentation').item.json.presentationId }}:batchUpdate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"requests\": [\n    {\n      \"deleteObject\": {\n        \"objectId\": \"{{ $('Get Created Presentation').item.json.slides[0].objectId }}\" \n      } \n    } \n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googleSlidesOAuth2Api"
      },
      "credentials": {
        "googleSlidesOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "fccfdcd0-9407-45bb-9065-ba0d0d63b1a6",
      "name": "CopyPdfTemplate",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        80,
        200
      ],
      "parameters": {
        "name": "={{ $json.presentation_title }}",
        "fileId": {
          "__rl": true,
          "mode": "list",
          "value": "1_Mfgb7lUD8tXRg3cXeIQXjQ9vgCG-TzwOoWVok_ROQ8",
          "cachedResultUrl": "https://docs.google.com/presentation/d/1_Mfgb7lUD8tXRg3cXeIQXjQ9vgCG-TzwOoWVok_ROQ8/edit?usp=drivesdk",
          "cachedResultName": "Book_Template"
        },
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": ""
        },
        "operation": "copy",
        "sameFolder": false
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "e9fb8627-1385-474c-badc-7aa1645a99da",
      "name": "Get Created Presentation",
      "type": "n8n-nodes-base.googleSlides",
      "position": [
        300,
        200
      ],
      "parameters": {
        "operation": "get",
        "presentationId": "={{ $('CopyPdfTemplate').item.json.id }}"
      },
      "credentials": {
        "googleSlidesOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c6429ca5-db95-4e33-b470-43a5df1feed3",
      "name": "Get Folder Id w Presentation",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        500,
        200
      ],
      "parameters": {
        "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.presentationId }}?fields=parents",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googleDriveOAuth2Api"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "bd8c64b0-f8a4-4bf6-bb3a-cabba5597fed",
      "name": "Get All Files From the Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        700,
        200
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "id",
            "value": "={{ $json.parents[0] }}"
          }
        },
        "options": {
          "fields": [
            "*"
          ]
        },
        "resource": "fileFolder",
        "returnAll": true,
        "queryString": "="
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "f1680bfa-8ce1-4b0e-af59-83332e9511a0",
      "name": "Create An Empty Slide",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1580,
        200
      ],
      "parameters": {
        "url": "=https://slides.googleapis.com/v1/presentations/{{ $('CopyPdfTemplate').item.json.id }}:batchUpdate",
        "method": "POST",
        "options": {},
        "jsonBody": "{\n  \"requests\": [\n    {\n      \"createSlide\": {\n        \"slideLayoutReference\": {\n          \"predefinedLayout\": \"BLANK\"\n          \n        } \n      } \n    } \n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googleSlidesOAuth2Api"
      },
      "credentials": {
        "googleSlidesOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0c883f43-b498-4da5-a5ee-ee44d11bb7f6",
      "name": "Add Image To The Slide",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2020,
        280
      ],
      "parameters": {
        "url": "=https://slides.googleapis.com/v1/presentations/{{ $('CopyPdfTemplate').item.json.id }}:batchUpdate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"requests\": [\n    {\n      \"createImage\": {\n        \"url\": \"{{ $('Sort by Created Date').item.json.webContentLink }}\",\n        \"elementProperties\": {\n           \"size\": {\n            \"width\": {\n              \"unit\": \"{{ $('Get Created Presentation').item.json.pageSize.width.unit }}\",\n              \"magnitude\": {{ $('Get Created Presentation').item.json.pageSize.width.magnitude }}\n            },\n            \"height\": {\n              \"unit\": \"{{ $('Get Created Presentation').item.json.pageSize.height.unit }}\",\n              \"magnitude\": {{ $('Get Created Presentation').item.json.pageSize.height.magnitude }}\n            }\n          },\n  \"transform\": {\n    \"scaleX\":  1,\n    \"scaleY\":  1,\n    \"translateX\": 0,\n    \"translateY\": 0,\n    \"unit\": \"PT\"\n  },\n          \"pageObjectId\": \"{{ $('Create An Empty Slide').item.json.replies[0].createSlide.objectId }}\" \n        } \n      } \n    } \n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googleSlidesOAuth2Api"
      },
      "credentials": {
        "googleSlidesOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4ba1bd72-7097-4774-9ce6-a770d4e8cacc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -180
      ],
      "parameters": {
        "color": 6,
        "width": 440,
        "height": 620,
        "content": "## Configure Template & Image Folder\n\n\u2699\ufe0f In the **'CopyPdfTemplate'** node configure:\n\n1.  **File -> From list:** Select your Google Slides template file. This will be the base for your PDF. If you want book orientation, it should be specified in the template in File-> Page Setup\n\n2.  **Parent Folder -> From list:** Choose the Google Drive folder where your source images are located.\n\n\u27a1\ufe0f **Important:** The workflow will create the final PDF in the *same folder* where you have your images"
      },
      "typeVersion": 1
    },
    {
      "id": "e1e1bb1f-d73e-4dd5-b665-e669b5c343b1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        -180
      ],
      "parameters": {
        "color": 6,
        "width": 420,
        "height": 600,
        "content": "## Image Filter Information\n\n\ud83d\uddbc\ufe0f **Image Format Note** \n\nThis workflow is preset to find and process `.png` images from your Google Drive folder (using MIME type `image/png`).\n\nIf you're using other image formats (e.g., JPG, GIF), you'll need to update the **'Filter: Only Images'** node.\n\nSpecifically, change the filter condition from `image/png` to the correct MIME type for your image files (e.g., `image/jpeg` for JPGs)."
      },
      "typeVersion": 1
    },
    {
      "id": "ba71a7ef-5309-4eb9-9aa8-a0bf275127a7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1320,
        500
      ],
      "parameters": {
        "color": 6,
        "width": 840,
        "height": 340,
        "content": "## How the Image-to-Slide Process Works\n\n\ud83d\udd04 **How Images Are Added to Slides** \n1.  The workflow fetches all images (that pass the filter) from your specified Google Drive folder.\n2.  It sorts these images by their creation date.\n3.  For each image, the workflow:\n    a. Creates a new blank slide in your Google Slides presentation.\n    b. Updates the image's permissions in Google Drive to be publicly readable (this is a temporary step, necessary for the Google Slides API to insert the image using its URL).\n    c. Adds the image to the new slide, fitting it to the slide's dimensions.\n\n**Final Touch:** After all images are added, the *very first slide* of the presentation (which is a blank page from your template) is deleted."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Limit: 1Page": {
      "main": [
        [
          {
            "node": "Delete First Empty Slide",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CopyPdfTemplate": {
      "main": [
        [
          {
            "node": "Get Created Presentation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Limit: 1Page",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create An Empty Slide",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Pdf File Name": {
      "main": [
        [
          {
            "node": "CopyPdfTemplate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: Only Images": {
      "main": [
        [
          {
            "node": "Sort by Created Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort by Created Date": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert slides to PDF": {
      "main": [
        [
          {
            "node": "Upload Final PDF File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create An Empty Slide": {
      "main": [
        [
          {
            "node": "Update Image Permissions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Image To The Slide": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete First Empty Slide": {
      "main": [
        [
          {
            "node": "Convert slides to PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Created Presentation": {
      "main": [
        [
          {
            "node": "Get Folder Id w Presentation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Image Permissions": {
      "main": [
        [
          {
            "node": "Add Image To The Slide",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Folder Id w Presentation": {
      "main": [
        [
          {
            "node": "Get All Files From the Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Files From the Folder": {
      "main": [
        [
          {
            "node": "Filter: Only Images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Set Pdf File Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n template offers a free and automated way to convert images from a Google Drive folder into a single PDF document. It uses Google Slides as an intermediary, allowing you to control the final PDF's page size and orientation.

Source: https://n8n.io/workflows/4540/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This automation organizes your n8n workflows files into categorizes (Active, Template, Done, Archived) and uploads them directly to a categorized Google Drive folders. It is designed to help users man

Google Drive, HTTP Request, Time Saved
Web Scraping

This automation organizes and consolidates your n8n workflows into categorized JSON files (Active, Template, Done, Archived) and uploads them directly to a Google Drive folder. It is designed to help

Google Drive, Time Saved, HTTP Request
Web Scraping

The Sora 2 API allows seamless generation of CGI ads, turning text prompts into stunning videos. This workflow automates the entire process from video generation to upload, notification, and file shar

Form Trigger, HTTP Request, Email Send +1
Web Scraping

Formtrigger Workflow. Uses formTrigger, googleDrive, httpRequest, stopAndError. Event-driven trigger; 28 nodes.

Form Trigger, Google Drive, HTTP Request +1
Web Scraping

Formtrigger Workflow. Uses formTrigger, googleDrive, httpRequest, stopAndError. Event-driven trigger; 28 nodes.

Form Trigger, Google Drive, HTTP Request +1