Quick overview
This workflow collects an uploaded XLSX list of franchise owners via an n8n form, then uses Google Drive and Google Docs to generate a personalized letter for each row and saves the resulting PDF files back to a Google Drive folder.
How it works
- Receives a form submission with an uploaded .xlsx file containing franchise owner details.
- Extracts rows from the Excel file into individual items.
- Iterates through each row in batches to process one franchise record at a time.
- Copies a Google Docs template in Google Drive and names the new document using the franchise name.
- Replaces placeholders in the copied Google Doc (owner, franchise, city, fee, and today’s date) with values from the current Excel row.
- Downloads the updated Google Doc as a PDF.
- Uploads the generated PDF to the target Google Drive folder and continues until all rows are processed.
Setup
- Connect Google Drive OAuth2 credentials and set the template file ID and destination folder in the Google Drive copy/upload steps.
- Connect Google Docs OAuth2 credentials and ensure the template contains the placeholders (for example: [Dear Owner], [Franchise], [City], [Fee], [Date Today]).
- Ensure the uploaded XLSX has columns matching the workflow’s expected field names (Franchise_Owner, Franchise_Name, City, Franchise_Fee) and upload it via the form trigger.