I was working as a System Administrator in a company that uses Salesforce CRM to manage event registrations.
The company wanted to automatically send a PDF to customers when they register for an event through a public site.
A record gets created in the Event Registration__c object after each registration. I need to add the registration details to the PDF and send it via email to the customer.
In this tutorial, we will learn how to create and send a PDF via email using Salesforce Flow. In that, I will explain the public site, how to create a PDF using a VisualForce Page and Apex, and how we can view it using Salesforce Flow.
Create and Send PDF Via Email Using Salesforce Flow
First, we will understand the event generation form and the public site where customers fill out the form for event registration.
1. Create a Form Using Screen Flow and Deploy it on a Public Site
First, let’s understand why we need to create the screen flow and add/deploy it on the public site.
We will create the screen flow to generate the event generation form, allowing customers to fill it out. The details provided by the customers will be recorded in the Event Registration__c custom object.

After creating the form, we need to share it with the external user. To give them access, we must add the form to the public site, allowing customers to fill out the form even if they don’t have Salesforce access.
I have written an article on how to create a screen flow and add it to the public site in Salesforce. You can check out: Create a Public Site and Add a Flow Component in Salesforce.
Below, I have provided a screenshot that shows the fields I added to the screen flow, which I then added to the public site.

When the customer fills in the details and saves the form, the record will be created in the Event Registration__c object.
