Send branded order confirmation PDFs from Cognito Forms

Every new Cognito Forms submission turns into a branded PDF, files itself in Google Drive, and emails the customer a confirmation in seconds.

Deterministic Code
Cognito FormsGoogle DriveGmailOperationsFinanceDocument ProcessingEmail Automation
PromptCreate

Build me a code workflow that runs every time a customer submits one of my Cognito Forms forms (for example an order form, event registration, waiver, or intake form) and produces a branded confirmation PDF, files it in Google Drive, and emails it to the customer. Every step is deterministic with structured inputs, so this should be a code workflow with discrete nodes, not an agent.

Trigger: a webhook from Cognito Forms fired on Entry Submitted for the specific form I configure. The webhook payload includes the entry number, the form internal name or id, and the entry field values (including the customer's email field, name, and any order details).

Step 1, generate the PDF. Use Cognito Forms Get Document with the form name or id, the entry number from the webhook, and the id of a preconfigured document template I have already set up on the form. The response is the PDF bytes. Name the file using the form name and entry number, for example OrderForm-1234.pdf.

Step 2, file the PDF in Google Drive. Use Google Drive Create Folder if needed to lazily create a records folder named after the form and the current date (for example /Confirmations/OrderForm/2026-05-18), parented under a root folder id I provide in config. Cache or look up the folder by name so we do not create duplicates. Then use Google Drive Upload File (Multipart) to upload the PDF into that folder with the file name from step 1 and mime type application/pdf. Keep the returned Drive file id and webViewLink for step 3.

Step 3, email the customer. Use Gmail Send a Message to the recipient address pulled from the configured email field on the entry. Subject should be short and transactional, for example "Your confirmation for {form name} #{entry number}". Body should be a short branded message confirming receipt and referencing the entry number. If the PDF is at or under about 20 MB, attach it directly to the email. If it is larger, skip the attachment and instead include the Google Drive webViewLink in the email body so the customer can open it from Drive.

Config I should be able to set per deployment: the Cognito Forms form name or id, the document template id, the email field name on the form, the root Google Drive folder id, the folder naming pattern (default: {formName}/{YYYY-MM-DD}), the email subject template, the email body template, optional CC or BCC addresses (for example a finance@ inbox for paper trail), and the attachment size threshold (default 20 MB).

Error handling: if Get Document fails (404 entry, 403 permissions, or 5xx), retry with exponential backoff a couple of times, then surface a clear error. If the Drive upload fails, retry similarly. If the Gmail send fails, retry, and if it still fails do not lose the PDF: it is already in Drive, so log the Drive link so a human can follow up. Treat the webhook as idempotent on entry number so a duplicate delivery does not produce duplicate emails.

Credentials: Cognito Forms API key, Google Drive OAuth, Gmail OAuth. The Drive and Gmail credentials can be the same Google account.

What does this prompt do?

  • Watches your Cognito Forms form for new submissions and reacts the moment a customer hits submit.
  • Builds a branded PDF from the entry using a document template you already designed in Cognito Forms.
  • Saves a copy of the PDF in a dated Google Drive folder so finance and operations always have a clean paper trail.
  • Emails the customer a short confirmation from Gmail with the PDF attached and the entry number in the subject line.

What do I need to use this?

  • A paid Cognito Forms account (Pro, Team, or Enterprise) with API access enabled.
  • A document template configured on the form you want to automate.
  • A Google account so we can save the PDF in Google Drive and send the email from Gmail.
  • The Google Drive folder where confirmations should live, or let us create one named after the form.

How can I customize it?

  • Point it at a different form, or run it across several forms with one workflow per form.
  • Change the Google Drive folder structure, for example one folder per month, one per product, or one per region.
  • Tweak the email subject and body, choose which form field holds the customer's email, and decide whether to attach the PDF or link to it when files get large.

FAQs

Does this work for order forms, registrations, and waivers?
Yes. Any Cognito Forms form with a document template attached works the same way, so order forms, event registrations, waivers, and intake forms all fit this pattern.
What if the PDF is too big to attach to an email?
You can switch the email step to send a Google Drive link instead of an attachment. Gmail caps attachments around 25 MB, so larger PDFs are usually shared as a link to the saved Drive file.
Can I send the confirmation to someone other than the customer?
Yes. You pick which field on the form holds the recipient address, and you can also copy your finance or operations inbox so the team gets the same paper trail.
Will this fire on every submission?
Yes. Cognito Forms fires a webhook the moment a customer submits, and the workflow runs end to end in seconds, so customers get their confirmation almost instantly.
Do I need a paid Cognito Forms plan?
Yes. The free plan does not include API access. You need a Pro, Team, or Enterprise subscription for this workflow to run.

Related templates

Trace phishing emails to the sending IP and report abuse

Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.

AbuseIPDB
Gmail
Slack
Agentic Task
Weekly flight risk brief for trips your team already booked

Every Thursday, rank your team's upcoming flights by how likely they are to run late, and email the fixes while changes are still cheap.

AeroDataBox
Airtable
Gmail
Agentic Task
Warn customers before their saved card expires and billing fails

Each month, spot the saved cards about to expire, email the customers still on recurring billing, and rank the revenue at risk in Slack.

Authorize.Net
Gmail
Slack Bot
Agentic Task
Auto-correct address typos and hold the orders you can't fix

Every weekday morning, harmless address typos get fixed on unshipped orders, and anything undeliverable is held while the customer confirms it.

Shippo
Shopify
Gmail
+1
Agentic Task
Catch bad shipping addresses before you buy the label

Every weekday morning, unfulfilled orders get an address check: harmless typos fixed automatically, risky addresses held with a note to the customer.

Shippo
Shopify
Gmail
+1
Agentic Task
Turn emailed vendor invoices into draft Zoho Books bills

When an invoice lands in your inbox, we read it, match the vendor, and file a draft bill in Zoho Books for someone to approve in Slack.

Gmail
Zoho Books
Slack
Agentic Task

Stop emailing order confirmations by hand.

Connect Cognito Forms, Google Drive, and Gmail once, and every new submission turns into a filed PDF and a customer email automatically.