Generate documents from a Process Builder
- First click on Setup
- Then in the setup search bar search for "process builder" and click on it
- You should now be on the process builder page. Click on New to create a new process builder
- Name the process builder and set "The process starts when" to "A record changes" then click save
- 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.
- Click on "Add Criteria". In this example, we will generate a document when the Opportunity is in the "Prospecting" stage.
- Click Add Action
- Select an Action Type of Apex. Give the action name, then enter Create Renders under Apex Class
- 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
- For the templateId grab a template from the Inkit web app
- Then paste it into the templateId value
- Click Save, then click activate
Updated 10 months ago