Actions17
- AI › Chat With Project
- AI › Fill Variable
- AI › Research With Project
- Embeddings › Ingest Chunk
- Integrations › Upsert SMTP
- Integrations › Upsert Webhook
- Preview › Cancel Review Round
- Preview › Render Doc
- Preview › Send Review Links
- Signing › Resend Completed PDF
- Signing › Send Invite
- Signing › Send Reminder
- Templates › AI Draft Body
- Templates › Clone Library Template
- Templates › Ingest From Google Doc
- Templates › Publish Draft To Doc
- Workspace › Clone Workspace
Templates › AI Draft Body
AI-generatedSummary
Draft an AI-generated document body for a project, optionally targeting an organization and providing prompt messages.
Inputs
- aiDraftMode — Selects the AI draft mode; choose 'organization' or 'admin_library'.
- aiDraftDocumentBody — Body text for the AI-generated document.
- aiDraftMessagesJson — JSON array of AI conversation messages, e.g. [{"role":"user","content":"Refine intro"}]
- organizationIdUpsert — Choose an organization from the list or specify an ID via expression.
Output shape
Array of objects, each containing the API response JSON for the operation
Multiple items may be returned; errors are included as an error field when continueOnFail is enabled.
Examples
Example 1: Generate a draft document body for the selected organization using explicit prompts
aiDraftMode = organization, aiDraftDocumentBody = "\n\n# Proposal\n\n...", aiDraftMessagesJson = '[{"role":"user","content":"Write a concise executive summary"}]', organizationIdUpsert = "Acme Corp"
Example 2: Use admin library mode to draft content for the admin library
aiDraftMode = admin_library, aiDraftDocumentBody = "\n\n# Template\n\n...", aiDraftMessagesJson = '[{"role":"user","content":"Create a marketing tagline"}]', organizationIdUpsert = "AdminOrg"
Example 3: Combine custom prompts with AI draft to refine content
aiDraftMode = organization, aiDraftDocumentBody = "\n\n# Draft\n\n...", aiDraftMessagesJson = '[{"role":"user","content":"Make this more persuasive"},{"role":"assistant","content":"Sure, here's a stronger version"}]', organizationIdUpsert = "MyOrg"