Generate documents from a Process Builder

  1. First click on Setup
2168
  1. Then in the setup search bar search for "process builder" and click on it
  1. You should now be on the process builder page. Click on New to create a new process builder
  1. Name the process builder and set "The process starts when" to "A record changes" then click save
  1. Click "Add Object". Select Opportunity, then select for the process builder to be triggered when a record is created or edited, then click save. In this example, we will be creating our workflow on an Opportunity, but this will work on any object.
  1. Click on "Add Criteria". In this example, we will generate a document when the Opportunity is in the "Prospecting" stage.
2168
  1. Click Add Action
  1. Select an Action Type of Apex. Give the action name, then enter Create Renders under Apex Class
  1. Click on Add Row twice. One of the rows you should select recordId and the other row should be templateId. You should pass in Opportunity.Id as your recordId
  1. For the templateId grab a template from the Inkit web app
  1. Then paste it into the templateId value
  1. Click Save, then click activate