15 min read

Combine automations and Packs

Add superpowers to your doc by combining automations and Packs.

Introduction

Your time is valuable—don’t waste it on repetitive tasks. Automations allow you to put those necessary but monotonous actions on autopilot. And when combined with Packs, your docs get superpowers! 🦸‍♀️ In this guide, we’ll explore how you can combine these two features to bring even more ease to your work rituals and routines. Before we get started, it’s helpful to have a basic understanding of automations and Packs. You can check out this guide on automations and this article on Packs for a quick overview before jumping in.

What’s in this guide:

You’ll learn...
  • How to create an automation to work with any Pack
  • How to combine automations with the Gmail Pack
buttons
You’ll use...
  • Automations
  • Gmail Pack
  • Buttons

Targeting Pack actions in automation rules.

Automations are made up of two main parts: When and Then. When building out an automation rule, you can choose to take actions from any Packs you have connected by targeting the specified Pack action in the last step of the automation rule, also known as the Then step. That’s it! Turn your automation rule on, and you’re good to go.

Automate Pack actions with the help of buttons.

The easiest way to start combining Packs and automations is with the help of buttons. Do you have Pack actions set up in a button already? Create an automation to push those buttons for you! Some of our favorite Pack button/automation combinations involve the Slack Pack and the Gmail Pack, but the sky’s the limit!
💡 Tip: Make sure you’ve installed the Gmail Pack in your doc before going forward! Need some help with that? Check out this help center article on installing Packs.

Automated mail merge with the Gmail Pack.

One of the common use cases for the Gmail pack is a “mail merge,” which sets up a template that is filled with slightly different information per email, then sends a direct email to each person. There are two great ways to set up this templatized content in Coda:
  1. Coda AI: Let the power of AI write customized messages for you with total ease.
  2. Compose column: Use the compose column feature to create customized messages based on the values in your table.
For this example, we’ll use Coda AI to write our message, but choose whichever works best for you! When building an automation rule, it’s helpful to outline your When and Then criteria ahead of time:
  • When: when do you want the automation to run?
  • Then: what action do you want the automation rule to take once the rule is triggered?
In this example, our When and Then will look something like this:
  • When: Every morning at 10:00 AM
  • Then: Send out customized emails to contacts about an upcoming product launch.
If you’re following along at home, go ahead and type out your When Then outline on a scratch page on your doc. Let’s set up a simple Contacts table with columns for the following data:
  • Contact: A people column. For testing purposes, set this to yourself for now.
  • Title: A text column.
  • Company: A text column.
  • Email content: A text column using AI or Compose to generate a message. Feel free to add any test message here for now.

AI window showing how to set up AI in a text column.

  • Send email: A button column. Here’s where the magic happens! We’ll configure this button to work with the Gmail Pack to send a customized email out via automation.
For now, add in some fake data for testing purposes. Once you have your automation rule and Gmail button built out the way you’d like, you can then add in real data. Your table should look something like this:

Table to send emails to contacts using the Gmail Pack.

Set up your Gmail button:

  1. Open up your button settings by right-clicking on one of the buttons, or selecting Column options from the column settings menu. In the first step, On Click, select PacksGmailSend email. (For testing purposes, you can just put your email in there for now!)
  2. Select Private or Shared mode for this button based on your use case.
  3. For the To value, we’re going to target the Contact column of the table, and specifically pull out the email address from each person object with a tiny formula: Contact.Email
  4. For Subject, feel free to add in some test data here if you’re unsure about what you want the subject of your email to be.
  5. For Content, we’re going to target our Email content column.
  6. For Results Column, select + New Column. This will add a column to your table to record whether or not the Gmail Pack action was taken.
  7. In the Visual portion of the button settings, feel free to give your button a descriptive label like Send email and select a color and an icon!
  8. In the Advanced section under Disable If, we’re going to add a condition to disable the button if a specific contact has already been emailed:
    1. Results column is not blank
Your button settings should look pretty similar to this 👉

Build your automation rule.

Now we’re going to build our automation rule to push the button we built for any Contacts that need to be emailed. In this example, we’ll set our automation to run every morning at 10:00 AM, but you can choose different When criteria to fit your use case.
  1. Add a new automation rule to your doc: Click the settings gear icon at the top-right of your doc, then select Automations. Click + Add Rule.
  2. Give your automation rule a descriptive name. Send email to contacts is the name we will use.
  3. Step 1 - When: we’re going to use a Time-based trigger, daily at 10:00 AM.
  4. Step 2 - Then: Select Push buttons from the first dropdown menu, and then select your ContactsSend email button column.
  5. All the way at the bottom of your rule, set your automation to run as either yourself, or Automation Bot. If you selected Private mode in your button settings, you’ll need to set the automation rule to run as yourself. If you selected Shared mode in your button settings, you can keep this rule running as Automation Bot.
Your automation rule should look something like this 👉
Time to test out your rule! Click the Test Rule button right under the Then step of your automation rule. You should receive an email with your test content from yourself. You can also check the Activity tab of your automation rule to see if it successfully fired 👍 If your test was successful, you can adjust your button to target each contact’s email address, and add in real data. This automation rule will send out emails for all rows where the button is enabled. Remember that we added in Disable If criteria to our button so that our automation does not send out duplicates 😉

Now what?

Now that you know how to combine the Gmail Pack and automations, how can you apply this powerful combination in your docs? 🦾 What other Packs might you pair with automations? Hint: Slack. Want to keep learning? Check out these awesome resources 👇

Was this helpful?

YesNo