Creating PDFs that respect privacy rules

Privacy rules are an important way of preventing users from accessing data they are not permitted to. Creating PDFs that respect privacy rules can be a challenge, but fortunately PDF Potion comes with built-in functionality to support this.


To create PDFs with PDF Potion, you'll need to follow the steps outlined in our quickstart guide. You can then follow the below steps to ensure your PDFs are compatible with privacy rules.


Using the Magic Link field

The 'Create PDF' workflow action has an input called 'Magic Login Link':

Adding a magic link to this field gives permission to PDF Potion to 'run as' a certain user. This means the PDF created will be according to all the privacy rules that user is subject to. To add a magic link to the 'Magic Login Link' field, follow these steps:


  • Add a 'Send Magic Login Link' action BEFORE the 'Create PDF' action

  • Set the:
    • 'Email' field to the 'Current User's email'
    • 'Link expiration' field to 1 (or any value between 1 and 24)
    • 'Navigate on login' field to index (or any page in your app)
    • 'Navigate on failure' field to index (or any page in your app)

  • Make sure the 'Just create link, don't send email' option is checked. This is VERY important. If you fail to check this box, your users will get a magic link email every time they create a PDF and the PDF will not be created successfully

Important: Creating PDFs with magic links will increase the time it takes to generate your PDF vs. not using a magic link. This is a tradeoff involved with using the magic link field.

  • When using the 'Create PDF' action, set the 'Magic Login Link' field to be equal to the Result of the 'Send magic login link' step:

If you're using the 'Create PDF' action in a backend workflow, you can send the magic login link to this backend workflow like you would with the ID.


The PDF you create will now respect the privacy rules of the user who is triggering the workflow action.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.