Today, processing online payments for your business couldn’t be easier.  With popular payment services such as Recurly, you can integrate payments and recurring subscriptions into your website in a matter of minutes.

With their hosted payment forms, automated customer communications, and flexible payment gateways, Recurly can increase your subscription and retention rates while saving you the time and effort of building out your own billing system. 

Another big part of the payment/customer communication is the paperwork.  With Formstack Documents you can automatically generate receipts, contracts, letters and more with data from Recurly.  Recurly already has a way to customize receipts and invoices, so in this example we’re going to focus on a different angle.

In this example, we’re going to show you how you can automatically generate (and mail) a welcome email to new customers that are added to your Recurly account.  We’ll be using our friends over at Zapier to send the customer information to Documents and then we’ll use Lob to print and mail the letter.

To get started, we’re going to setup the template for our letter using a Word document.  This document looks just like any other letter that you’d write, except for the merge fields that look like {$FirstName}, {$City}, etc.  The merge fields will be replaced with your customer’s information when the letter is populated (merged).

Here’s what our letter looks like:

Once we have our letter finished, it’s time to upload the template to Documents.  From the Documents page in Formstack Documents, click the New Document button and enter a name for the document.  On the next step pick I have a document I would like to use and then pick the file from your computer.


After you’ve uploaded your letter, you’re going to be taken to the Settings tab where you can modify settings like the type of file that is generated and the name of the file.  For this example, we’re going to generate a PDF and then we’re going to enter our customer’s name in the file name so it is easy to keep track of later.


Next, we’re going to setup the integration with Lob so that our letter will automatically be sent over to Lob to be printed, stuffed in an envelope, and mailed.  Head over to the Deliver tab and click the New Delivery button.  In the popup, select Lob from the list of deliveries and you should see all of the settings for the integration.

You’ll need to enter your Lob API Key and then you’ll need to define the To and From address.  For the To address, we’re going to use merge fields from our letter and then for the From address, we’re going to select << Other >> from the dropdown and then type in our address (not a merge field).


Great work!  We’re ready to setup the integration with Zapier so that when we get a new customer in Recurly, that information will automatically be passed along to Documents (to our letter template) to be merged.

Inside Zapier, click the New Zap button.  For the Trigger app, you’ll want to select Recurly and then select the New Account trigger.


On the next step, Zapier is going to have you authenticate your Zapier account.  Follow those steps and you’ll be taken to a page to pull in a sample account.  Fetch that sample account and make sure everything is working correctly.  Then, click the Finish button.

Next, you’re going to select Formstack Documents as the action app and then select Create Document Merge as the action.

After you authenticate your Documents account, you’re going to be taken to a page where you’ll see a list of your documents.  Go ahead and pick the letter from the dropdown.

Once you pick the letter document, Zapier is going to load a list of the merge fields that are in that document (or in your Lob delivery).  For each of those merge fields you need to select the corresponding Recurly field.  This tells Zapier how to send over your data to make sure it is put in the right spot on your letter. 

Once you’ve mapped all of your fields, follow the steps to submit a test to make sure everything is working properly, then finish the Zap and turn it on.

You’re now ready for a real test!  Go into Recurly and submit a new account.  That customer’s information will be automatically sent over to Documents, the letter will be generated, then sent off to Lob for printing and mailing!

Here’s what our letter looked like:

Congrats, you’re all done!  You can now automatically generate all types of document from Recurly.  Can you think of any other ways that you could use WebMerge to simplify your paperwork process?

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.