Populate Signature In Word Template using Cloud flows
Let see how we can populate signature from CRM to Word Template using Cloud flows
First we need to understand how to create word template with Content Controls –
- Create Word Template with Content Controls
In Word Document, Select Developer Tab
Under the Developer Tab, Insert picture control
![File
Visual
Basic
Home Insert Design Layout References Mailings
Review View
Design Mode
t:] Properties
i p icture
Developer Help DocuSign
Oll Pause Reucvdim•_
Macros
Macro Security
Add-
Ins
Word COM
Add-ins Add-ins
XML Mapping
Mapping
Restrict
Editing
Picture Format
Document
Template
Templates](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-12-1024x503.png)
After Inserting a picture control, Click on Properties -> Name the Title and Tag according to your requirement.
In my case I have named title and Tag as Signature.
![File
Visual
Basic
Home Insert Design Layout
References Mailings
Aa Aa
Record Macro
Oil
Macros
A Macro Security
o
Add-
Ins
Word COM
Add-ins Add-ins
Review View
Design Mode
t] Properties
Controls
Epicture
Developer
XML Mapping
Mapping
Help DocuSign
Restrict
Editing
Picture Format
Document
Template
Templates
Content Control Properties
General
Signature
Signature
Tag:
Show
color:
Bemove content control when contents are edited
Locking
Content control cannot be deleted
Contents cannot be ed*ed](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-13-1024x563.png)
Now we have created a Word Document with content controls.
Upload this document in your SharePoint
2. Populate Signature Field using Cloud flows
- Signature field in CRM is pen control and when we run a flow, we get the field as below
![dita:.mage/ n -base](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-14-1024x247.png)
- Split the above field by “,”
Use below expression –
split(triggerOutputs()?[‘body/cf_signature’],’,’)
Output of above expression –
![](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-15.png)
- Initialize a variable of type Object and set the Object as shown below-
![Set variable
Image
• Value
-Scontent- type
- : •image/png•.
outputs(—) x](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-16.png)
Content is output of split,To get the output of split expression, use below
outputs(‘Compose_2’)[1]
Syntax – outputs(<stepname>)[position of array]
And save the object in a Compose
![](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-18.png)
- Populate a Microsoft Word Template
Add action “Populate a Microsoft word template” in flow
![Populate a Microsoft Word template
• Location
• Document Library
File
Signature
SharePoint Site - Communication site
Account
'Signature.docx
Outputs x](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-19.png)
- Create File in SharePoint
File Content of Create file step is the output of Populated Word Template
![Populate a Microsoft Word template
• Location
• Document Library
Signature
Create file
• Site Address
• Folder Path
• File Name
• File Content
SharePoint Site - Communication site
Account
'Signature.doa
Outputs x
Communication site - https://cloudfrontsenvdemo.sharepoint.com/
'account/'LAZ 1 SOOOD3A53070F
Account Name x .docx
Add dynamic content](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-20.png)
Input –
![T2 Systems
Account Account
Summary Project Price Lists
Parent Account
Ticker Symbol
Relationship Type
Price List
Signature
Acquisition Date
Acquisition Source
Primary Constituent
Type
Administrative
US Bill Rates
Assets and Locations
Field Service
Details
Scheduling
Related
Annual Revenue
Email
e Business
425-555-7825
Number of Employee](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-21-1024x509.png)
Output –
![File
Word T2 Systemsl AR - Saving...
Home Insert Layout References
Calibri (Body) v 11 v
Review
View
1
Help
Search
Editing v
p Find v
Reuse Files
Dictate](https://www.cloudfronts.com/wp-content/uploads/2021/01/image-22-1024x407.png)