AutoBridge

Issue a Permit PDF on Approval

When a permit is approved, stamp the issue and expiration dates, generate the permit document from a template, save it on the record, and email it to the applicant.


Prerequisites

  • An app that includes permitting (needed for Generate PDF).
  • A Building Permit entity with Status, Issued Date, Expiration Date, Applicant Email, and a Permit Document file field.
  • A PDF template for Building Permit in PDF Templates, which shows the issue and expiration dates.
  • A role with Automation Create and Edit permissions.

Steps

1

Create the automation and trigger

Click Add Automation, name it "Building Permit - Issue on approval". Choose When record is updated, Entity selection Building Permit, Watching Fields Status.

2

Continue only for Approved

Add IF/ELSE Conditions with one IF branch: Status is Approved. Add the remaining steps inside that branch.

3

Set the dates

Add Formula Builder "Set issued date": Record Id the trigger's Record ID, Formula TODAY(), Output Field Issued Date. Add a second Formula Builder "Set expiration": Formula ADD_DAYS(TODAY(), 365), Output Field Expiration Date.

4

Mark the permit issued

Add Update Record with Status set to Static Issued.

5

Generate the PDF

Add Generate PDF: Record Id the trigger's Record ID, PDF Template Selection your permit template, PDF Name "Building Permit" plus + Permit Number, Output Field Permit Document, Override Existing File on.

6

Email the permit

Add Send Email to + Applicant Email. In Attachments, choose Dynamic file upload and pick Generated PDF from the Generate PDF step.

7

Test

In a test environment, approve a test permit. Confirm the run succeeded, the dates and status are set, the PDF is on the record and shows the right values, and the email arrived with the attachment.


Example

OrderStepKey settings
1Trigger: When record is updatedBuilding Permit, Watching Fields: Status
2IF/ELSE ConditionsIF Status is Approved
3Formula BuilderTODAY() into Issued Date
4Formula BuilderADD_DAYS(TODAY(), 365) into Expiration Date
5Update RecordStatus: Issued
6Generate PDFTemplate: Building Permit; Output Field: Permit Document
7Send EmailAttachment: Generated PDF

Why the status moves to Issued

Setting Status to Issued is also a change to the watched field, so the automation starts again, but the IF branch only matches Approved and nothing else happens. The permit's status also tells staff and the applicant that the document is ready.


Common mistakes

  • Generating the PDF before the dates are set, so the document prints blank dates.
  • Leaving Override Existing File off, so re-approving a permit attaches a second copy.
  • Choosing Static file upload for the attachment instead of the generated PDF.

Related guides