How to send a PDF via email

How to generate a PDF and send it via email from your bubble in 8 steps:

  1. Install the PDF Creator plugin

2023-04-14 19.58.41

  1. Drop the PDF Creator element on the page that has the element you want to PDF

2023-04-15 11.31.04

  1. Ensure the “Expose the option to add an ID attribute to HTML elements” option is ticked under Settings → General

2023-04-14 20.02.28

  1. Add an ID Attribute to the element you want to PDF and send via email. In this instance, we’re adding an ID Attribute (“table”) to a repeating group that has data on a number of employees in a company.

2023-04-15 11.37.06

  1. Trigger the “Generate a PDF Creator” workflow action (in this case we’re doing it via a button)

2023-04-15 11.40.53

  1. Add the ID Attribute from step 5 to the ID Attribute field of the workflow action and set the Scale value (this sets the tradeoff between PDF quality and file size/time to generate - I suggest starting with a value of 2).

2023-04-15 11.44.02

  1. Create another workflow on the same page that uses the “A PDF Creator recorded” event that comes with the plugin. This is a custom event that gets triggered anytime you create a PDF.

2023-04-15 11.54.02

  1. Add a workflow action that sends an email when the “A PDF Creator recorded” event is triggered. Set the recipients email address and click the “Attach file” button. Set the file to be “PDF Creator A’s url”

2023-04-15 13.02.35

And that’s it! Whenever you trigger the “Generate a PDF Creator” workflow, you’ll be sending an email from your bubble app with the PDF attached.

2023-04-15 13.04.44

2023-04-15 13.05.15

I’ve made the editor of the app that was used for this tutorial open for everyone to view - you can see it here.

Other resources

  • I have a detailed video tutorial on how to use the PDF Creator plugin. It shows you the various ways you can use the plugin to create PDFs.
  • I also built a demo app that goes through all the ways you can use the plugin. You can view the app at this link. The editor behind the app is also available to view at this link.

  • The PDF Creator plugin page is available at this link

3 Likes