---
updatedAt: 2025-09-17T02:05:32.000Z
agentTools:
  projectIndex: https://docs.lytics.com/llms.txt
---

# Zapier

# Overview

Zapier is an automation tool that lets you move data between multiple systems. It provides an easy-to-use UI that guides you through the process of connecting different systems and mapping data between them. Connecting your Lytics data to Zapier can be used to export data, or trigger alerts based on user activity to other systems.

## Before You Begin

You will need to following information to set up this integration:

* **Zapier account** - Zapier offers a free tier of service that you can use if you are new to the product.
* **API token for Lytics** - An administrator for your Lytics account can generate an API token for you. This token generated should have administrator rights.

## The Lytics app for Zapier

In addition, the Lytics has built an app that allows Zapier to interact with Lytics. For more information on triggers, actions, and workflows see the [Zapier](https://zapier.com/learn/getting-started-guide/what-is-zapier/) documentation. The Lytics app supports the following functionality:

* **Trigger**: Lytics user enters an audience
* **Trigger**: Lytics user exits an audience
* **Action**: Ability to load user data into Lytics

Zapier supports public and private apps. Currently, the Lytics app is a private app. In order to get access to it, you must be invited. Contact your Lytics representative to get an invitation.

### Getting access to the Lytics app

This section describes how to log into Zapier and get access to the Lytics app.

1. Request an invitation from your Lytics representative to use the Lytics app. Your Lytics representative will need your email address.
2. You will receive the invitation by email. Click the link in the email to accept the invitation.
3. A browser window will open with a prompt to log into Zapier. If you have a Google account you can log in with that. Otherwise, you will need to create a new Zapier account by clicking the *Sign Up* link.

![getting-access-03](//images.ctfassets.net/p3327y1wyjsx/1nJHQ9Lcac0am8kcO2S2W/3c44d36509843bf79e189f66c83e05ff/getting-access-03.png)

4. Click **Accept Invite & Build a Zap**.

![getting-access-04](//images.ctfassets.net/p3327y1wyjsx/3dmfpvZz6MIcUasIeew6kY/d42f3cba5cc36c01a27b6db542259258/getting-access-04.png)

## Connecting Zapier to Lytics

In order for Zapier to interact with Lytics, a *connected account* must be configured in Zapier.

1. In Lytics UI, create a new API token with administrator rights. Information on how to generate an API token is available [here](https://learn.lytics.com/understanding/product-docs/account-management/managing-api-tokens).
2. In Zapier, navigate to **Connected Accounts**.

![connect-02](//images.ctfassets.net/p3327y1wyjsx/2MXDyHxcVWYwmUWYwMAKMa/b8051dc5b616f27b8e447149172c9a63/connect-02.png)

3. In the dropdown select the Lytics app.

![connect-03](//images.ctfassets.net/p3327y1wyjsx/1Pmc8hGoccEEE6WAUQuQ6g/b0b5fd3fd6e3ef1b2509d2373233055e/connect-03.png)

4. Enter your Lytics API token and click **Yes, Continue**.

![connect-04](//images.ctfassets.net/p3327y1wyjsx/1zBKT8LwjuYG2Mi0GGG0mi/7d1a1c40a813e45e3a3c81c362f35488/connect-04.png)

5. The connection will appear in the section **My Connections**. You will see the Lytics account name and the Lytics AID value (4-digit number).

![connect-05](//images.ctfassets.net/p3327y1wyjsx/2Maw0uJv3aGekcmaYUC0OS/0bc72fde635cef6999115a4680c141f6/connect-05.png)

## Using the Lytics triggers

The Lytics app provides triggers for when Lytics users enter and exit Lytics audiences. These triggers can be used in any zap you create.

The following instructions demonstrate how to create a new zap that starts with a Lytics user enters an audience, and sends you an email notification when that happens.

1. In Zapier, navigate to **Zaps**.

![trigger-01](//images.ctfassets.net/p3327y1wyjsx/4dWO6cmPRYCQceoskM4ouU/bdba71c660a6b27d671c8b50fe63386c/trigger-01.png)

2. Click **Make a New Zap**.
3. Click the Lytics app.

![trigger-03](//images.ctfassets.net/p3327y1wyjsx/3lwLgQ4YoMsCygqmakQcKw/b06d3ea5407f0267cc9fd3812acab9aa/trigger-03.png)

4. Click **User Entered Segment**.

![trigger-04](//images.ctfassets.net/p3327y1wyjsx/2xu3RaxRwcI8Igi6eGSwS2/447be1dab7f411520338ad475ce46b5e/trigger-04.png)

5. Click **Save + Continue**.
6. The Lytics connection you configured earlier will be selected by default. Click **Save + Continue**.

![trigger-06](//images.ctfassets.net/p3327y1wyjsx/lXMkmetrO0YwmueE4GYU8/b2828c1f4f00eb579ba480dfeee6356b/trigger-06.png)

7. Enter the following values and click **Continue**.

| Field                    | Value                   | Description                                                                                                                                                                                                                                                                                                                                                |
| :----------------------- | :---------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Subscription description | `New users for Zapier`  | The Lytics app creates a new [subscription](https://learn.lytics.com/understanding/integrations/webhooks) in Lytics to monitor audience membership. This value is used to identify the subscription in Lytics.                                                                                                                                             |
| Segments                 | `Lytics New`            | You can select 1 or more audiences to monitor. Any time a user enters one of the selected audiences, this trigger will                                                                                                                                                                                                                                     |
| Fields                   | `User Agent` `Timezome` | When a user enters one of the selected audiences, Lytics sends data to Zapier. The user fields selected here will be included in that data. This makes it possible to use the user profile data in subsequent steps of the zap. Since the audience you are monitoring is the audience for new users, you may not have a lot of information about the user. |

![trigger-07](//images.ctfassets.net/p3327y1wyjsx/5nOWezoyA0mWA080OO0WQ4/c4e5a5acc11cbdf251654cb7322bb3ae/trigger-07.png)

8. Click **Continue**.

![trigger-08](//images.ctfassets.net/p3327y1wyjsx/6c4jW6ZgyWms4Q606UQQg6/e88455489640deb9d9961447480c3a4a/trigger-08.png)

9. Zapier will tell you that your zap is missing an action step. Click **+ Add a Step**.

![trigger-09](//images.ctfassets.net/p3327y1wyjsx/5GAWj12Cnm6oAiaawwQOIm/9451ca2acfece76e1f0578a4f7ecbc9b/trigger-09.png)

10. Click **Action/Search**.

![trigger-10](//images.ctfassets.net/p3327y1wyjsx/WQ7Diot62iu2sOOs0MUqG/d2f0a364f0f641a20ae6df6c41d1be03/trigger-10.png)

11. Click **Email**.

![trigger-11](//images.ctfassets.net/p3327y1wyjsx/L97oRXGkqAyg4IqKYyK6w/faec820259a9d409f8e8abe5852e0e0b/trigger-11.png)

12. Click **Save + Continue**.

![trigger-12](//images.ctfassets.net/p3327y1wyjsx/1bYdIH4oKsuyEGAUEekc8Y/3830f79f6ad4a36181bbc526e9ba21ff/trigger-12.png)

13. In the field **To**, enter your email address.
14. In the field **Subject**, enter: "New Lytics User Created!"
15. In the field **Body**, enter: "New visitor browser: "
16. Click the button **Insert a Field**.

![trigger-16](//images.ctfassets.net/p3327y1wyjsx/3CvHGmWqTumYkaaEMEemKi/560a19eeb33e1edf3c6ff0841aed6aee/trigger-16.png)

17. Select **User Agent**.

![trigger-17](//images.ctfassets.net/p3327y1wyjsx/ITKt25YF8WI68E0EyS4A8/7c3c347a8caf32d59f5f490df9b2745e/trigger-17.png)

18. Scroll down and click **Continue**.
19. You can see the information that will be used to send an email. The email body includes values from Lytics. Click **Skip Test**.

![trigger-19](//images.ctfassets.net/p3327y1wyjsx/1leKz0xOx224wkGkGkGWsi/215eca4521138efd60f4e1449870091a/trigger-19.png)

20. Click **Finish**.
21. In the field for the name, enter: "Send Email Notification for New Lytics Users"

![trigger-21](//images.ctfassets.net/p3327y1wyjsx/4aemsbwkOciS4kG02ECay8/358f78ffb797adafe4938c63d4b52cce/trigger-21.png)

22. If you want to enable the zap, click the toggle **OFF**.

## Using the Lytics "add user data" action

The Lytics app provides an action that lets you add user data to Lytics. This action can be used in any zap you create.

The following instructions demonstrate how to create a new zap that writes some hard-coded data to Lytics. This is not a very useful example, but it allows you to configure the action without having to set up connections to any other systems. Just imagine that the hard-coded data is coming from one of your own systems.

1. In Zapier, make a new zap.
2. For the trigger select the app **Code**.

![add-data-02](//images.ctfassets.net/p3327y1wyjsx/NBwkPiLjK6EsciSI4QoIi/ebd4e9f83159568f57dcf42564e82ee5/add-data-02.png)

3. Select **Run Javascript** and click **Save + Continue**.

![add-data-03](//images.ctfassets.net/p3327y1wyjsx/5j4N3jQBhY2M4MwU8UsuAq/465900ae890aa898ad46ce23470b1f07/add-data-03.png)

4. In the field **Code**, enter the following. This code represents the data that would be provided from

````javascript
//
// This code represents the data that will be made
// available to the step that will upload data to
// Lytics. 
//
// In a real-world example, this data would come
// from the trigger of another Zapier app. For 
// example, there is a Zapier app for Salesforce
// that includes a trigger for when a new contact
// is created. The data from that trigger 
output = [{
    email_address: "erin@email.com",
    given_name: "Erin", 
    surname: "Wilson", 
    employer: "Corpcom", 
    city: "Portland"
}];  ```
5. Click **Continue**.
6. When prompted to pick a sample, click **Continue**.

![add-data-06](//images.ctfassets.net/p3327y1wyjsx/5va5brmN20Msuw4uyQYiou/26168567094f343f5e814e9fc68ad7ab/add-data-05.png)

7. Click **+ Add a Step**.

![add-data-07](//images.ctfassets.net/p3327y1wyjsx/2Vs1qi67R6e8uo86u8iSMy/12712a81c470dd9a9bb6e80509d200f4/add-data-07.png)

8. Click **Action/Search**.

![add-data-08](//images.ctfassets.net/p3327y1wyjsx/56mU6DlzQQ6is0YMEM2ESo/4d0771a2312ae7664528f264d7bc48e8/add-data-08.png)

9. Click **Lytics**.

![add-data-09](//images.ctfassets.net/p3327y1wyjsx/7eCoZfbivKKKaQksAyOCk/bf5d8e60030f10e1b05074c845e998ca/add-data-09.png)

10. Click **Save + Continue**.

![add-data-10](//images.ctfassets.net/p3327y1wyjsx/3oRFIKTewMokwg6scaKcqY/305b5fd9cb8db3a7ad0d22e85c8965db/add-data-10.png)

11. Click **Save + Continue**.

![add-data-11](//images.ctfassets.net/p3327y1wyjsx/2mou4ABglCE0sEKY8CIuyc/13c52af135d9a9f313f5299b0772b834/add-data-11.png)

12. A list of fields is displayed. This list of fields comes from a Lytics query named `zapier_user`. If this query does not already exist in your Lytics account, the query will be created automatically. 

The purpose of this form is to specify how to map data from earlier steps in the workflow to the Lytics user profile. 

Any time data is sent to Lytics, at least one identifier value must be specified. If one is not specified, Lytics will report an error. 

Multiple identifiers may be defined in Lytics. You do not have to provide values for every identifier. You can, but only one is required.

But Zapier does not provide a way to specify that at least one of a set of fields must have a value. Zapier lets you specify whether a field is required or not. Therefore another approach must be used in order to ensure the person configuring the action maps at least one identifier. 

The purpose of the field *Identifier Field*. It is used to specify which of the identifier fields listed before will satisfy the Lytics requirement that at least one identifier value is provided. By selecting an identifier field from the dropdown list, you are telling Lytics that the field you selected will be mapped in the form.

Note that Zapier provides no way to ensure that you have actually mapped the field you select from the dropdown. If you fail to map at least one identifier field, an error will occur when the action tries to upload data to Lytics.

For the field *Identifier Field*, select **Email Address**.

![add-data-12](//images.ctfassets.net/p3327y1wyjsx/1WG7OLKhTWsyO4oM4aeyKC/20906261e01c32c5619fc342c89eae39/add-data-12.png)

13. The rest of the fields in the form represent fields on the Lytics user profile that can be mapped. These fields are defined in the Lytics query `zapier_user`. You can add/remove fields from this query in order to configure other options.

For the field *City*, click the button **Insert a Field**.

![add-data-13](//images.ctfassets.net/p3327y1wyjsx/ODsLMc3qc6mMCqgiqqMCe/1f382a8fb0bc6b3618b712033ccfd718/add-data-13.png)

14. Click **City**.

![add-data-14](//images.ctfassets.net/p3327y1wyjsx/6nemdUsu5i4wWosAGSyIwY/97b47363f0fe3a66a054926d4cc1a26c/add-data-14.png)

15. For the field *Company* select **Employer**.
16. For the field *Email Address* select **Email Address**.
17. For the field *First Name* select **Given Name**.
18. For the field *Last Name* select **Surnames**.
19. Scroll to the bottom of the form and click **Continue**.
20. A summary of the mapped and unmapped fields is displayed. Click **Send Test To Lytics**.
21. A message will tell you the test was successful. Zapier will display a sample of the kind of data Lytics will return after the action runs (i.e. user data is submitted to Lytics).

Click **Finish**.

![add-data-21](//images.ctfassets.net/p3327y1wyjsx/2s9X7R7huUOy4IU6C2aQqS/c1817ea53c12a6894e21533d24c0b05a/add-data-21.png)

22. In the field for the name, enter: `Add Data from Javascript Code`

![add-data-22](//images.ctfassets.net/p3327y1wyjsx/37PoWhz6jYeuGuWMSOum2w/b687ca3919038372ccef1e433fdd3e28/add-data-22.png)

23. If you want to enable the zap, click the toggle button to turn it on.


````