# Create a REST API for PDF digital signatures: n8n workflow

> Started by another system calling it. It calls services over plain HTTP rather than through connectors.

Source: https://millionrounds.com/workflow/create-a-rest-api-for-pdf-digital-signatures (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Documents and files](https://millionrounds.com/workflows?category=Documents+and+files#library)

# Create a REST API for PDF digital signatures

Started by another system calling it. It calls services over plain HTTP rather than through connectors. 27 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fcreate-a-rest-api-for-pdf-digital-signatures)

**27 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**0** Loops or waits

**0** Services by connector: it calls them over plain HTTP

## The flow

Starts it 5 Logic 15 Service 7

The steps in the order they run, from what starts it.

- 1 **API POST Endpoint** Webhook *Starts it*
- 2 **API GET Endpoint** Webhook *Starts it*
- 3 **set file path** Set *Logic*
- 4 **Switch Operation** Switch *Logic*
- 5 **Prepare input params** Set *Logic*
- 6 **Validate Key Gen Params** Code *Logic*
- 7 **Validate PDF Sign Params** Code *Logic*
- 8 **set downlowd file info** Set *Logic*
- 9 **Switch Upload Type** Switch *Logic*
- 10 **Generate Keys** Code *Logic*
- 11 **Sign PDF** Code *Logic*
- 12 **Read download file from Disk** Read Write File *Service*
- 13 **Validate PDF Upload** Code *Logic*
- 14 **Validate Key Upload** Code *Logic*
- 15 **check success** If *Logic*
- 16 **GET Respond to Webhook** Respond To Webhook *Starts it*
- 17 **Convert PDF to File** Convert To File *Service*
- 18 **Convert PFX to File** Convert To File *Service*
- 19 **Prepare Success Response** Set *Logic*
- 20 **POST Error Response** Respond To Webhook *Starts it*
- 21 **Write PDF File to Disk** Read Write File *Service*
- 22 **Write PFX File to Disk** Read Write File *Service*
- 23 **POST Success Response** Respond To Webhook *Starts it*
- 24 **Read PDF File from Disk** Read Write File *Service*
- 25 **Read PFX File from Disk** Read Write File *Service*
- 26 **Check PDF file is OK** Set *Logic*
- 27 **Check PFX file is OK** Set *Logic*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 27, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Nothing by connector; it calls services over plain HTTP
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 27 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 27 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fcreate-a-rest-api-for-pdf-digital-signatures)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Workflows like it

Also documents and files, with the same services where possible, closest in size first.

- [**Advanced document approval for Microsoft 365 with MySQL** 27 steps · Email, MySQL](https://millionrounds.com/workflow/advanced-document-approval-for-microsoft-365-with-mysql)
- [**Automated n8n workflow backup to GitHub** 27 steps · GitHub](https://millionrounds.com/workflow/automated-n8n-workflow-backup-to-github)
- [**Backup n8n workflows to GitHub with Discord** 27 steps · Discord, GitHub](https://millionrounds.com/workflow/backup-n8n-workflows-to-github-with-discord)
- [**Translate documents to multiple languages with Google Drive** 27 steps · Gmail, Google Drive](https://millionrounds.com/workflow/translate-documents-to-multiple-languages-with-google-drive)
- [**AI-Powered RAG Document Processing & Chatbot with Google Drive** 27 steps · calls a model · Google Drive, Supabase vectors](https://millionrounds.com/workflow/ai-powered-rag-document-processing-and-chatbot-with-google-d)
- [**Auto-document and backup workflows with OpenAI and Airtable** 27 steps · calls a model · Airtable](https://millionrounds.com/workflow/auto-document-and-backup-workflows-with-openai-and-airtable)
