AutomationFlowsGeneral › Generate Documents From Saved Templates and Variables Using Autype

Generate Documents From Saved Templates and Variables Using Autype

By8Automator @kesim0 on n8n.io

⚠️ Important: This workflow uses the Autype community node and requires a self-hosted n8n instance.

Event trigger★★★☆☆ complexity12 nodesForm TriggerN8N Nodes Autype
General Trigger: Event Nodes: 12 Complexity: ★★★☆☆ Added:

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

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
{
  "id": "6swmhUy0bvgLLTLH",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Render a Saved Autype Document with Variable Overrides",
  "tags": [],
  "nodes": [
    {
      "id": "9a69be48-21df-407d-a8c8-88577e862193",
      "name": "Certificate Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -80,
        208
      ],
      "parameters": {
        "options": {},
        "formTitle": "Generate Personalized Certificate",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Recipient Name",
              "placeholder": "e.g. Jane Smith",
              "requiredField": true
            },
            {
              "fieldLabel": "Employee ID",
              "placeholder": "e.g. 42",
              "requiredField": true
            },
            {
              "fieldLabel": "Award Month",
              "placeholder": "e.g. March 2026",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Achievements (comma-separated title:description pairs)",
              "placeholder": "Delivered Q1 report:Ahead of schedule, Onboarded clients:3 new enterprise clients",
              "requiredField": true
            },
            {
              "fieldLabel": "Profile Photo URL",
              "placeholder": "https://example.com/photo.jpg"
            },
            {
              "fieldLabel": "Signature Image URL",
              "placeholder": "https://example.com/signature.png"
            }
          ]
        },
        "formDescription": "Fill in the fields to generate a personalized employee of the month certificate as PDF."
      },
      "typeVersion": 2.2
    },
    {
      "id": "d236c5a3-9c6b-4152-b6b8-dc218964c32f",
      "name": "Set Form Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        144,
        208
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a3-var-doc-id",
              "name": "documentId",
              "type": "string",
              "value": "YOUR_CREDENTIAL_ID"
            },
            {
              "id": "a3-var-name",
              "name": "recipientName",
              "type": "string",
              "value": "={{ $json['Recipient Name'] }}"
            },
            {
              "id": "a3-var-empid",
              "name": "employeeId",
              "type": "string",
              "value": "={{ $json['Employee ID'] }}"
            },
            {
              "id": "a3-var-month",
              "name": "awardMonth",
              "type": "string",
              "value": "={{ $json['Award Month'] }}"
            },
            {
              "id": "a3-var-achievements",
              "name": "achievementsRaw",
              "type": "string",
              "value": "={{ $json['Achievements (comma-separated title:description pairs)'] }}"
            },
            {
              "id": "a3-var-photo",
              "name": "profilePhotoUrl",
              "type": "string",
              "value": "={{ $json['Profile Photo URL'] || 'https://placehold.co/100x100/6700ff/ffffff.png?text=Photo' }}"
            },
            {
              "id": "a3-var-signature",
              "name": "signatureUrl",
              "type": "string",
              "value": "={{ $json['Signature Image URL'] || 'https://placehold.co/200x50.png?text=Signature' }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a6db4890-4ffc-48f9-a578-8cac1b4f8f56",
      "name": "Get Document Variables",
      "type": "n8n-nodes-autype.autype",
      "position": [
        368,
        208
      ],
      "parameters": {
        "resource": "document",
        "operation": "getVariables",
        "documentId": "={{ $json.documentId }}"
      },
      "credentials": {
        "autypeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bccef7ce-7140-471c-87e6-f58db61f63a8",
      "name": "Render Document with Variables",
      "type": "n8n-nodes-autype.autype",
      "position": [
        608,
        208
      ],
      "parameters": {
        "operation": "renderDocument",
        "documentId": "={{ $json.documentId }}",
        "downloadOutput": true,
        "renderDocumentOptions": {
          "variables": "={\n  \"recipientName\": \"{{ $('Set Form Variables').item.json.recipientName }}\",\n  \"EmployeeID\": \"{{ $('Set Form Variables').item.json.employeeId }}\",\n  \"awardMonth\": \"{{ $('Set Form Variables').item.json.awardMonth }}\",\n  \"achivements\": {\n    \"type\": \"table\",\n    \"columns\": [\"Achievement\", \"Description\"],\n    \"data\": {{ $('Set Form Variables').first().json.achievementsRaw.split(',').map(s => s.trim()).filter(s => s.length > 0).map(s => { const parts = s.split(':'); return [parts[0]?.trim() || '', (parts[1] || '').trim()]; }).toJsonString() }}\n  },\n  \"profilePhoto\": {\n    \"type\": \"image\",\n    \"src\": \"{{ $('Set Form Variables').first().json.profilePhotoUrl }}\",\n    \"width\": 100,\n    \"align\": \"center\"\n  },\n  \"Signature\": {\n    \"type\": \"image\",\n    \"src\": \"{{ $('Set Form Variables').first().json.signatureUrl }}\",\n    \"height\": 50,\n    \"width\": 100\n  }\n}"
        }
      },
      "credentials": {
        "autypeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bbef4ce3-82d5-4a50-81eb-f17b1977f83e",
      "name": "Create Project",
      "type": "n8n-nodes-autype.autype",
      "position": [
        128,
        -192
      ],
      "parameters": {
        "name": "Certificates",
        "resource": "document",
        "operation": "createProject",
        "projectAdditionalFields": {
          "description": "Employee of the Month certificates \u2014 created by n8n"
        }
      },
      "credentials": {
        "autypeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9ba12e7d-f9e3-4bca-9d8f-24427fd04dc0",
      "name": "Create Document",
      "type": "n8n-nodes-autype.autype",
      "position": [
        368,
        -192
      ],
      "parameters": {
        "title": "Employee of the Month \u2014 Template",
        "resource": "document",
        "operation": "createDocument",
        "projectId": "={{ $json.id }}",
        "additionalFields": {
          "content": "{\n  \"document\": {\n    \"size\": \"A4\",\n    \"type\": \"pdf\",\n    \"orientation\": \"portrait\"\n  },\n  \"variables\": {\n    \"Signature\": {\n      \"src\": \"https://camo.githubusercontent.com/735a0a4e23fbae48c85c13cf7a76075358dc77cf95d6a2cf1b2c051b85056339/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f393837332f3236383034362f39636564333435342d386566632d313165322d383136652d6139623137306135313030342e706e67\",\n      \"type\": \"image\",\n      \"height\": 50\n    },\n    \"EmployeeID\": {\n      \"type\": \"number\",\n      \"value\": 4\n    },\n    \"awardMonth\": \"Month Year\",\n    \"achivements\": {\n      \"data\": [\n        [\n          \"title1\",\n          \"dscription1\"\n        ],\n        [\n          \"title2\",\n          \"desription2\"\n        ]\n      ],\n      \"type\": \"table\",\n      \"columns\": [\n        \"achivements\",\n        \"description\"\n      ]\n    },\n    \"profilePhoto\": {\n      \"src\": \"https://placehold.co/100x100/6700ff/ffffff.png?text=Photo\",\n      \"type\": \"image\",\n      \"align\": \"center\",\n      \"width\": 100\n    },\n    \"recipientName\": \"Recipient Name\"\n  },\n  \"defaults\": {\n    \"chart\": {\n      \"colors\": [\n        \"#3b82f6\",\n        \"#ef4444\",\n        \"#10b981\",\n        \"#f59e0b\",\n        \"#8b5cf6\"\n      ],\n      \"borderColors\": [\n        \"#2563eb\",\n        \"#dc2626\",\n        \"#059669\",\n        \"#d97706\",\n        \"#7c3aed\"\n      ]\n    },\n    \"color\": \"#1a1a2e\",\n    \"footer\": {\n      \"left\": \"\",\n      \"right\": \"\",\n      \"excludeFirstPage\": false\n    },\n    \"header\": {\n      \"left\": {\n        \"src\": \"https://img.icons8.com/?size=100&id=e9femSksvyZL&format=png&color=6700FF\",\n        \"type\": \"image\",\n        \"width\": 50\n      },\n      \"right\": \"ACME Corp.\",\n      \"center\": \"\",\n      \"excludeFirstPage\": false\n    },\n    \"styles\": {\n      \"h1\": {\n        \"align\": \"center\",\n        \"color\": \"#6700ff\",\n        \"fontSize\": 30,\n        \"fontWeight\": \"bold\"\n      },\n      \"h2\": {\n        \"align\": \"center\",\n        \"color\": \"#1a1a2e\",\n        \"fontSize\": 22,\n        \"fontWeight\": \"bold\"\n      },\n      \"h3\": {\n        \"align\": \"center\",\n        \"color\": \"#6700ff\",\n        \"fontSize\": 13,\n        \"fontWeight\": \"bold\"\n      },\n      \"h6\": {\n        \"align\": \"left\"\n      },\n      \"text\": {\n        \"align\": \"left\",\n        \"color\": \"#3d3d5c\",\n        \"fontSize\": 11\n      },\n      \"table\": {\n        \"rows\": {\n          \"align\": \"center\",\n          \"color\": \"#1a1a2e\",\n          \"backgroundColor\": \"#ffffff\",\n          \"alternateBackgroundColor\": \"#ffffff\"\n        },\n        \"header\": {\n          \"align\": \"center\",\n          \"color\": \"#6700ff\",\n          \"fontWeight\": \"bold\",\n          \"backgroundColor\": \"#ffffff\"\n        },\n        \"borders\": {\n          \"inner\": {\n            \"color\": \"#b380ff\",\n            \"style\": \"solid\",\n            \"width\": 1\n          },\n          \"outer\": {\n            \"color\": \"#ffffff\",\n            \"width\": 0\n          }\n        },\n        \"cellPadding\": {\n          \"top\": 6,\n          \"left\": 10,\n          \"right\": 10,\n          \"bottom\": 6\n        }\n      },\n      \"text2\": {\n        \"color\": \"#6b6b8a\",\n        \"fontSize\": 10\n      }\n    },\n    \"spacing\": {\n      \"after\": {\n        \"h1\": 15,\n        \"h2\": 12,\n        \"h3\": 10,\n        \"h4\": 8,\n        \"h5\": 6,\n        \"h6\": 5,\n        \"code\": 15,\n        \"list\": 10,\n        \"math\": 15,\n        \"text\": 10,\n        \"chart\": 15,\n        \"image\": 15,\n        \"table\": 15\n      },\n      \"before\": {\n        \"h1\": 20,\n        \"h2\": 18,\n        \"h3\": 16,\n        \"h4\": 14,\n        \"h5\": 12,\n        \"h6\": 10,\n        \"code\": 10,\n        \"list\": 10,\n        \"math\": 10,\n        \"text\": 0,\n        \"chart\": 10,\n        \"image\": 10,\n        \"table\": 10\n      }\n    },\n    \"fontSize\": 11,\n    \"fontFamily\": \"Arial\",\n    \"lineHeight\": 1.4\n  },\n  \"sections\": [\n    {\n      \"type\": \"flow\",\n      \"content\": [\n        {\n          \"id\": \"d78d1e99-d7fc-4ff8-820f-d826c72cafad\",\n          \"type\": \"spacer\",\n          \"height\": 0.5\n        },\n        {\n          \"id\": \"f569a2f8-e946-4dba-a4d5-079d118239b0\",\n          \"type\": \"text\",\n          \"text\": \"CERTIFICATE OF RECOGNITION\",\n          \"fontSize\": 9,\n          \"align\": \"center\",\n          \"color\": \"#6b6b8a\"\n        },\n        {\n          \"id\": \"c0744994-58de-4b79-a889-0f07036e287d\",\n          \"type\": \"spacer\",\n          \"height\": 0.5\n        },\n        {\n          \"id\": \"283b60dc-6ae4-4b92-8724-b078fddc1798\",\n          \"type\": \"h1\",\n          \"text\": \"**Employee of the Month**\"\n        },\n        {\n          \"id\": \"7fd1617b-d404-4c12-9048-f2143ddf13e1\",\n          \"type\": \"spacer\",\n          \"height\": 0.5\n        },\n        {\n          \"id\": \"a063f214-61f4-4418-812e-a9c3e5f84fcc\",\n          \"type\": \"text\",\n          \"text\": \"This certificate is proudly awarded to\",\n          \"align\": \"center\"\n        },\n        {\n          \"id\": \"633085c9-e0c1-4836-8129-9fcb46f25fcb\",\n          \"type\": \"spacer\",\n          \"height\": 0.5\n        },\n        {\n          \"id\": \"983cfe3c-491e-434b-9481-d6b1dde06e25\",\n          \"type\": \"variableRef\",\n          \"variable\": \"profilePhoto\"\n        },\n        {\n          \"id\": \"8b56134e-9e3d-4d37-9f20-f76579a79270\",\n          \"type\": \"h2\",\n          \"text\": \"{{recipientName}} (#{{EmployeeID}})\"\n        },\n        {\n          \"id\": \"85517dba-02cf-4791-b62d-cb10b411ae79\",\n          \"type\": \"text\",\n          \"text\": \"for ++outstanding++ performance and dedication in {{awardMonth}}\",\n          \"align\": \"center\"\n        },\n        {\n          \"id\": \"26c66b31-b08b-4725-9bd3-a5dba0453656\",\n          \"type\": \"spacer\",\n          \"height\": 1\n        },\n        {\n          \"id\": \"873ef13d-c3d4-4c36-ac05-8a48b269e178\",\n          \"type\": \"text\",\n          \"text\": \"\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\",\n          \"fontSize\": 8,\n          \"align\": \"center\",\n          \"color\": \"#6700ff\"\n        },\n        {\n          \"id\": \"db01072b-6051-4de4-951a-e11b688194cc\",\n          \"type\": \"spacer\",\n          \"height\": 0.5\n        },\n        {\n          \"id\": \"bb027115-ba7e-41c0-85e5-1016f0d42f1a\",\n          \"type\": \"h3\",\n          \"text\": \"Key Achievements\"\n        },\n        {\n          \"id\": \"520d1ff4-e569-4bd6-807f-229e6e25297d\",\n          \"type\": \"table\",\n          \"headers\": [\n            \"Achievement\",\n            \"Description\"\n          ],\n          \"dataSource\": \"achivements\"\n        },\n        {\n          \"id\": \"08ee157a-a9f7-44d4-9420-5d32c41f094d\",\n          \"type\": \"spacer\",\n          \"height\": 1\n        },\n        {\n          \"id\": \"f2851a3d-aa66-4723-91df-5b2211d3e6e0\",\n          \"type\": \"table\",\n          \"rows\": [\n            [\n              \"<br> <br>{{date/DD.MM.YYYY}}\",\n              \"{{Signature}}\"\n            ],\n            [\n              \"\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\",\n              \"\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\"\n            ],\n            [\n              \"*Date*\",\n              \"*Authorized by ACME Corp HR*\"\n            ]\n          ],\n          \"invisible\": true,\n          \"style\": {\n            \"rows\": {\n              \"align\": \"right\"\n            },\n            \"cellPadding\": {\n              \"top\": 1,\n              \"right\": 1,\n              \"bottom\": 1,\n              \"left\": 1\n            }\n          }\n        }\n      ]\n    }\n  ]\n}",
          "description": "Template with variable placeholders. Rendered via n8n with dynamic values."
        }
      },
      "credentials": {
        "autypeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0f1baa3e-4fc7-4cbb-9c5e-3e3eba9eb769",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        -464
      ],
      "parameters": {
        "width": 500,
        "height": 820,
        "content": "## Render a Saved Autype Document with Variable Overrides\n\nThis workflow shows how to render a **persistent Autype document** (created once in the Autype editor or via API) with **dynamic variable values** injected at render time.\n\nAutype variables support multiple types:\n- **String** \u2014 plain text, e.g. `{{recipientName}}`\n- **Number** \u2014 numeric value, e.g. `{{EmployeeID}}`\n- **Table** \u2014 tabular data with columns and rows\n- **Image** \u2014 an image element with `src`, `width`/`height`\n\nThis example generates a personalized **Employee of the Month certificate** as PDF.\n\n### How it works\n1. **Certificate Form** \u2014 n8n form collects recipient name, award month, achievements (comma-separated), and an optional photo URL.\n2. **Set Form Variables** \u2014 Maps form fields and sets the document ID.\n3. **Get Document Variables** \u2014 Fetches the variable definitions from the saved template (optional, useful for debugging).\n4. **Render Document with Variables** \u2014 Renders the saved document, injecting the form values as typed variables.\n\n### Setup\n1. Install **n8n-nodes-autype** via **Settings \u2192 Community Nodes**.\n2. Get your API key at [app.autype.com](https://app.autype.com) \u2192 [API Keys](https://docs.autype.com/getting-started/editor/settings#api-keys).\n3. Add an **Autype API** credential and update `YOUR_CREDENTIAL_ID` in each Autype node.\n4. Run the **one-time setup** (see box on the right) to create the project and template document \u2014 then copy the returned document ID into `Set Form Variables`.\n\nNote: Requires self-hosted n8n (community node)."
      },
      "typeVersion": 1
    },
    {
      "id": "12baaf99-b280-413a-a98a-984002014881",
      "name": "Sticky Note Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -464
      ],
      "parameters": {
        "color": 7,
        "width": 756,
        "height": 464,
        "content": "## ONE-TIME SETUP \u2014 Run once, then disable\n\nThis section creates the **project** and **document template** in Autype via API. After running it once:\n1. Copy the `id` from the **Create Document** output\n2. Paste it into the `documentId` field in **Set Form Variables**\n3. Disable or disconnect these two nodes \u2014 they are no longer needed\n\n**Alternative:** Create the project and document manually in the Autype web editor at [app.autype.com](https://app.autype.com) \u2014 no API needed. Just copy the document ID from the URL."
      },
      "typeVersion": 1
    },
    {
      "id": "8077453f-c4b7-4225-90ac-b83eb9163fc6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 252,
        "height": 328,
        "content": "### Form Trigger\nCollects: recipient name, employee ID, award month, achievements (textarea \u2192 table), profile photo URL (\u2192 image), signature URL (\u2192 image). Submit to start the render."
      },
      "typeVersion": 1
    },
    {
      "id": "e35ba936-7413-4f8f-b943-21a2dbd0f6d2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 220,
        "height": 328,
        "content": "### Get Variables (optional)\nFetches the variable schema from the saved document \u2014 shows which placeholders exist and their types."
      },
      "typeVersion": 1
    },
    {
      "id": "a089948c-002a-4a9c-b93f-785850bed5da",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 292,
        "height": 328,
        "content": "### Render with Variables\nInjects: `recipientName` (string), `EmployeeID` (number), `awardMonth` (string), `achivements` (table), `profilePhoto` (image), `Signature` (image) \u2014 renders PDF."
      },
      "typeVersion": 1
    },
    {
      "id": "524a5060-9c72-4619-b6b9-93dde0be43cb",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -96,
        -192
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "41bd2c97-53f6-4324-bc07-591c1f561c0e",
  "connections": {
    "Create Project": {
      "main": [
        [
          {
            "node": "Create Document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Certificate Form": {
      "main": [
        [
          {
            "node": "Set Form Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Form Variables": {
      "main": [
        [
          {
            "node": "Get Document Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Document Variables": {
      "main": [
        [
          {
            "node": "Render Document with Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Create Project",
            "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

⚠️ Important: This workflow uses the Autype community node and requires a self-hosted n8n instance.

Source: https://n8n.io/workflows/13784/ — 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

Connection-Requests-Commenters. Uses formTrigger, n8n-nodes-connectsafely-ai. Event-driven trigger; 23 nodes.

Form Trigger, N8N Nodes Connectsafely Ai
General

Credentials Transfer. Uses form, httpRequest, executeCommand, readWriteFile. Event-driven trigger; 22 nodes.

Form, HTTP Request, Execute Command +2
General

[n8n] YouTube Channel Advanced RSS Feeds Generator. Uses formTrigger, httpRequest, respondToWebhook, stickyNote. Event-driven trigger; 20 nodes.

Form Trigger, HTTP Request
General

Keyword-Dm-Automation. Uses formTrigger, n8n-nodes-connectsafely-ai. Event-driven trigger; 20 nodes.

Form Trigger, N8N Nodes Connectsafely Ai
General

Waitlist Form Stored In Googlesheet With Email Verification Step. Uses googleSheets, emailSend, form, stickyNote. Event-driven trigger; 19 nodes.

Google Sheets, Email Send, Form +2