Pular para o conteúdo principal

Desbloquear PDF em n8n

Desbloquear PDF é um PDF4me ação do nó em n8n que remove a proteção por senha de um PDF Ao fornecer a senha correta, você poderá usá-la para tornar arquivos protegidos legíveis em etapas posteriores do fluxo de trabalho, remover a criptografia de um arquivo compactado de sua propriedade ou desbloquear todos os extratos enviados por um fornecedor sem precisar abri-los um por um.

O que este nó faz

PDF4me: Desbloquear PDF assume um protegido PDF de Dados Binários, um Base64 Stringou um URL, aplica a senha que você fornecer e retorna uma cópia que abre sem aviso. Senha Este campo é obrigatório, portanto, ele desbloqueia documentos que você já está autorizado a abrir, em vez de recuperar uma senha perdida. Sua função usual é ficar no início de um fluxo de trabalho, pois as etapas de extração e conversão não conseguem ler um arquivo criptografado.

Artigos relacionados no blogue
Ainda não há nenhuma publicação no blogue sobre esta funcionalidade — em breve.
Entretanto, explore o blogue da PDF4me para encontrar tutoriais e fluxos de trabalho para todas as plataformas.
Visite o blogue

Autenticando seu API Solicitar

Todo PDF4me nó em n8n requer um válido Credencial para se conectar comCrie ou selecione um que contenha o seu PDF4me API chave para que o fluxo de trabalho possa autenticar solicitações de desbloqueio com segurança.

Fatos importantes que você não deve perder

A senha é obrigatória.
Esta não é uma ferramenta de recuperação de senha. Sem a senha correta, o documento não poderá ser desbloqueado por meio desta ação.
Desbloqueie antes de extrair
A extração de texto, tabela e formulário não consegue ler um arquivo criptografado. PDFPortanto, esse nó geralmente pertence ao início do fluxo de trabalho.
Mantenha a senha fora do arquivo de fluxo de trabalho.
Referencie uma credencial ou variável de ambiente em vez de digitar o segredo, para que ele não seja incluído no fluxo de trabalho exportado. JSON.
O nó PDF4me no n8n está configurado com a ação "Desbloquear PDF", o tipo de dados de entrada "Dados Binários", o campo de entrada "dados binários", o nome do arquivo de saída "unlocked_output.pdf", um campo de senha mascarado e o nome de saída de dados binários "dados".

PDF4me Desbloquear PDF painel de parâmetros em n8n

Desbloquear PDF vs Proteger Documento

Essas duas ações são opostas, e os fluxos de trabalho frequentemente usam ambas: desbloquear um arquivo recebido para lê-lo e, em seguida, proteger novamente o resultado antes que ele seja enviado novamente.

AspectoDesbloquear PDFProteger documento
What it doesRemoves existing password protectionApplies password protection
Password you supplyThe current password on the documentThe new password you want to set
Typical positionFirst step, so later nodes can read the fileLast step, before the file is sent or stored
PrerequisiteYou must already know the passwordNone beyond the source document

Quais parâmetros o Unlock permite? PDF Precisar?

Obrigatório: Ação, Tipo de Dados de Entrada, o campo correspondente a esse tipo de entrada, Nome do Arquivo de Saída e Senha. O Nome da Saída de Dados Binários e os Perfis Personalizados possuem valores padrão funcionais.

ParâmetroObrigatórioO que fazExemplo
ActionRequiredSelects the PDF4me node action to run. Choose Unlock PDF.Unlock PDF
Input Data TypeRequiredFormat of the source PDF input. Choose Binary Data (from a previous node), Base64 String, or URL.Binary Data
Input Binary FieldConditionalName of the binary property on the incoming n8n item that holds the protected PDF. Required when Input Data Type is Binary Data. Defaults to data.data
Base64 Document ContentConditionalBase64-encoded content of the protected PDF. Required when Input Data Type is Base64 String.JVBERi0xLjQK...
File URLConditionalPublicly reachable HTTPS URL to the protected PDF. Required when Input Data Type is URL.https://example.com/statement.pdf
Output File NameRequiredFilename for the unlocked PDF returned by the node. Include the .pdf extension.unlocked_output.pdf
PasswordRequiredThe current password on the document. Shown masked in the panel. Reference a credential or environment variable rather than typing the secret into a saved workflow.{{ $env.PDF_PASSWORD }}
Binary Data Output NameOptionalName of the binary property the output item exposes. Defaults to data.data
Custom ProfilesOptionalAdvanced Options field for extra processing settings, supplied in a JSON-like format. Leave blank unless you have a specific profile to apply.{ "preserveMetadata": true }

Campos de saída

Uma corrida bem-sucedida retorna um n8n item que carrega o desbloqueado PDF.

CampoTipoO que contém
Binary (data)BinaryThe unlocked PDF, under Binary Data Output Name (default data).
fileNameStringGenerated filename, matching Output File Name.
docNameStringName of the processed document, for reference and tracking.
mimeTypeStringMIME type of the output, always application/pdf.
fileSizeNumberSize of the returned PDF in bytes.
isUnlockedBooleanConfirms the document was unlocked. A useful assertion before handing the file to an extraction step.
securityRemovedBooleanConfirms password protection and access restrictions were removed.
successBooleanTrue when the unlock completed, false on failure such as a wrong password. Use it to branch error handling.
messageStringHuman-readable status message, carrying success confirmation or error detail.

Como faço para configurar o desbloqueio? PDF em n8n?

  1. Adicionar PDF4me para o seu n8n fluxo de trabalho e escolha o Desbloquear PDF Ação.
  2. Em Credencial para se conectar com, selecione o seu PDF4me credencial ou clique Criar nova credencial e cole o seu API chave.
  3. Definir Tipo de dados de entrada para Dados binários (padrão), Base64 String, ou URL e forneça a fonte correspondente. PDF campo.
  4. Definir Nome do arquivo de saída para o arquivo desbloqueado, terminando em .pdf.
  5. Insira o documento SenhaIdealmente, como uma expressão que lê uma credencial ou variável de ambiente.
  6. Deixar Nome da saída de dados binários como data a menos que um nó posterior espere uma propriedade diferente.
  7. Execute o nó e direcione o desbloqueado. PDF para a próxima etapa, como extração, conversão ou armazenamento.

Configurações típicas

Exemplos de fluxo de trabalhoCommon n8n workflow patterns using Unlock PDF.
Leia os extratos bancários protegidos.
  1. A fatura chega por e-mail, protegida por uma senha conhecida.
  2. Desbloquear PDF Remove a proteção usando um segredo armazenado.
  3. Uma etapa de extração de tabela lê as transações para uma planilha.
Criptografia clara de um arquivo próprio
  1. Todos os documentos antigos em uma unidade compartilhada têm a mesma senha antiga.
  2. Desbloquear PDF Executa o comando em cada arquivo durante um lote de migração.
  3. As cópias desprotegidas são inseridas no novo sistema de documentos, onde podem ser pesquisadas.
Desbloqueie, processe e proteja novamente.
  1. Desbloquear PDF Abre um documento protegido recebido.
  2. O fluxo de trabalho carimba, mescla ou edita o arquivo legível.
  3. O recurso Proteger Documento aplica uma nova senha antes de reenviá-lo.
Proteja o oleoduto com um success verificar
  1. Desbloquear PDF tenta a senha armazenada em cada arquivo recebido.
  2. Um nó IF testa o valor retornado. success e os campos isUnlocked.
  3. As falhas geram um alerta, para que uma senha alterada seja detectada imediatamente.

Dicas práticas

Never hardcode the password
Use an expression that reads an n8n credential or environment variable, so the secret does not travel inside exported workflow JSON.
Put the unlock first
Extraction and conversion nodes cannot read an encrypted PDF, so unlocking early avoids confusing downstream failures.
Alert on a failed unlock
A rotated password will fail every run. Branch on success so it surfaces as an alert rather than a pile of stuck items.
Assert on isUnlocked before extracting
Checking the flag is cheaper than debugging an extraction node that received a file it could not open.
Only unlock what you are authorised to
The action needs the real password by design. Confirm you have the right to remove protection before automating it across an archive.
re-protect before sending outward
If the document leaves your systems again, add Protect Document at the end so the unlocked copy is not what gets distributed.

Folha de dicas

CampoValor
ActionUnlock PDF
Input Data TypeBinary Data
Input Binary Fielddata
Output File Nameunlocked_output.pdf
Password{{ $env.PDF_PASSWORD }}
Binary Data Output Namedata
CredentialsPDF4me API credential

Perguntas frequentes

Can Unlock PDF open a PDF when I do not know the password?+
No. The Password field is required and must match the password set on the document. The node removes protection from files you are already authorised to open; it is not a password recovery or cracking tool. If nobody in your organisation holds the password, the document cannot be unlocked through this action.
Where should I store the PDF password in n8n?+
Avoid typing it directly into the Password field on a saved workflow. Reference an n8n credential or an environment variable through an expression instead, so the secret is not stored in the workflow JSON that gets exported, shared, or committed to version control.
Does unlocking remove permission restrictions as well as the open password?+
The action removes the password protection so the returned file opens without a prompt, and the response includes a securityRemoved flag confirming restrictions were lifted. Encryption and permission handling are defined in the ISO 32000 PDF specification, so check that flag on a representative document before assuming a specific restriction such as printing or copying is gone.
Why unlock PDFs in a workflow instead of one at a time?+
Downstream steps such as text extraction, table parsing, and conversion cannot read an encrypted PDF. Putting Unlock PDF at the front of the workflow means every protected file that arrives is made readable automatically, rather than stalling the pipeline until someone opens each one by hand.
What happens if the password is wrong?+
The run fails rather than returning a partially unlocked file. Branch on the returned success boolean so a wrong or rotated password raises an alert instead of silently passing the still-encrypted original to the next step, where it would fail again less obviously.

Ações relacionadas

Mesma tarefa em outras plataformas

Obtenha ajuda