Preview email template
lnkdrp_preview_email_templateShows how a template reads, with no recipient made: a saved template (templateId) or unsaved template fields (format, subject, body and tags). Built-in tags: contact.firstName: The first word of the contact's name. (e.g. Ken); contact.name: The contact's name: the name the team gave them, else the name they gave. (e.g. Ken Lee); contact.lastName: Everything after the first word of the contact's name. (e.g. Lee); contact.email: The contact's email address. (e.g. ken@example.com); contact.company: The domain of the contact's address; empty for a webmail address such as gmail.com. (e.g. acme.com); contact.note: The team's note on the contact, as written; it goes into the email exactly as it is. (e.g. Met at the October demo day.); contact.tags: The contact's tags, comma-separated. (e.g. Investor, Seed); contact.firstSeen: When LinkDrop first saw the contact, e.g. October 22, 2026. (e.g. October 22, 2026); contact.lastSeen: When the contact was last seen, e.g. October 22, 2026. (e.g. October 22, 2026); contact.visits: How many times the contact has viewed, as a number. (e.g. 3); link.url: The recipient's own LinkDrop link to the document or project; one link per person, reused on every render. (e.g. https://lnkdrp.com/s/example); link.password: The password of the recipient's own link; empty when the link has none. Filled when the email is sent and for a member signed in to the app; a connected agent sees [password]. (e.g. chris58); document.title: The document's title (document emails only). (e.g. Q3 investor update); project.name: The project's name (project emails only). (e.g. Series A data room); sender.name: The name of the member the email is from. (e.g. Chris); sender.firstName: The first word of the sender's name. (e.g. Chris); sender.email: The sender's LinkDrop account email (not necessarily the Gmail address the email goes out from). (e.g. chris@example.com); workspace.name: The workspace's name. (e.g. LinkDrop). mode tags (the default) shows each tag as written ({{contact.firstName}}) unless values gives it one; mode examples shows each tag's example (the template's own for a custom tag, else the built-in one, else the tag as written). contactId (with templateId) shows the saved template as that contact's email: their details, the sender's and the workspace's, {{link.url}} as a placeholder (their own link is made when the email is rendered) and {{link.password}} as [password]; a contact this person cannot see is contact_not_found. dryRun true adds the dry-run band and the [Dry run] subject marker; dry runs are on Pro and up, and on Free it answers plan_limit with details.upgradeUrl. Nothing is stored, no link is made and nothing is charged. Returns subject, text, html, missingTags (required tags with no value), usedTags, errors: what saving this template would refuse, as { code, message } (unsaved fields' link-like custom tag is custom_tag_is_link), warnings: what saving it would note without refusing (body_self_centred), missing (for a contact: the tags that come out empty or as their fallback, { key, reason }), contact (the contact previewed as; name and email wrapped as untrusted content) and dryRun. html carries the template's align. A preview page with an address of its own comes from lnkdrp_render_email, which renders for a real contact and may create that contact's link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Unsaved template fields: the body, with tags. | |
| mode | No | tags (the default): each tag as written; examples: each tag's example. | |
| tags | No | Tag declarations: every {{custom.x}} used, with its description; a built-in may be listed to override its description or required. | |
| align | No | Where an html email sits in the reader's window. left (the default): nothing is added around the body, so it shows flush left. center: the body is placed in a centred column at most 600px wide. The text version is unaffected. | |
| links | No | Unsaved template fields: the documents the body places with {{link.<key>}}, each drawn by its title. | |
| dryRun | No | true: with the dry-run band and the [Dry run] subject marker (Pro and up). | |
| format | No | text: a plain-text body (an HTML version is derived from it). html: an HTML body (a text version is derived from it). | |
| values | No | Values to show for tags, by key: { "custom.round": "Series A", "contact.firstName": "Ken" }. Up to 30 keys; custom tags only with contactId. | |
| draftId | No | A draft of the saved template (templateId) to preview. | |
| subject | No | Unsaved template fields: the subject line, with tags. | |
| contactId | No | Preview a saved template (templateId) as this contact's email, from lnkdrp_list_contacts. | |
| templateId | No | A saved template to preview; or give format, subject and body instead. |