mailmoo_campaign_create
Create a campaign
Creates a new campaign, switched off, with its senders and a sequence. The sequence is copied from another campaign (copySequenceFrom: steps, messages, branches and sending schedule), or built from a template with messages written from the workspace's company and ideal customer context (the default), or left empty. Then add leads. Existing leads in the workspace: leads_enroll. New people: prospects_search, then prospects_add_to_campaign (spends credits; also takes a pasted people-search URL as query). When the user has not said where the leads come from, ask: existing leads (which campaign or filter), the prospect finder (describe the audience), or a pasted people-search URL. Rows from a file or a pasted list: leads_import. When copySequenceFrom's sequence has flow problems (warnings.flowProblems, such as a path after a connection request that sends nothing), tell the user: the copy brings them along. Never starts the campaign: that is campaign_set_state, after the user confirms. To run an existing campaign's leads again, use campaign_rerun instead.
Effect: Write. See Effects.
Permissions: Read campaigns, Write campaigns.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the new campaign. |
senders | array of string | Yes | Sender profiles by name or id, from senders_list. |
copySequenceFrom | string | No | Copy the sequence and schedule of this campaign, by name or id. |
template | basic-outreach, outreach-inmail-fallback, advanced-multi-touch, basic-outreach-icp-filter | No | Sequence template when not copying. Defaults to basic-outreach. |
writeMessages | boolean | No | With a template, write the step messages from the workspace's context. Defaults to true. |
messageInstructions | string | No | Direction for the written messages, e.g. the audience and angle. |
emptySequence | boolean | No | Create the sequence with no steps instead, to build step by step with campaign_add_step. For outreach with a connection request, a template is quicker: it already has the two Is connected checks the request needs. |
timeZone | string | No | IANA time zone for the sending schedule, e.g. Europe/Helsinki. Not used when copying. |

