# Securely share a PDF document with anyone.

Objective

In this example we’ll be achieving the following objective with a fictional organisation named “10docs Ltd”, a large retailer.&#x20;

> The organisation needs to roll our a new Occupational Health and Safety policy. Its critical that everyone in the organisation receives the document, and that the organisation can demonstrate this happened for compliance reasons.&#x20;
>
> The tool needs to work with standard PDF documents, and browsers, and be available from any device.&#x20;
>
> *Note: This is not a digital signature tool. Whether it complies with your organisations legal requirements can only be assessed by your own legal counsel. The document is secured using a complex URL, however, anyone with the URL can access the document.*&#x20;

The tool should present the document like this:

<figure><img src="https://4289764834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKuT9a0u5GQxFZOgOhPe%2Fuploads%2FTG8ckCUDmj0Y5iUj71Wg%2Fcompliance-document-complete%402x.png?alt=media&#x26;token=efe7273f-e76b-4254-8947-46542ba9f690" alt=""><figcaption><p>Securely shared PDF document</p></figcaption></figure>

<figure><img src="https://4289764834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKuT9a0u5GQxFZOgOhPe%2Fuploads%2FtxyqICEjPcDZmazqElJh%2Fsecure-document-share-email%402x.png?alt=media&#x26;token=117062a6-9bd4-467f-bd7d-5ccd7075667e" alt=""><figcaption><p>Example of an email used to share the document</p></figcaption></figure>

## Setup <a href="#setup" id="setup"></a>

Power Automate is a growing platform, with an enormous number of first and third party connectors. Tendocs works with them all. To keep it simple, this example uses the following connectors:

1. SharePoint for Document storage
2. Tendocs for comparing the documents&#x20;
3. Tendocs for creating the document summarising the differences

**If you need any help along the way, feel free to reach out to the** [**support**](https://cal.com/tendocs) **team.**

### Assets <a href="#assets" id="assets"></a>

So you can test this yourself, exactly as described here, you can download copies of the sample documents used. Then, to get started, all you need is a SharePoint site with a Document Library where you can upload them.

1. [Occupational Health and Safety Policy Overview sample](https://assets.tendocs.com/website-assets/samples/occupational-health-safety-policy-overview.pdf).&#x20;
2. [Secure Document Email](https://assets.tendocs.com/website-assets/samples/SecureDocumentEmail.html) sample.

*Note: This document was created using our* [*Template Builder*](https://www.tendocs.com/builder/create)*, try it yourself.*&#x20;

### Preparing the basics <a href="#preparing-the-basics-images-and-documents" id="preparing-the-basics-images-and-documents"></a>

1. Create a new Document Library or use a Document Library in an existing site. Upload the document you would like to securely share.&#x20;

### Create the Flow

2. Then go to the Power Automate home page.
3. Create a new Flow “Instant Cloud Flow”, and then complete as follows.

<figure><img src="https://4289764834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKuT9a0u5GQxFZOgOhPe%2Fuploads%2FaIyCAVQkEBVGkLMBztAM%2Fnew-flow-compliance%402x.png?alt=media&#x26;token=2bb8b742-a37e-41ce-a40d-488b5cff066c" alt=""><figcaption><p>New instant cloud flow for compliance</p></figcaption></figure>

4. Add the "Get File Contents" action to retrieve the Occupational Health and Safety Policy.&#x20;

<figure><img src="https://4289764834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKuT9a0u5GQxFZOgOhPe%2Fuploads%2F7eMaIkIZivWNaKsnh17J%2Fget-file-contents-health-safety%402x.png?alt=media&#x26;token=7cc2500d-d3c5-4ca5-b960-1259da449daf" alt=""><figcaption><p>Get the contents of the Health and Safety Policy</p></figcaption></figure>

4. Add a "Get future time" action to define when the document should expire.&#x20;

<figure><img src="https://4289764834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKuT9a0u5GQxFZOgOhPe%2Fuploads%2F94CPqTDh8X2xozLh3UdL%2Fexpiry-time%402x.png?alt=media&#x26;token=aba6710c-a19c-47f9-9d8a-c163504358df" alt=""><figcaption><p>Add future time for Expiry</p></figcaption></figure>

Once a document expires, then it is not longer available for viewing. All documents must have an expiry time.&#x20;

5. Add the "Securely share a PDF document" action from the Tendocs connectors.&#x20;

<figure><img src="https://4289764834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKuT9a0u5GQxFZOgOhPe%2Fuploads%2FE66nofcCvXuOkElydUui%2Ftendocs-securely-share-document%402x.png?alt=media&#x26;token=c9dfd189-6036-4ce6-9c08-9b123af8da47" alt=""><figcaption><p>Securely share a PDF document</p></figcaption></figure>

There a number of options to configure, the below table will step you through each of them.&#x20;

#### Required Properties

<table><thead><tr><th width="286">Option</th><th>Description</th></tr></thead><tbody><tr><td>PDF Document</td><td>This is the File Contents of the PDF document that you would like to securely share. </td></tr><tr><td>Document Title</td><td>This is the "Title" that is displayed at the top of the web page presenting the document to the recipient. </td></tr><tr><td>Document Introduction</td><td>This is some introductory text that is included above the file. It should provide the recipient with some background and instructions.</td></tr><tr><td>Recipient Email</td><td>Email address of the recipient. Included so that the recipient can validate they are the correct recipient. </td></tr><tr><td>Recipient First Name</td><td>The first name of the recipient. This is use to validate that the recipient is correct, and also used in the "Sign" functionality. </td></tr><tr><td>Recipient Last Name</td><td>The last name of the recipient. </td></tr><tr><td>Expiry Date</td><td>The date after which the document will no longer be accessible.</td></tr><tr><td>Organisation</td><td>The name of the organisation who has sent the document to the recipient. This could be a company name, department, or anything else that makes it clear to the recipient who sent the document. </td></tr><tr><td>Organisation Email</td><td>The email address of the organisation that could be used for any questions or concerns. </td></tr><tr><td>Organisation Owner</td><td>The name of the person responsible for the process that has sent the document to the recipient. </td></tr></tbody></table>

#### Optional Properties

The following properties are available after clicking "show all" in the Tendocs action.&#x20;

<table><thead><tr><th width="291">Option</th><th>Description</th></tr></thead><tbody><tr><td>Document Logo</td><td>Full URL to a logo that is then displayed to the left of the document title. </td></tr><tr><td>Checkbox</td><td>If you would like a checkbox that requires the recipient checks then you can include a text description of the text box here. For example "Tick this box when you have read the document". The document cannot be "Finished" until it is checked. </td></tr><tr><td>Sign</td><td>Requires the user to enter their full name into a text box below their full name. The document cannot be "Finished" until this is done. This is NOT a legal digital signature. </td></tr><tr><td>Organisation Website</td><td>A URL to a web site of the organisation. This could be internal or external, and could provide more details on the process to the recipient. </td></tr><tr><td>Organisation Owner Title</td><td>The job title of the person responsible for the process that has sent the document to the recipient.</td></tr><tr><td>Comments</td><td>Determines whether or not you would like to include the ability for the recipient to add a comment to the document. </td></tr><tr><td>Project ID</td><td>A unique identifier for this process. Enables you to tag related shared documents into a single process so that they can be included together in reporting. </td></tr></tbody></table>

Configuring these options is all that is needed to create the secure document share page. The result of the action is the secure URL. This can be sent to the user via a number of channels, including Microsoft Teams, Email or messaging services. The document is only as secure as the URL, anyone with the URL will be able to access the document until the document expires.&#x20;

Whenever the document is accesses an Activity record is created. This records the time, IP address and an approximate location. This is displayed on the page so the recipient can validate that only they have accessed the document. "Reporting" an issue will send a notification to the Organisation Owner.&#x20;

6. Share the secure document web page via email by adding a "Send and email" action. The "Secure Document Email" sample in this guide is an example of a HTML formatted email. You can copy and paste this into the standard Outlook Action after toggling the "Code view" button, which is the last button on the toolbar.&#x20;

<figure><img src="https://4289764834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKuT9a0u5GQxFZOgOhPe%2Fuploads%2FzVnj6DmDehVwscVciV38%2Fsend-email-action%402x.png?alt=media&#x26;token=84660288-0065-4b27-b8b6-e02996bf75eb" alt=""><figcaption><p>Send email action</p></figcaption></figure>

## The Final Result

The final result is an email sent to the recipient, with a URL that takes them to a page that presents the secure document as configured in the Tendocs action. &#x20;

<figure><img src="https://4289764834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKuT9a0u5GQxFZOgOhPe%2Fuploads%2Fg1Gmy11POvH2G4rBMsEa%2Ffinal-result-compliance-document%402x.png?alt=media&#x26;token=6524c653-ba9e-4969-983a-3bb05c11ccab" alt=""><figcaption></figcaption></figure>

This is just a start, and you can add additional features to do things like:

1. Combine this functionality with [Tendocs templating](https://support.tendocs.com/how-to/create-documents-with-power-automate) and Excel to automate the generation and sending of individually personalised documents in bulk.&#x20;
2. Convert documents into PDF automatically using the Tendocs Convert action.&#x20;
3. You can host this service on your own domain for even better security, reach out to our [support team](https://cal.com/tendocs).&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.tendocs.com/how-to/securely-share-a-pdf-document-with-anyone..md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
