← All Foundational Objects/Prefix: temp_13 Fields
AI-Agent-First Documentation
/SKILL.md
Prompt your Agent: "Query and mutate records on the 'template' table (ID prefix 'temp_') using platform.records and platform.query.sql, ensuring all lookup fields use plain string IDs."

Template (template)

Templates are reusable pieces of copywriting that can be applied in a variety of ways.

Python SDK & PlatformContext Example
# 1. Query template via parameterized ANSI SQL
rows = await platform.query.sql("SELECT id, name, created_date FROM template ORDER BY created_date DESC LIMIT 25")

# 2. Create template record (Generates 'temp_...' Base62 ID)
created = await platform.records.create("template", [
    {"name": "Example Template"}
])
Field API NameType / FormatLookup TargetFlagsDescription
idstring—requiredId
namestring—requiredName
created_datestringdate-time—Created Date
modified_datestringdate-time—Modified Date
created_bystringlookup→ user (string ID)requiredsystemCreated By
modified_bystringlookup→ user (string ID)requiredsystemModified By
bodystringtext-area—Body
typestringenum—requiredType
subjectstring—The subject of the template, especially for emails
querystringtext-area—A SQL query to populate dynamic data
functionstringlookup→ function (string ID)A function to dynamically fetch merge data
codejsonjson—The code blocks associated with the template from the builder
shared_withlistsharing—systemShared With