Automatically Generate Docs with Process Builder

With the launch of Salesforce's Process Builder, you can easily set up automation to merge documents when certain actions happen in Salesforce.

For example, you can automatically generate documents when new records are added to Salesforce such as a new client, or when certain fields are updated within a record.

To set up the Process Builder for Formstack Documents, go ahead and create a new process.  We're going to choose the Object that we want to monitor, then we're going to add an Action.  For the Action, we're going to choose Apex as the "type" then pick "Generate Document" as the Apex Class.

For the Salesforce Record ID, we're going to choose a "Reference" to our object ID. Then for the Formstack Mapping ID, we're going to enter the Salesforce ID for our Mapping (you can find this URL by going to the Edit Mapping page and looking in the URL of the page for "Id=...").

Here's what all those settings look like:

Was this article helpful?
3 out of 7 found this helpful


  • We're looking to retire our triggers and move to using process builder. We currently process multiple records into one combined pdf in Dropbox, using the webm.WebmergeGenerator.generateDocumentBatchCombined method. How can we process multiple records into a single pdf in dropbox with this?

  • The Apex class shows up for me as "Generate Document".

    Also, it's worth noting that you have to be looking at the WebMerge Mapping in Salesforce Classic to be able to see the record ID.

  • Is this apex class bulkified? We want to apply this process builder to generate merge documents for 3,000 records (or more) at one time.

  • I'm curious if this is bulkified as well for a large amount of records as well. Can you confirm? Thanks!

  • @rebecca. According to my feedback from Webmerge (
    Jill Hauck) their integration is bulkified

  • This runs fine when I make the field change that triggers the action, but if other users do it, the action does not run.

  • I'm having the same issue as Thomas Gelder, did anyone find a solution? @Thomas Gelder

  • Thomas and Esteban, what SF service account you using to connect to webmerge? it could be a permission issue.


Please sign in to leave a comment.