Ghostsign Actions icon

Ghostsign Actions

Ghostsign automation helpers covering signing delivery, previews, embeddings, SMTP, AI fill, chat with project, and webhooks.

Templates › AI Draft Body

AI-generated

Summary

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"

Links

Discussion