Microsoft Flow

With a service like Microsoft Flow, you can automatically connect your favorite cloud apps with Formstack Documents to populate your templates.

In this example, we’re going to show you how to automatically generate an invoice from Microsoft Dynamics CRM and save the document in SharePoint.

To get started, we’re going to set up the template for our invoice using the online document builder in Formstack Documents.  From the Documents page in Formstack Documents, click the New Document button and enter a name.  On the next step, pick the Build Your Own document type and then continue.
 


Next, we’re going to set up our invoice template in the document builder.  We’re going to add our logo, contact information, and then for the spots that we want to insert our customer/invoice details, we’re going to use merge fields that look like {$CustomerName}, {$Address}, {$Amount}, etc.

Here’s what our invoice template looks like:
 


After we’re finished our template and saved it, we’re going to move on to the Settings tab where we can modify various options like the type of file that’s generated and the name of the file.  For this example, we’re going to produce a PDF version of the invoice and we’re going to include the name of our customer in the file name.
 


Next, we’re going to set up the delivery of our document so that it is automatically emailed to our customer (in addition to saving it in SharePoint which we’ll do in a little bit).  From the Deliver tab, click the Edit button on the default email delivery.

For the To address we’re going to use a merge field for the customer’s email address.  If you don’t have a merge field in your template, choose the <<Other>> option then enter something like {$EmailTo}.  Feel free to edit any of the other settings.
 


After we have saved our email delivery, we are done with the setup process inside WebMerge and we’re ready to integrate with Dynamics CRM using Microsoft Flow.

Inside Microsoft Flow, we’re going to create a New Flow.  For the Trigger, we’re going to choose Dynamics CRM and then the “When a record is created” option.
 


Once you have logged into your Dynamics account, Flow will have you pick your organization and then the object that you want to monitor.  We’re going to look for new Opportunities.
 


Next, we’re going to set up the action of our Flow.  We’re going to choose Formstack Documents then Merge Document as the action.
 


After we’ve authenticated our Formstack Documents account, Flow is going to load a list of the documents in our Formstack Documents account.  Go ahead and select the Invoice template that you just set up and then flow will load a list of the merge fields in your template.

For each merge field, you need to pick the corresponding fields from Dynamics CRM.  This tells flow how to send the data over to Formstack Documents so that it gets populated in the correct spot on your template.
 


After you’ve matched up all of your merge fields, we’re going to add one more option so that the file is automatically saved in SharePoint.

Click the Add Action button and then choose SharePoint from the list.  After your authenticate your SharePoint account, you’ll have to pick the folder that you want to save your file in.
 


After you have saved your SharePoint action, go ahead and save your flow.  You’re ready for a test!  Login to Dynamics CRM and then add a new Opportunity.  Flow will detect this new opportunity and send the data over to Formstack Documents.  Your invoice will be generated and then saved in SharePoint.

Here’s what our invoice looked like:
 


Congrats, you’re all done!  You can now automatically generate all types of documents and save them in SharePoint.  Can you think of any other ways you can use Formstack Documents to simplify your paperwork process?
 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk