How to Connect Omnisend as Data Search

Integration with Omnisend is implemented as a separate Search block, which can be placed between the Data Source and the Data Receiver. This will allow you to receive data fields from the Data Source, make a query to Omnisend to search for a contact by specified values, and transfer data by email to the Data Receiver fields. Thus, through search, you can automatically receive data from Omnisend and transfer it to the services and systems you use.
The function allows you to search Contacts in Omnisend and update data
Navigation:
Connecting Google Sheets as a Data Source:
1. What data can be get from Google Sheets?
2. How to connect your Google Sheets account to ApiX-Drive?
3. Selecting the table and sheet from which rows will be exported.
4. An example of data that will be transferred from Google Sheets.
Connecting Omnisend as Data Search:
1. What data can be get from Omnisend?
2. How to connect your Omnisend account to ApiX-Drive?
3. How to set up data search in Omnisend in the selected action?
4. An example of the data that will be transferred from Omnisend.
Setting up row updates in Google Sheets:
1. What will the Google Sheets integration do?
2. How to connect your Google Sheets account to ApiX-Drive?
3. How to set up data transfer to Google Sheets in the selected action?
4. An example of the data that will be sent to your Google Sheets.
5. Auto-update and update interval.
Connecting Omnisend as Data Search:
Setting Data SOURCE: Google Sheets
Let's look at how the Search function works using the example of updating a Row in Google Sheets.
First, you need to create a new connection.

Select a system as the Data Source. In this case, you must specify Google Sheets.

Next, you need to specify the action "Get ROWS (all)".

The next step is to select the Google Sheets account from which the data will be uploaded.
If there are no accounts connected to the system, click "Connect account".

Select which account you want to connect to ApiX-Drive and grant all permissions to work with this account.




When the connected account is displayed in the "active accounts" list, select it.
Attention! If your account is in the "inactive accounts" list, check your access to this account!

Select the Google Sheets table and sheet where the data you need is located.

At this step, you can add a data filter to load not all rows, but only those for which you need to update the data, for example, you can filter contacts by subscription status:
1. Select the table column where the contact's subscription status is stored.
2. Select "Does not contain".
3. In the value field, enter, for example, "Unsubscribed".
With such a filter, you will not load contacts that already have the status "Unsubscribed". There is no point in wasting unnecessary steps to re-update information for contacts that have already unsubscribed.

Now you can see the test data for one of the rows in your Google Sheets.
If you want to update the test data - click "Load test data from Google Sheets".
If you want to change the settings - click "Edit" and you will go back one step.

Now we connect an additional Data Search block. To do this, click on the "+" and select "Add data SEARCH" from the list.

As the system in which the search will be performed, select "Omnisend".

Next, select an action, for example "Search CONTACT (by email)".

The next step is choosing a Omnisend account.
If there are no accounts connected to the ApiX-Drive system, click "Connect account".

Enter the API Key to connect to your Omnisend account.

The API key is located in the "Store Settings" section of your Omnisend account. If there is no generated API key, click Create, specify a name, select "Full access" and click Create. Copy the API key and paste it into the appropriate field in your ApiX-Drive account.



When the connected account is displayed in the "active accounts" list, select it.

Specify E-mail from the section Source for data search.

Now you see test data for one of the Contacts. You can transfer this data to your receive table.
If the test data did not appear automatically, click "Search in Omnisend".
If something does not suit you - click "Edit", go back one step and change the settings for the search fields.


This completes the Data Search setup!
Now we can start setting up Google Sheets as a Data Destination system.
To do this, click "Add Data DESTINATION".

Setup Data Destination system: Google Sheets
Select the system as Data Destination. In this case, you must specify Google Sheets.

Next, you need to specify the action "Update ROW".

The next step is to select the Google Sheets account that the Omnisend contact status will be transferred to. If it is the same account, then we select it.
If you need to connect another accounts to the system, click "Connect account" and repeat the same steps as described when connecting Google Sheets as a Data Source.

Now you need to select the File (Table) and Sheet in which the Omnisend Contact data will be updated.
In the "Search column" field, you need to select the column by which the data will be searched. That is, where to look for data in the table.
Next, in the "Search" field, you need to select a variable from the drop-down list or enter the data manually, by which value the system will search for data to update the row you need. In our case, we select the "A" column, which contains the contact's email data. The system will update the data in the required row only if it matches the contact's email.
Also, you need to specify the Search Type, in case several lines with the same email are found:
"First found row" - searching and updating data will occur in the first found row that satisfies the search conditions.
"Last found row" - searching and updating data will occur in the last found row that satisfies the search conditions.
"All found rows" - search and update of data will be performed on all found rows that satisfy the search conditions.
Also specify the option how to Overwrite data:
- Overwrite old data - new data will be written over the old ones.
- Append to old data - new data from the Data Source will be appended to the old data.
Now you need to assign the contact's subscription status variable, which we take from the Data Lookup block, to the empty column. In the future, this column will be updated with your contact's subscription status data.
After setting, click "Continue".




So, the Data Search block takes the field in the Data Source where you have the contact's email, requests the contact's data from Omnisend, in this case the contact's subscription status, and passes this status to the Data Receiver field, for example, to the "L" column.


This completes the Data Destination system setup!
Now you can start choosing the update interval and enabling auto-update.
To do this, click "Enable update".

On the main screen, click on the gear icon to select the required update interval or set up scheduled launch. To start the connection by time, select scheduled start and specify the desired time for the connection update to be triggered, or add several options at once when you need the connection to be triggered.
Attention! In order for the scheduled run to work at the specified time, the interval between the current time and the specified time must be more than 5 minutes. For example, you select the time 12:10 and the current time is 12:08 - in this case, the automatic update of the connection will occur at 12:10 the next day. If you select the time 12:20 and the current time is 12:13 - the auto-update of the connection will work today and then every day at 12:20.
To make the current connection transmit data only after another connection, check the box "Update connection only after start other connection" and specify the connection after which the current connection will be started.


To enable auto-update, switch the slider to the position as shown in the picture.
To force the connection, click on the arrow icon.

This completes the Omnisend Contact Data Search setup! See how easy it is!?
Now don't worry, ApiX-Drive will do everything on its own!