communication
SendGrid CLI for Cron Jobs
Use the SendGrid CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write API key auth
SendGrid CLI for Cron Jobs
Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.
Use the headless CLI from cron when an operation should run without an interactive agent session. The SendGrid CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# SendGrid CLI for Cron Jobs
kosmokrator integrations:configure sendgrid --set api_key="$SENDGRID_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call sendgrid.sendgrid_list_contacts '{"page_size":1,"page_token":"example_page_token"}' --json Discovery Before Execution
Agents and scripts can inspect SendGrid docs and schemas before choosing a function.
kosmo integrations:docs sendgrid --json
kosmo integrations:docs sendgrid.sendgrid_list_contacts --json
kosmo integrations:schema sendgrid.sendgrid_list_contacts --json
kosmo integrations:search "SendGrid" --json
kosmo integrations:list --json Useful SendGrid CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
sendgrid.sendgrid_list_contacts | Read | page_size, page_token | List contacts in your SendGrid marketing contacts database. Supports pagination. |
sendgrid.sendgrid_send_email | Write | from, to, subject, htmlContent, textContent | Send an email via SendGrid. Specify sender, recipients, subject, and HTML or text content. |
sendgrid.sendgrid_get_contact | Read | id | Get details of a specific contact in SendGrid by their contact ID. Returns email, custom fields, and list memberships. |
sendgrid.sendgrid_get_current_user | Read | none | Get the profile of the currently authenticated SendGrid user, including email, first name, and last name. |
sendgrid.sendgrid_get_template | Read | id | Get details of a specific email template in SendGrid by its ID. Returns template name, versions, and active version content. |
sendgrid.sendgrid_list_emails | Read | limit, query | List emails in your SendGrid account. Supports filtering by query and pagination. |
sendgrid.sendgrid_list_templates | Read | page_size, page_token | List email templates in your SendGrid account. Supports pagination. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.