TASK_MARKDOWN_TO_DOC converts Markdown content into a Google Doc and creates a hyperlink to the document in your spreadsheet. This function enables seamless creation of rich, formatted Google Docs from plain text Markdown directly from your Google Sheet.
=TASK_MARKDOWN_TO_DOC(header, filename, markdown, [celladdress])
Parameter | Data Type | Required | Description |
---|---|---|---|
header | string | Yes | Column header for the task template. |
filename | string | Yes | The name of the new Google Doc. For example, "Meeting Notes" or "Project Report". |
markdown | string | Yes | The markdown content to be converted. This is typically in another cell as a result of other operations/prompts. For example, A3 or LM(A2, "Create meeting notes"). |
celladdress | string | No | The cell address to place the result hyperlink. For example, "C1". If not specified, the cell to the right of the function cell is used. |
The created Google Docs are stored in a specific folder structure in your Google Drive:
sheetworkflows/docs
folder in your Google Drivesheetworkflows/temp
is also created for processingYou can control where the document hyperlink appears:
The conversion supports standard Markdown syntax including:
=TASK_MARKDOWN_TO_DOC("Task", "Meeting Notes", LM(A2, "Create meeting notes from the following agenda items:"), "D2")
=TASK_MARKDOWN_TO_DOC("Task", "API Documentation", B5)
=TASK_MARKDOWN_TO_DOC("Task", "Project Status Report", CONCATENATE(B3, "## Status Summary
", C3), "Output!A1")
sheetworkflows/docs
folder in your DriveCause: Insufficient Google Drive permissions or quota issues.
Solution: Check your Drive permissions and available storage space. Try again with a smaller document.
Cause: The function was manually edited and contains malformed JSON.
Solution: Recreate the function using the formula builder or correct the syntax.
Cause: The markdown parameter is empty or points to an empty cell.
Solution: Ensure the cell referenced contains Markdown content or provide direct Markdown text.
Cause: The filename parameter is empty.
Solution: Provide a non-empty string for the filename parameter.
Cause: The specified celladdress is invalid or the sheet is protected.
Solution: Check the cell address format and sheet permissions.
Cause: The "Run" button in the Sheet Workflows sidebar wasn't clicked.
Solution: Select the cell with the TASK_MARKDOWN_TO_DOC formula and click "Run" in the sidebar.
Cause: Markdown syntax errors or unsupported Markdown features.
Solution: Review your Markdown for syntax errors and stick to standard Markdown features.
After entering the formula, select the cell containing it and click the "Run" button in the Sheet Workflows sidebar. This triggers the conversion process.
The created documents are stored in the sheetworkflows/docs
folder in your Google Drive. This folder is created automatically if it doesn't exist.
Yes, you can use the complementary TASK_DOC_TO_MARKDOWN function to convert Google Docs to Markdown format.
Currently, the function doesn't fully support inline base64 images in Markdown. External image links may work, but complex image handling is limited.
No, the documents are always created in the sheetworkflows/docs
folder in your Google Drive to maintain consistency.
There's no strict limit, but very large Markdown documents (over 100,000 characters) may experience slower conversion times or occasional timeouts.
Yes, you can use it with other sheet functions, including data validation and dropdowns, as long as the resulting Markdown content is valid.
Yes, you can combine it with TASK_TEMPLATE or other template functions to first generate Markdown from a template and then convert it to a Google Doc.
No, it creates a new document each time, even if the filename is the same. Each document gets a unique ID in Google Drive.
Yes, you can set up time-based triggers to run the sheet workflows, which would create documents automatically at scheduled intervals.
1 week ago