ActiveCampaign

How to set up your OneSignal integration inside of ActiveCampaign

What does this integration offer?

  • Send Push Notifications: Trigger web or mobile push messages directly from the automation canvas.
  • Customize Your Messages: Use a OneSignal template or create a message from scratch.
  • Personalize Notifications: Tailor each notification with data from your contact, deal, and account records.
  • At this time, this integration does not support in-app messaging.

Requirements


  1. ActiveCampaign account: This integration is available on all ActiveCampaign plans. Account must have automation permissions. Start a free trial here.
  2. OneSignal Pricing Plan. This integration is available on a Growth plan or higher. If you need help with pricing, please check out our Pricing Page and reach out to us with any questions.
  3. The OneSignal Mobile SDK and/or Web SDK.
  4. Setting the OneSignal External ID field to match the Email Address field in ActiveCampaign. 
    1. This integration does not support OneSignal’s Email & SMS or in-app mobile notifications.
    2. OneSignal does not push the email address captured from the Email & Phone web permission prompts within the Permission Prompt Setup
  5. For web push notifications: OneSignal stopped supporting new apps from using Blogger, Squarespace, Webflow, Weebly, Wix, HTTP sites, and website builders that don't support uploading Service Workers to a server (which are required for web push). Learn more here
    1. Wix Studio customers: Please review this article about uploading OneSignal's service worker file to your root directory.
    2. Bubble.io customers: Paid plans allow users to upload to the root directory.**

Connect OneSignal to ActiveCampaign to send push notifications

  1. Ensure you have the following setup on the OneSignal side: OneSignal account configured to send push notifications and OneSignal Templates (optional).

  2. Gather the following information from OneSignal for step 5 (below):

    1. User Auth Key - This is the account-level key and is located under Account & API Keys
    2. OneSignal app Rest API key - This is the app-level API key and is located under the ActiveCampaign App > Keys & IDs for the ActiveCampaign app
  3. From ActiveCampaign, create or edit an automation.

  4. Search and drag the OneSignal action to your automation. It is under the “CX Apps” portion of the automation action menu in your right panel.

  5. Complete the following steps in the OneSignal automation action to connect the integration:

    1. Paste your User Auth Key into the field provided, then click “Connect”
    2. Select the app you wish to use from the dropdown menu
    3. Paste the OneSignal app Rest API key
    4. To manually create a push notification in the automation action, enter your URL, heading (subject line), and content.
    5. To use an existing OneSignal template, please select from the dropdown list.
    6. Click the “Finish” button

Personalization tags: ActiveCampaign personalization tags may be used when creating a new push notification message. However, personalization tags do not work with OneSignal templates.

📘

Tip

Review your OneSignal Template settings to allow pushes on various devices.

Capture email address for OneSignal with ActiveCampaign Forms

This option is for advanced users. You need to be comfortable with HTML.

With the OneSignal Web SDK, you can add custom code to your ActiveCampaign Forms to capture the contact’s email address on submission and add them as subscribers in OneSignal.

First, install the OneSignal Web SDK on your website by following the startup guide from OneSignal’s documentation.
Once you have verified that the Web SDK has been installed, the next step is to add the ActiveCampaign form to your site.

In ActiveCampaign:

  1. Click Website > Forms on the left menu.
  2. Create a new form and choose the “Inline form” option.
  3. After designing the form, click the “Integrate” button on the top right corner.
  4. Find the “full embed” code, select it, and copy it.

In your website’s HTML (where the ActiveCampaign Form will be displayed):

  1. Paste in the copied form code.
  2. Search for a function in the included javascript called form_submit. The first line in this function should be e.preventDefault() This is important.
  3. The OneSignal code should be inserted after the e.preventDefault() line in this function.
  4. On a new line below the e.preventDefault() line, add the following code:
const userEmail = document.getElementById("email").value;
OneSignalDeferred.push(async function(OneSignal) {
    await OneSignal.User.addEmail(userEmail);
    await OneSignal.login(userEmail);
 });

When your ActiveCampaign form is submitted, the submitter’s email address will be passed into the OneSignal External ID field.

Troubleshooting