Destinations (Community)

Last Updated: 2021-02-11

Destinations are the last step in the Grouparoo configuration process. That means you should have already configured at least one App, Source, Property, and Group.

Once you have all other items configuration, you're ready to send your customer data to Destinations. Destinations are the last piece of the puzzle. They are the place(s) you want to send your customer data so you can take action on your workflows. These Destinations can be email marketing tools like Marketo, SendGrid, or Braze. Destinations can also be data tools like Redshift or Snowflake. See this doc to learn more about the core concepts in Grouparoo.

Generating a New Destination

To generate a new Destination for your Grouparoo application, run the generate command.

For example, let's say you have configured a Mailchimp App with the ID mailchimp. You can generate a new Mailchimp Destination (from a table in the database) like this:

grouparoo generate mailchimp:email:destination newsletter --parent mailchimp_app

Note here that newsletter is the ID for the Destination. An ID is always required when generating a config object.

This command will generate a file in your application directory at config/destinations/mailchimp.js that looks something like this:

exports.default = async function buildConfig() {
  return [
    {
      id: "newsletter",
      name: "newsletter",
      class: "destination",
      type: "mailchimp-export",
      appId: "...",
      groupId: "...",
      options: {
        listId: "...",
      },
      mapping: {
        email_address: "email",
        FNAME: "firstName",
        LNAME: "lastName",
      },
      destinationGroupMemberships: {
        "High Value Customers!": "highValueCustomers",
      },
    },
  ];
};

See below for more information about this file.

List of Available Destination Types

Postgres is just one type of Destination you can create. To see a full list of available types, use the --list option, filtered by "destination":

grouparoo generate destination --list

This will give you something like the following:

facebook:destination (id, parent) - Config for a facebook Destination
hubspot:destination (id, parent) - Config for a hubspot Destination
intercom:destination (id, parent) - Config for a intercom Destination
iterable:destination (id, parent) - Config for a iterable Destination
mailchimp:email:destination (id, parent) - Config for a Mailchimp Email Destination
mailchimp:id:destination (id, parent) - Config for a Mailchimp ID Destination. Note: Use the email destination unless you know you need this.
marketo:destination (id, parent) - Config for a marketo Destination
mysql:destination (id, parent) - Config for a mysql Destination
postgres:destination (id, parent) - Config for a postgres Destination
redshift:destination (id, parent) - Config for a redshift Destination
sailthru:destination (id, parent) - Config for a sailthru Destination
salesforce:destination (id, parent) - Config for a salesforce Destination
sendgrid:destination (id, parent) - Config for a sendgrid Destination
zendesk:destination (id, parent) - Config for a zendesk Destination

Configuring Your Destination

The generate command attempts to make a reasonable guess at the values in the config file it generated (in the config/destinations directory). There are ellipses ("...") in the places in which it couldn't make a reasonable guess. In the example above, after generating a Postgres App, all but appId, groupId, and options.listId were pre-populated.

The best practice when configuring an Destination is to read the comments, keys, and values within the generated file and fill in the appropriate values for your Destination.

Validating & Applying Your Config

You can validate your config at any time using the validate command:

grouparoo validate

And you can apply that config (save it to your Grouparoo application's database) using the apply command:

grouparoo apply

Note that apply will run validate, but it's recommended to run validate on its own first, just to be safe.