Document automator setup guide
  • 01 Nov 2022
  • 8 Minutes to read
  • Dark
    Light

Document automator setup guide

  • Dark
    Light

In this article, we will guide you through the specifics of a new Automations recipe that allows you to have automatic documents created in Google Docs leveraging the "source of truth" information held in records within Airtable. After reading through the sections ahead, you'll be able to modify (or add to) the recipe to fit your unique workflow's requirements.


Overview

There are four main pieces associated with this workflow. You can learn more about each piece by clicking the link to their support article below:

  1. "At a scheduled time" automation trigger
  2. "Find records" automation action
  3. "Google Doc: Create Doc" automation action
  4. "Slack: Send a message" automation action

When used together, this creates a powerful automation workflow that can help your team to better collaborate, communicate, and remain aligned over time. To help with a faster setup, we've created an automation recipe that you can adjust and add to. To find the recipe, navigate to the Automations modal and scroll down to find the "Generate a weekly digest in Google Docs" option. If you've created other automations in this base, then you will need to click the "Suggested for you" dropdown to find this option.

6750004876567documentAutomatorFindRecipe06132022.jpg

Once clicked, it will open up the preconfigured set outlined above. In our example, we will be finding incomplete projects each week on Mondays at 3 p.m. Any incomplete projects will then be rendered as a grid view in a Google Doc and the link to the Google Doc will be sent out to a team channel so that stakeholders can discuss which projects should be tackled next.

As mentioned, this example may not perfectly align with your team's workflows. In each part of the automation, you'll want to consider what should be changed to fit your needs. We'll start with the trigger.


Configure the trigger

For this recipe, the trigger we are setting up is the "At a scheduled time" trigger. This allows you to choose a date and time, as well as a cadence, for when you would like to see this automation run. In the "Configuration" section you can modify these parameters to your liking.

6751361552663documentAutomatorTrigger061320221.png

You can also change the trigger type to another trigger that may better match your base's setup. It is always helpful to think about exactly when you'd want this automation to run. If the answer has more to do with a certain threshold rather than a specific date and time, then you might want to consider other trigger types.

Once you've settled on the trigger's setup, test the trigger and move on to the next section.


Find relevant records

Now that you've set up when you want the automation to run, you'll want to configure the automation to know which records have the relevant information needed to create a comprehensive and useful document in Google. If you've never used the "Find records" action before, it may be good to review this support article. Briefly, you can choose to either find records based on a view or conditions.

6751309970327documentAutomatorFindRecords061320221.png

In this example, we are using an already preconfigured filtered view to find projects that are not yet marked complete.

Note
It's worth noting that you can create automations that don't use the "Find records" automation action. However, using this trigger will allow for easier formatting of the resulting document and also offers certain special features which we cover in the next section.


Templatize the Google Doc action

Now it's time to configure, or "templatize," the document you are wanting to be created in Google Docs. This will include any helpful formatting or pieces of information from previous steps in the automation. Let's break this down into a few sections:

Connecting to Google and choosing a folder location

If you haven't connected Airtable and Google together before in the past, then you'll need to complete the authorization steps before moving ahead. Once the two accounts have been connected you can choose a folder in your Google Drive where any docs created in the future will live. If no folder is chosen, by default, the docs will be put into your overarching "My Drive" folder.

Note
It may be a good idea to create a test folder in your Google Drive and connect to that first since you made want to test out the formatting of the created document before turning this automation on.

6751288563607documentAutomatorChooseFolder061320221.png

Updating the title

Next, you'll likely want to adjust the default "Title" and "Content" sections. In our example, we'll change the title to "Incomplete projects - Actual trigger time." The "Actual trigger time" token is coming from the trigger step of the automation. This gives the document more context for people who may come across it at a later time.

6751016972823documentAutomatorTitle06132022.gif

Updating the Content section's copy

Now comes the fun part. In the "Content" section you can begin building the template by which all future documents will be based. Remember the "Find records" action? That plays a huge role here in the next section.

Let's start with the document's header and helper text. Currently, the copy is related to the recipe's default use case. Adding a bit more context may help readers to better digest the information.

6751393455767documentAutomatorContentCopyUpdate06132022.jpg

Note
You can use markdown to further format the content section of the resulting document. You can read more about Markdown in Airtable here.
Editing the "Grid of records"token

Next, we'll want to adjust the "Grid of records" token so that it only inserts the fields from Airtable that are necessary for our weekly team meeting. Start by clicking the dropdown arrow and selecting the "Edit token" option.

6751428284055documentAutomatorEditToken06132022.jpg

This will open a screen where you can choose which step the token is coming from. In our case, we are using the "Find records" action step. This allows us to "Insert records as" a grid or list. Here, we choose to render the found records as a grid. You can then choose the fields that make the most sense for your workflow.

Note
If the sorting order of records in the rendered grid or list is important for your workflow, then be sure to find records by view rather than by conditions in the "Find records" action step. Records will then render in the created Google Doc the same way that they appear in the view you selected in the "Find records" action step.

6751756566807documentAutomatorTokenAdjust06132022.gif

In this case, we'll choose to include the Name, Due date, Category, Project lead, and Project team fields. Additionally, we want to make sure both the "Include link to view" and "Include link to record" options are checked so that collaborators can easily navigate back to Airtable to make changes.

6751841414679documentAutomatorIncludeLinks06132022.jpg

Other options and testing

At this point, you could choose to add more text, images, or formatting to the document. You could even add additional grid tokens. For our example, we'll stop there. However, there is one more consideration: portrait or lansdscape.

6752018383127documentAutomatorPortrait06132022.jpg

It's a good idea to use the landscape option if you have more than 5 fields selected in the rendered grid (or list) token.

Now, you'll want to test this step of the automation to make sure that the template you've just created in this automation step looks the way you'd like in Google Docs. After testing successfully, you'll see a URL that you can highlight and copy, or just check the Google Drive folder you configured earlier.

6752218678295documentAutomatorTestURL06132022.jpg

Remember that you may need to test several times to get the document formatted the way you'd like. Any time spent testing is worthwhile though because you'll have a template that can be used for countless automations in the future.

The end result might look something like this when you've followed through with all the steps above:

6752557868311documentAutomatorCreatedDoc06132022.jpg

As you can see in the highlighted boxes:

  • The outline of the document corresponds to the project lead grouping in Airtable.
  • There's a helpful header and context for the document.
  • There is a rendered grid that only shows the fields we selected in the "Find records" token.
  • The arrows in each row link back to the individual corresponding Airtable record.
  • The line below each section shows when the document was generated and links back to the Airtable view where the records were rendered from.


Setup Slack communications

The last piece of the recipe to consider is the "Slack: Send message" action. You may or may not use Slack for your team communications, so you can also think about using the "Microsoft Teams: Send message" or "Send email" actions.

For the purposes of this article, we won't be going into extreme detail on how to set this action up, however, it is worth pointing out that you'll likely want to insert a token from the Google Docs: Create doc step you just set up. This token will allow you to include a link to the created document so that a channel in Slack or MS Teams is properly notified.

6753013453719documentAutomatorSlackMessageToken06132022.jpg

In the recipe, the "File URL" token will already be there, but here's how it would look inserting the token from scratch:

6753100383511documentAutomatorInsertURL06132022.gif

You can test this step by generating a preview to test out what it would look like and prevent unnecessary test messages to the selected individual or channel.


Turn on the automation

The last thing that remains is to turn the automation on! Congratulations, by putting the effort in here, you've saved yourself and your team a lot of time in the future.

6753111429399documentAutomatorTurnOn06132022.gif


FAQs

Where will documents go if a Google Drive folder is not selected during the setup process?

If no folder is specified, then the document will be added to the “My Drive” folder in Google.

My Google Docs automation action is failing. What might be causing this?

The column width of the rendered grid in the Google Doc will be determined by how the field width has been configured in the corresponding Airtable view. You may need to use trial and error to test out the right width for the grid you are rendering.

How do I sort the data being pulled in for the grid and list tokens?

This can be achieved in one of two ways:

  1. You can select an existing view with the desired sort in the "Find records" action step.
  2. Or you can create a new view just for Document Automator with the sort you prefer. You'll choose that view in the "Find records" step and the document will inherit the same sorting.

Was this article helpful?