Setu Recipes: reusable digital workers across every app.Browse templates

Integrations / Brevo

Brevo

Email and SMS marketing and transactional email: contacts, lists and sending.

6 actions API key 3 read3 write Calls api.brevo.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "brevo" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

This toolkit uses a single credential and requests no scopes.

Actions

Create contactwritebrevo.create_contactCreate a contact by email (or external id), optionally adding it to lists. With update_enabled true an existing contact is updated instead of failing.
InputTypeDescription
emailstringOptionalContact email
ext_idstringOptionalYour own id for the contact
attributesobjectOptionalAttribute name to value, names in capitals, e.g. FNAME; attributes must already exist in Brevo
list_idsarray of integerOptionalList ids to add the contact to
update_enabledbooleanOptionalUpdate the contact if it already exists
TypeScript
await setu.execute({
  userId: "user_1",
  action: "brevo.create_contact",
  input: {},
});
Get accountreadbrevo.get_accountGet the Brevo account's company name, login email and plan information.

No input.

TypeScript
await setu.execute({
  userId: "user_1",
  action: "brevo.get_account",
  input: {},
});
List contactsreadbrevo.list_contactsList contacts, newest first, optionally restricted to a list, a segment or an attribute filter such as equals(FIRSTNAME,"Antoine").
InputTypeDescription
limitintegerOptionalContacts per page (max 1000, default 50)
offsetintegerOptionalIndex of the first contact
list_idintegerOptionalOnly contacts in this list id
segment_idintegerOptionalOnly contacts in this segment id
filterstringOptionalAttribute filter, equals() only
sortstringOptionalCreation date order
TypeScript
await setu.execute({
  userId: "user_1",
  action: "brevo.list_contacts",
  input: {},
});
List contact listsreadbrevo.list_listsList contact lists with ids, names and subscriber counts.
InputTypeDescription
limitintegerOptionalLists per page (default 10)
offsetintegerOptionalIndex of the first list
sortstringOptionalCreation date order
TypeScript
await setu.execute({
  userId: "user_1",
  action: "brevo.list_lists",
  input: {},
});
Send transactional emailwritebrevo.send_transactional_emailSend one transactional email to a single recipient, either with inline HTML or from an existing template id. The sender must be a verified Brevo sender.
InputTypeDescription
to_emailstringRequiredRecipient email
to_namestringOptionalRecipient name
sender_emailstringOptionalVerified sender email
sender_namestringOptionalSender name
subjectstringOptionalSubject line (not needed with templateId)
html_contentstringOptionalHTML body (not needed with templateId)
template_idintegerOptionalBrevo template id to use instead of inline content
TypeScript
await setu.execute({
  userId: "user_1",
  action: "brevo.send_transactional_email",
  input: {
    "to_email": "<to_email>"
  },
});
Update contactwritebrevo.update_contactUpdate a contact found by email (default), contact id or another identifier type: attributes, list membership and blocklist flags.
InputTypeDescription
identifierstringRequiredContact email, id, ext_id or other identifier
identifier_typestringOptionalHow to read identifier
attributesobjectOptionalAttribute name to value, names in capitals; attributes must already exist
list_idsarray of integerOptionalList ids to add the contact to
unlink_list_idsarray of integerOptionalList ids to remove the contact from
email_blacklistedbooleanOptionalBlock or allow email to this contact
TypeScript
await setu.execute({
  userId: "user_1",
  action: "brevo.update_contact",
  input: {
    "identifier": "<identifier>"
  },
});