Automatically Generate Docs with Process Builder

With the launch of Salesforce's Process Builder, you can easily setup 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 setup the Process Builder for WebMerge, 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 "webm_WebmergeGenerator" as the Apex Class.

For the Salesforce Record ID, we're going to choose a "Reference" to our object ID. Then for the WebMerge 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:

Have more questions? Submit a request


  • Avatar
    Steve Jones

    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?

  • Avatar
    Matthew Souther

    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.

  • Avatar
    Kevin Mulligan

    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.

  • Avatar
    Rebecca Newton

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

  • Avatar
    Dave Stenfert Kroese

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

Please sign in to leave a comment.
Powered by Zendesk