Generate email
generate_emailRender one free branded email draft in a brand kit and save it to the user's files: any email the user describes, from a cold intro or a follow-up to a newsletter, an invitation, a launch note or a receipt. Nothing is sent. Drafts are limited to 20 per day. Templates: 'letter' takes preheader, signoff, footer_note; 'announcement' takes headline (required), preheader, cta_label, cta_url, signoff, footer_note; 'newsletter' takes issue_label, headline (required), preheader, cta_label, cta_url, signoff, footer_note; 'invitation' takes invite_label, event_name (required), when, where, preheader, cta_label, cta_url, signoff, footer_note; 'notification' takes status_label, headline (required), cta_label, cta_url, footer_note; 'onboarding' takes headline (required), preheader, cta_label, cta_url, signoff, footer_note; 'receipt' takes headline (required), order_label, order_date, cta_label, cta_url, footer_note. Pick the template whose shape fits the job and write the subject, props and body yourself in the user's voice; the template is a layout, not a limit on what the email can say. Write the body as markdown (paragraphs, lists, links, tables) or as blocks, never both. header 'band' paints the header in the brand color, 'plain' keeps it white; align is left or center; both default to the template's layout. Leave brand_kit_id out to use the space's default brand. The draft carries a YouSpot watermark until the user unlocks the clean email for 1 credit from the card, and Gmail drafting is refused until they do. Returns the artifact id; call draft_email_in_gmail with it once it is unlocked. Do not call this again to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| align | No | ||
| props | No | Text fields for the template, all strings. | |
| blocks | No | The body as blocks. | |
| header | No | ||
| subject | No | The subject line. | |
| markdown | No | The body as markdown. | |
| template_id | Yes | ||
| brand_kit_id | No | A brand_kit_id from list_brand_kits. | |
| saved_template_id | No | A saved_template_id from list_templates; its inputs seed the ones you pass. |