Sendio.Automations (sendio v1.1.0)

Manage automations in Sendio.

Browse the automation template catalog with Sendio.Automations.Templates.

Summary

Functions

Creates an automation from an automation template, in one transaction: the events your team does not have yet, the workflow's emails and the automation. The automation is created disabled.

Functions

Link to this function

create_from_template(params)

@spec create_from_template(map()) ::
  Sendio.Client.response(Sendio.Automations.Automation.t())

Creates an automation from an automation template, in one transaction: the events your team does not have yet, the workflow's emails and the automation. The automation is created disabled.

Parameter options:

  • :slug - The template's slug (required)
  • :sender - %{from: ..., reply_to: ...}; from must be on one of your verified sending domains (required)
  • :topic_id - The topic contacts can unsubscribe from (required for marketing templates)
  • :version - The template version you reviewed; a newer one returns 409 template_version_changed
  • :name - The automation name (1 to 120 characters). Defaults to the template's name
  • :events - Per event ref: %{mode: "create" | "existing", name: ...}

  • :params - Per param ref: a duration (e.g. "24 hours") or a URL

Request options (an optional keyword list after the parameters):

  • :idempotency_key - Sent as the Idempotency-Key header. Retrying with the same key returns the first result instead of creating a second automation.

    Sendio.Automations.create_from_template( %{slug: "email-verification-reminder", sender: %{from: "Acme hello@acme.com"}}, idempotency_key: "setup/verify-reminders" )

Link to this function

create_from_template(client, params)

Link to this function

create_from_template(client, params, request_opts)