Skip to main content

Marketing / email / form agent skills for Concinno — Mailchimp + Typeform + SendGrid via pure httpx REST (no vendor SDK bloat).

Project description

concinno-skills-marketing

Marketing / email / form agent skills for Concinno. Native Python REST wrappers — zero vendor SDK dependencies, pure httpx + MIT throughout. Covers the three most common stacks agents hit when automating marketing workflows: Mailchimp (newsletters), Typeform (surveys / lead capture), SendGrid (transactional email).

Status

MVP (0.1.0) — three one-shot tools:

Tool class Platform Underlying transport Licence
MailchimpCampaign Mailchimp httpx (REST v3) MIT
TypeformForm Typeform httpx (REST) MIT
SendGridSend SendGrid httpx (REST v3 Mail) MIT

All three platforms are reached via httpx directly; this package therefore adds zero runtime dependencies beyond httpx (already a Concinno main dep) and Concinno itself.

Install

pip install concinno-skills-marketing

Credentials

Each platform's credentials live under well-known keys in the Concinno CredentialStore, which reads (in order):

  1. Process runtime overrides via CredentialStore.set(...).
  2. Env var CONCINNO_CRED_<UPPER_KEY>.
  3. ~/.concinno/credentials.json.

Mailchimp

Key Env var
mailchimp_api_key CONCINNO_CRED_MAILCHIMP_API_KEY
mailchimp_dc CONCINNO_CRED_MAILCHIMP_DC (optional)

The data-center suffix (e.g. us21) is auto-parsed from the API key's trailing -us21 / -us1 segment when mailchimp_dc isn't provided explicitly.

Typeform

Key Env var
typeform_token CONCINNO_CRED_TYPEFORM_TOKEN

SendGrid

Key Env var
sendgrid_api_key CONCINNO_CRED_SENDGRID_API_KEY

Example ~/.concinno/credentials.json:

{
  "mailchimp_api_key": "abc123def456-us21",
  "typeform_token": "tfp_xxxxxxxxxxxxxxxxxxx",
  "sendgrid_api_key": "SG.xxxxxxxxxxxxxxxx"
}

If a token is missing the tool returns {"error": "no <service> credentials — set via CredentialStore / env"} rather than crashing.

Usage via Concinno ToolRegistry

When the consumer sets CONCINNO_LOAD_PLUGINS=1, the default registry auto-mounts every marketing tool:

import os
os.environ["CONCINNO_LOAD_PLUGINS"] = "1"

from concinno.tools.registry import get_default_registry

reg = get_default_registry()
assert {"MailchimpCampaign", "TypeformForm", "SendGridSend"} <= set(
    reg.list_deferred()
)

mc = reg.get("MailchimpCampaign")
mc.call(action="list_campaigns", limit=20)

Direct Python usage

from concinno_skills_marketing import (
    MailchimpCampaign,
    TypeformForm,
    SendGridSend,
)

# Mailchimp: list campaigns, list members, add a subscriber.
MailchimpCampaign().call(action="list_campaigns", limit=20)
MailchimpCampaign().call(action="list_members", list_id="abc123")
MailchimpCampaign().call(
    action="add_member",
    list_id="abc123",
    email_address="subscriber@example.com",
    status="subscribed",
)

# Typeform: read a form definition, list responses, export as CSV.
TypeformForm().call(action="get_form", form_id="Xy7aBc")
TypeformForm().call(
    action="list_responses", form_id="Xy7aBc", page_size=20
)
TypeformForm().call(
    action="export_csv", form_id="Xy7aBc", page_size=100
)

# SendGrid: transactional email.
SendGridSend().call(
    action="send",
    to="user@example.com",
    from_email="noreply@acme.com",
    subject="Welcome!",
    body="Thanks for signing up.",
)

All tools return {"ok": True, ...} or a structured payload on success, or {"error": "..."} on failure — same shape as the other Concinno built-in tools. No exceptions escape the call() surface.

Concurrency

All three tools set is_concurrency_safe = False. Mailchimp enforces per-account concurrency caps (typically 10 simultaneous connections), Typeform applies tenant-scoped rate limits, and SendGrid orders message sends per API key. The Concinno scheduler will honour this automatically.

Safety caps

  • Mailchimp limit clamped to 1000 (API per-page cap).
  • Typeform page_size clamped to 1000 (API per-page cap).
  • Typeform export_csv output capped at 1 MB of CSV bytes.
  • SendGrid body1 000 000 chars; attachments list (if supplied) must be already base64-encoded.

Licence

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

concinno_skills_marketing-0.1.0.tar.gz (43.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

concinno_skills_marketing-0.1.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file concinno_skills_marketing-0.1.0.tar.gz.

File metadata

File hashes

Hashes for concinno_skills_marketing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d076e5a561cca17b3fa12844992244f82c12a632337c164e5016d085077632f
MD5 09c6c753c8bbb699679a46394a3aed57
BLAKE2b-256 6dfb6905af52d01df962079d8ddb17d209995daafb75a9e4db5e61b33463e1c2

See more details on using hashes here.

File details

Details for the file concinno_skills_marketing-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for concinno_skills_marketing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a458efacf6c7915faa9a841f964d211c8aa77250bbc39b2eb050ac52c619bf9b
MD5 86d68456fba7c83f62e193f71c28b086
BLAKE2b-256 becf57dfe71456b896a801529460806981418508c3bcdd7c6e93254f35340561

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page