onCampaignPublishedEvent( )


Notes:

Triggered when a draft campaign is published.

Permissions
Access Verticals by Automations
Set Up Automations
Manage Email Marketing
Read Email Marketing
Learn more about app permissions.
Method Declaration
Copy
function onCampaignPublishedEvent(handler: function): void;
Method Parameters
handlerfunction

handler(event: CampaignPublishedEnvelope): void | Promise<void>

JavaScript
import { campaigns } from "@wix/email-marketing"; campaigns.onCampaignPublishedEvent((event) => { // handle your event here });
Did this help?