AutomationFlowsGeneral › Protect PDF with Password via ConvertAPI

Protect PDF with Password via ConvertAPI

Original n8n title: Protect PDF with the Password Using Convertapi

Protect Pdf With The Password Using Convertapi. Uses manualTrigger, readWriteFile, stickyNote, httpRequest. Event-driven trigger; 7 nodes.

Event trigger★★☆☆☆ complexity7 nodesRead Write FileHTTP RequestGoogle Drive
General Trigger: Event Nodes: 7 Complexity: ★★☆☆☆ Added:

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
{
  "nodes": [
    {
      "id": "1ef81384-b424-49bc-a6b5-922d1b0f5a7b",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        340,
        240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3052f841-9e65-4284-a84d-3bb5d0c146ea",
      "name": "Write Result File to Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1200,
        240
      ],
      "parameters": {
        "options": {},
        "fileName": "document.pdf",
        "operation": "write",
        "dataPropertyName": "=data"
      },
      "typeVersion": 1
    },
    {
      "id": "852e30be-e145-4e73-b646-94e2ceec536c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        100
      ],
      "parameters": {
        "width": 218,
        "height": 132,
        "content": "## Authentication\nConversion requests must be authenticated. Please create \n[ConvertAPI account to get authentication secret](https://www.convertapi.com/a/signin)"
      },
      "typeVersion": 1
    },
    {
      "id": "69f4d125-8990-4c98-9743-9f877325c958",
      "name": "Download PDF File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        240
      ],
      "parameters": {
        "url": "https://cdn.convertapi.com/public/files/demo.pdf",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ff47b32c-37de-4f95-a0f0-37a7ea6f6bcd",
      "name": "Protect File with Password",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        780,
        240
      ],
      "parameters": {
        "url": "https://v2.convertapi.com/convert/pdf/to/protect",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "=data"
            },
            {
              "name": "UserPassword",
              "value": "mypassword"
            }
          ]
        },
        "genericAuthType": "httpQueryAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/octet-stream"
            }
          ]
        }
      },
      "credentials": {
        "httpQueryAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "4b3f082d-ad08-4609-88b6-bf25ff660c09",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        400
      ],
      "parameters": {
        "width": 220,
        "height": 140,
        "content": "## Set Password\nSet the password in the parameter **UserPassword**"
      },
      "typeVersion": 1
    },
    {
      "id": "79d5896e-4d5b-4dd9-8fc2-466197b5d61f",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1180,
        440
      ],
      "parameters": {
        "name": "test-password.pdf",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    }
  ],
  "connections": {
    "Download PDF File": {
      "main": [
        [
          {
            "node": "Protect File with Password",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Protect File with Password": {
      "main": [
        [
          {
            "node": "Write Result File to Disk",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Download PDF File",
            "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

Protect Pdf With The Password Using Convertapi. Uses manualTrigger, readWriteFile, stickyNote, httpRequest. Event-driven trigger; 7 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

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

General

AI ImgGen. Uses manualTrigger, stickyNote, convertToFile, splitInBatches. Event-driven trigger; 21 nodes.

HTTP Request, Google Sheets, Google Drive
General

Replace Images In Google Docs Documents And Download As Pdf Docx. Uses manualTrigger, stickyNote, httpRequest, googleDrive. Event-driven trigger; 18 nodes.

HTTP Request, Google Drive
General

Remove Advanced Background from Google Drive Images. Uses httpRequest, splitOut, googleDrive, editImage. Event-driven trigger; 16 nodes.

HTTP Request, Google Drive, Edit Image +1
General

🎯 Purpose: Generate audio files from text scripts stored in Google Drive.

Execute Workflow Trigger, Google Drive, Read Write File +1
General

Merge Pdf Files Using Convertapi. Uses manualTrigger, readWriteFile, stickyNote, httpRequest. Event-driven trigger; 6 nodes.

Read Write File, HTTP Request