TASK_APPEND

Knowledgebase

TASK_APPEND

Function Overview

TASK_APPEND appends the contents from a source file to an output file directly from your Google Sheet. It automatically detects the file type and converts Google Docs to Markdown when needed, eliminating manual copying and pasting.

Uses

  1. Merge monthly or weekly reports stored as separate Google Docs into a single consolidated document.
  2. Append meeting minutes or new updates to an ongoing report.
  3. Combine multiple plain text files or logs into one centralized file.
  4. Automate updating of reports by continuously appending new information.

Syntax and Parameters

=TASK_APPEND(input_file_cell, output_file_cell)

Parameter Data Type Required Description
input_file_cell

string

Required The cell reference (in quotes) that contains the hyperlink to the input file. For example:

"A1"

.
output_file_cell

string

Required The cell reference (in quotes) that contains the hyperlink to the output file. For example:

"B1"

.

Advanced Options

Auto File-Type Detection

When the input file URL contains

docs.google.com/document

, TASK_APPEND:

  • Converts the Google Doc to Markdown.
  • If the output file is a Google Doc, converts the combined Markdown back into a new Google Doc.

For plain text files, the content is handled as raw text.

If a new Google Doc is created during the operation, TASK_APPEND automatically updates the output cellโ€™s hyperlink to point to the newly updated document.

Examples

Example 1: Appending Two Google Docs

  1. Prepare your files:
    • In cell

      "A1"

      , paste the hyperlink of the Google Doc containing the new content.
    • In cell

      "B1"

      , paste the hyperlink of the existing Google Doc.
  2. Enter the function in an empty cell:

=TASK_APPEND("A1", "B1")

  1. Run the function via the Sheet Workflows sidebar. The add-on will convert both documents to Markdown, append the content, create a new Google Doc with the merged text, and update the output cell hyperlink.

Example 2: Appending Two Text Files

  1. Prepare your files:
    • In cell

      "D1"

      , paste the hyperlink to the public text file (source).
    • In cell

      "E1"

      , paste the hyperlink to the destination text file.
  2. Enter the function in an empty cell:

=TASK_APPEND("D1", "E1")

  1. Run the function. TASK_APPEND will retrieve the raw text from both files, append the new text to the existing content, and update the destination file accordingly.

Best Practices

  • Ensure that both the input and output cells contain valid, clickable hyperlinks.
  • Set proper sharing permissions so that files are accessible (e.g., โ€œAnyone with the link can viewโ€).
  • Verify that the file types match your intended workflow (Google Docs versus plain text).
  • Check the output cell after running the function to confirm that the hyperlink has been updated correctly.
  • Avoid extra spaces or formatting errors in your cell references.

Troubleshooting

Ensure that the cell provided to TASK_APPEND contains a valid file hyperlink. Re-copy the shareable file link if necessary.

Missing Required Parameter Errors

Double-check that both the input and output cell references are provided as strings in quotes. Verify that there are no extra characters or spacing issues in your function call.

Permission Issues

Review the sharing settings of your files. Both files should be accessible (typically โ€œAnyone with the link can viewโ€) so that the add-on can read and update the content.

Unexpected File Type Behavior

Confirm that the URL includes

docs.google.com/document

for Google Docs. For plain text files, make sure the file format is genuinely plain text.

Output Not Updated

If the output file (especially a Google Doc) is not updated, try re-running the function or checking that no conflicting data validation rules are applied to the output cell.

FAQ

What Types of Files Does TASK_APPEND Support?

TASK_APPEND supports both Google Docs and plain text files. It converts Google Docs to Markdown and handles plain text files as raw text.

Do I Need to Set Sharing Permissions?

Yes. Both the source and destination files must be shared appropriately (e.g., โ€œAnyone with the link can viewโ€) for the add-on to retrieve and update their content.

What Happens When the Output File Is a Google Doc?

In that case, the add-on converts its content to Markdown, appends the new content, creates a new Google Doc with the combined text, and updates the output cellโ€™s hyperlink with the new document link.

Can I Use TASK_APPEND With Nonโ€“Google Doc Files?

Yes. When working with plain text files, TASK_APPEND simply appends the new text to the destination file.

How Do I Know If the Operation Was Successful?

A confirmation message will appear after running the function, such as โ€œAppended content to text file. File updated successfully.โ€ The output cellโ€™s hyperlink will also update to reflect the new or updated file.

Elisha

1 month ago

Categories
Features