# Connecting OneDrive and emSigner & Configuring the Workflow

From the app: **Settings → Marketplace → OneDrive**.

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FWEpNNS7eMkEHNWEKQUqb%2Fimage.png?alt=media&#x26;token=7d1e84cf-3d8a-4bbe-97b6-e25fa1e42443" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2F8Cyk0QavZGvzAPDY7JSB%2Fimage.png?alt=media&#x26;token=87cfbb55-8c77-4288-94f0-42152f3abcfa" alt=""><figcaption></figcaption></figure>

#### **1.Connect OneDrive**

Click **Connect OneDrive** → enter a connection name (e.g. `Admin – ContosoSite`)->Click on **Connect** to follow Microsoft sign-in and grant Admin consent when prompted. Wait for the status to show **Connected**.

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FvCgGh3rkKhudC5SCBrfL%2Fimage.png?alt=media&#x26;token=ac82623b-e46b-46e8-835c-e4a50397714d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FrHirwhMRZCeWjnktvqvs%2Fimage.png?alt=media&#x26;token=37ed03a0-3fb8-47d7-9829-b3b29a1d19d2" alt=""><figcaption></figcaption></figure>

#### **2.Connect emSigner**

Choose **emSigner**, add appropriate connection name, select instance (demo, qa, production), paste **AppName** and **SecretKey**, then click on **Connect**.<br>

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FOIxLlnB66XQYc0TKVu4Y%2Fimage.png?alt=media&#x26;token=8b06d0d2-87f9-4a51-a6e1-74ff37b373bd" alt=""><figcaption></figcaption></figure>

#### **3.Setup Workflow**

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FGiXYHqNLtGzHpYaoKMrE%2Fimage.png?alt=media&#x26;token=330297df-c529-4a22-a0a0-b4d65b9a93d4" alt=""><figcaption></figcaption></figure>

**3.1 Set Source (Monitor Folder)- New file from OneDrive -> emSigner**

**Configure New File Trigger:** Folder to watch for new files & select the file type.

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FL9wo8iyr7ls0QwkhnJVt%2Fimage.png?alt=media&#x26;token=c2c9c7f5-459e-44c3-80b5-85772e9e0b55" alt=""><figcaption></figcaption></figure>

**Configure Find Document: In** Document ID  pass Id

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FOfmdE4r9vdLSewonaYc7%2Fimage.png?alt=media&#x26;token=97a389aa-b803-4aae-9044-d6f1608f6f99" alt=""><figcaption></figcaption></figure>

**Select Template & apply signatory participants:**

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2F0ZFkXrvA0W6hr3JFo5AX%2Fimage.png?alt=media&#x26;token=5ad5842d-6991-4fba-9aa8-400cc45b79f4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FOa8xFePupY462ZZC0RR1%2Fimage.png?alt=media&#x26;token=7afb5aeb-1491-49b6-83fb-0cea20aedef9" alt=""><figcaption></figcaption></figure>

Set this section as described below:

1. **Template Id**- available fixed form templates created in emSigner will be available here. user can choose appropriate template to be added in automation workflow.
2. **Initiator email**- email id associate with initiator emSigner.
3. **Reference No-** pass *name-Id* by default for document tracking
4. **Document name**- pass *name* by default for document tracking
5. **Base 64 file data-** pass Base 64 Data by default for document sharing format
6. **Request From- p**ass an appropriate value that needs to be added in signed file return folder configuration.
7. **Signature 1 Signatory email-** email id of signatory. in case of multiple signatories, all the details shall be added.
8. **Signature 1 Name-** Name of signatory. in case of multiple signatories, all the details shall be added.

Users can also configure advanced options such as enabling selfie capture or disabling participant notifications. Once all required parameters are provided, save the source file configuration to complete this step.

**3.2 Configure Destination (Return Signed File)- Send Signed Document to OneDrive**

**Document Completed** (monitor using the `Request From` value)

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FYQn6cdFTDz6a0fpXfgpH%2Fimage.png?alt=media&#x26;token=e9acad4f-bee8-4502-bf32-56818a91e700" alt=""><figcaption></figcaption></figure>

&#x20;**Find Document by Workflow ID**

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FKLEVAwREeCHtmrDPZTeh%2Fimage.png?alt=media&#x26;token=b5449b8a-1b14-49f2-b837-8c59ad87c05b" alt=""><figcaption></figcaption></figure>

**Upload File** to OneDrive (map Base64 signed content → New File Content; choose destination Site/Folder).<br>

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FBEt0Kz0Vgk2OCpE8gQJc%2Fimage.png?alt=media&#x26;token=8345d56d-63bb-49a3-bc5d-f65755781696" alt=""><figcaption></figcaption></figure>

**3.3 Enable Workflow**\
Save and enable the workflow.<br>

<figure><img src="https://1693119202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKpOPGIHdEkmaF2RQso%2Fuploads%2FKvtLNuT0aWThdFp0AY4U%2Fimage.png?alt=media&#x26;token=652a8e75-2e36-488a-aba0-4225e2f9f301" alt=""><figcaption></figcaption></figure>
