Relay.app Docs
  • Getting Started
    • Introduction
    • Helpful Resources
    • FAQ
  • Triggers
    • Triggers 101
    • Webhook Trigger
    • Mailhook Trigger
    • Manual Trigger
    • Scheduled Trigger
    • Batch Triggers
    • RSS Trigger
  • Actions in Apps
    • App Actions 101
  • Creating Templated Documents
  • DATA
    • Step Outputs
    • Find Steps
    • Lists (Arrays)
    • Inspecting Run Data
  • AI
    • AI Steps
    • Human-in-the-Loop AI reviews
    • AI Credits
    • Agentic Tool Use
    • Knowledge
    • Prompt Templates
    • Prompt Tips
    • Audio Transcription
  • Built-in actions
    • Transform Data
    • Create Constants
    • Search Google
    • Scrape Text from Website
    • Custom HTTP Requests
    • Run Custom Code (JS)
  • Flow Control
    • Paths
    • Iterators
    • Wait steps
    • Sequences
  • Human-in-the-Loop
    • Human-in-the-Loop Steps
    • AI output reviews
    • Roles
  • Workflows
    • Folders and Organization
    • Sharing Workflows
    • Headings
    • Notes
  • TEMPLATES
    • About Workflow Templates
    • Using a Template (Importing)
    • Creating a Template (Exporting)
  • Workspace
    • Step & AI credit usage
    • Billing and Plans
    • Workspace administration
    • (Sharing) App Accounts
  • App-Specific FAQs
    • Airtable
    • Attio
    • Cal.com
    • Coda
    • DeepSeek
    • Discord
    • Fireflies
    • Google AI Studio (Gemini)
    • Gmail
    • Google Docs
    • Google Drive
    • Google Sheets
    • Microsoft Permissions
    • Microsoft Outlook Mail
    • Notion
    • OpenAI
    • OpenPhone
    • Slack
    • X (Twitter)
    • QuickBooks Online
Powered by GitBook
On this page

Was this helpful?

Creating Templated Documents

Last updated 14 hours ago

Was this helpful?

A common use case for AI agents is to create nicely fomatted Documents, Slides, and Spreadsheets. This is useful for template contracts, proposals, presentations, posters, and much more.

The general construct for all of these is called "Copy and Fill in {{Placeholders}}", and this article will show you how to do it.

Copy Doc and Replace Placeholders

If you want to create a template of a Google Doc or a PDF, this is the way to do it.

First, you need to create your template Google Doc. In that Google Doc, you can use any styling and formatting you want. The most important thing you need to do in that document is to set up the "placeholders" that will be dynamically replaced in your workflow. Each placeholder will be added with {{ }} curly braces around it. Here's a screenshot of a very simple template document.

Now, you can use the "Copy doc and fill in {{placeholders}}" automation.

When you create the step, you'll see an option to fill in the value for each placeholder dynamically based on an existing value in your workflow.

Finally, when you run the workflow, you'll get a new document with the placeholders replaced:

Simple template document with 3 placeholders: Title, Author, and Date
Navigating to Copy doc and fill in {{placeholders}} in the step menu
Filling in the placeholders based on the values from the trigger.
Starting a sample manual trigger to fill in placeholders.
The newly created document with placeholders replaced