- 01 Nov 2022
- 8 Minutes to read
Document automator setup guide
- Updated on 01 Nov 2022
- 8 Minutes to read
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.
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:
- "At a scheduled time" automation trigger
- "Find records" automation action
- "Google Doc: Create Doc" automation action
- "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.
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.
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.
In this example, we are using an already preconfigured filtered view to find projects that are not yet marked complete.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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:
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.
In the recipe, the "File URL" token will already be there, but here's how it would look inserting the token from scratch:
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.
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:
- You can select an existing view with the desired sort in the "Find records" action step.
- 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.