Markdown to Google Docs (Append) icon

Markdown to Google Docs (Append)

Transform Markdown content into Google Docs API requests

Create Document

AI-generated

Summary

Create a new Google Docs document in a specified Google Drive and folder, optionally based on a template, by converting provided Markdown content into Google Docs format with customizable placeholders and page break settings.

Inputs

  • Drive (required) — Select or specify the Google Drive where to create the document, using a list, Drive URL, or Drive ID.
  • Folder (required) — Select or specify the folder within the chosen Drive where the document will be created, using a list, Folder URL, or Folder ID.
  • Document Title — Provide a title for the new Google Docs document; defaults to 'Untitled Document' if not specified.
  • Markdown Input — Enter the Markdown content to convert into the new document. Required unless disabled by placeholders options.
  • Additional Options — Configure advanced settings including template usage and page break handling.
  • Template Settings — Specify a Google Docs template and folder for the new document; supports replacement of placeholders with JSON data or Markdown content.
  • Placeholders — Define JSON key-value pairs for placeholders in the template, indicate whether to use the Markdown input as main content, and specify the main content placeholder string.
  • Page Break Settings — Choose how page breaks are inserted: before H1 or H2 headings, or by replacing custom text markers with page breaks.

Output shape

a single JSON object representing the created Google Docs document metadata and details

Returns the newly created document data from the Google Docs API including document ID. Throws an error if Markdown input is required but empty, or if placeholder JSON is invalid. Placeholders and page breaks are applied as configured.

Examples

Example 1: Create a new Google Docs document titled 'Project Plan' in a specific Drive and folder, converting provided Markdown input with page breaks before H2 headings.

Drive set to 'My Drive', Folder to 'Project Documents', Document Title to 'Project Plan', Markdown Input includes project outline, Page Break Settings use 'Before H2 Headings'.

Example 2: Create a Google Docs document based on a template, replacing placeholders with JSON data and Markdown input as main content, inserting custom page breaks from text markers.

Additional Options specify a template folder and document, placeholders JSON defines replacements, main content inserted into '{{MainContent}}' placeholder, page breaks with custom marker ''.

Discussion