Actions5
Create Document
AI-generatedSummary
Create a new Google Docs document from Markdown content in a specified Google Drive and folder, optionally using a template with placeholder replacement and page break settings.
Inputs
- driveId (required) — The Google Drive where the document will be created. Can be selected from a list, provided as a URL, or entered as an ID.
- folderId (required) — The folder within the chosen Drive where the document will be created. Can be selected from a list, provided as a URL, or entered as an ID.
- markdownInput — The Markdown content to convert and insert into the new document (can be left empty if template is used without Markdown content).
- documentTitle — Title for the new Google Docs document; defaults to 'Untitled Document' if not provided.
- additionalOptions.templateSettings.templateFolderId — The folder containing Google Docs templates to pick a template document from.
- additionalOptions.templateSettings.templateDocumentId — The Google Docs template to copy and modify when creating the new document.
- additionalOptions.templateSettings.placeholders.placeholderSettings.placeholderData — JSON object of key-value pairs to replace placeholders in the template. Values can be rendered as formatted Markdown if enabled.
- additionalOptions.templateSettings.placeholders.placeholderSettings.mainContentPlaceholder — The token in the template document to be replaced by the parsed Markdown input; must be on its own line.
- additionalOptions.templateSettings.placeholders.placeholderSettings.parsePlaceholderMarkdown — Whether placeholder values with block-level Markdown should be rendered as formatted Google Docs content.
- additionalOptions.templateSettings.placeholders.placeholderSettings.useMarkdownInput — Whether to parse and inject the Markdown Input field at the Main Content Placeholder position in the template.
- additionalOptions.pageBreakSettings.values.pageBreakStrategy — Strategy for inserting page breaks in the document: before H1 headings, before H2 headings, or replacing custom text markers.
- additionalOptions.pageBreakSettings.values.customPageBreakText — Custom text marker to be replaced with page breaks if the 'custom' strategy is selected.
Output shape
a single object with success status, document ID, document URL, title, drive and folder info, and a message
Returns an object indicating success and document details including a link to edit the new document. Throws errors on failures like missing Markdown input (if required), invalid template placeholders, folder access issues, or API errors.