AACFlow

SendGrid

Send emails and manage contacts, lists, and templates with SendGrid

Usage Instructions

Integrate SendGrid into your workflow. Send transactional emails, manage marketing contacts and lists, and work with email templates. Supports dynamic templates, attachments, and comprehensive contact management.

Tools

sendgrid_send_mail

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
fromstringYesNo description
fromNamestringNoNo description
tostringYesNo description
toNamestringNoNo description
subjectstringNoNo description
contentstringNoNo description
contentTypestringNoNo description
ccstringNoNo description
bccstringNoNo description
replyTostringNoNo description
replyToNamestringNoNo description
attachmentsfile[]NoNo description
templateIdstringNoNo description
dynamicTemplateDatajsonNoNo description

Output

ParameterTypeDescription
successbooleanWhether the email was sent successfully
messageIdstringSendGrid message ID
tostringto output from the tool
subjectstringEmail subject

sendgrid_add_contact

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
emailstringYesNo description
firstNamestringNoNo description
lastNamestringNoNo description
customFieldsjsonNoJSON object of custom field key-value pairs (use field IDs like e1_T, e2_N, e3_D, not field names)
listIdsstringNoNo description

Output

ParameterTypeDescription
jobIdstringJob ID for tracking the async contact creation
emailstringemail output from the tool
firstNamestringfirstName output from the tool
lastNamestringlastName output from the tool
messagestringStatus message

sendgrid_get_contact

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
contactIdstringYesNo description

Output

ParameterTypeDescription
idstringContact ID
emailstringContact email address
firstNamestringContact first name
lastNamestringContact last name
createdAtstringCreation timestamp
updatedAtstringLast update timestamp
listIdsjsonArray of list IDs the contact belongs to
customFieldsjsonCustom field values

sendgrid_search_contacts

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
querystringYesSearch query (e.g., "email LIKE '%example.com%' AND CONTAINS(list_ids, 'list-id')")

Output

ParameterTypeDescription
contactsjsonArray of matching contacts
contactCountnumberTotal number of contacts found

sendgrid_delete_contacts

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
contactIdsstringYesNo description

Output

ParameterTypeDescription
jobIdstringJob ID for the deletion request

sendgrid_create_list

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
namestringYesNo description

Output

ParameterTypeDescription
idstringList ID
namestringname output from the tool
contactCountnumberNumber of contacts in the list

sendgrid_get_list

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
listIdstringYesNo description

Output

ParameterTypeDescription
idstringList ID
namestringList name
contactCountnumberNumber of contacts in the list

sendgrid_list_all_lists

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
pageSizenumberNoNo description

Output

ParameterTypeDescription
listsjsonArray of lists

sendgrid_delete_list

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
listIdstringYesNo description

Output

ParameterTypeDescription
messagestringSuccess message

sendgrid_add_contacts_to_list

Add or update contacts and assign them to a list in SendGrid (uses PUT /v3/marketing/contacts)

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
listIdstringYesNo description
contactsjsonYesJSON array of contact objects. Each contact must have at least: email (or phone_number_id/external_id/anonymous_id). Example: [{"email": "user@example.com", "first_name": "John"}]

Output

ParameterTypeDescription
jobIdstringJob ID for tracking the async operation
messagestringStatus message

sendgrid_remove_contacts_from_list

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
listIdstringYesNo description
contactIdsstringYesNo description

Output

ParameterTypeDescription
jobIdstringJob ID for the request

sendgrid_create_template

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
namestringYesNo description
generationstringNoNo description

Output

ParameterTypeDescription
idstringTemplate ID
namestringname output from the tool
generationstringTemplate generation
updatedAtstringLast update timestamp
versionsjsonArray of template versions

sendgrid_get_template

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
templateIdstringYesNo description

Output

ParameterTypeDescription
idstringTemplate ID
namestringTemplate name
generationstringTemplate generation
updatedAtstringLast update timestamp
versionsjsonArray of template versions

sendgrid_list_templates

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
generationsstringNoNo description
pageSizenumberNoNo description

Output

ParameterTypeDescription
templatesjsonArray of templates

sendgrid_delete_template

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
templateIdstringYesNo description

Output

ParameterTypeDescription
successbooleanOperation success status
messagestringStatus or success message
messageIdstringEmail message ID (send_mail)
tostringRecipient email address (send_mail)
subjectstringEmail subject (send_mail, create_template_version)
idstringResource ID
jobIdstringJob ID for async operations
emailstringContact email address
firstNamestringContact first name
lastNamestringContact last name
createdAtstringCreation timestamp
updatedAtstringLast update timestamp
listIdsjsonArray of list IDs the contact belongs to
customFieldsjsonCustom field values
contactsjsonArray of contacts
contactCountnumberNumber of contacts
listsjsonArray of lists
namestringResource name
templatesjsonArray of templates
generationstringTemplate generation
versionsjsonArray of template versions
templateIdstringTemplate ID
activebooleanWhether template version is active
htmlContentstringHTML content
plainContentstringPlain text content

sendgrid_create_template_version

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
templateIdstringYesNo description
namestringYesNo description
subjectstringYesNo description
htmlContentstringNoNo description
plainContentstringNoNo description
activebooleanNoNo description

Output

ParameterTypeDescription
idstringVersion ID
templateIdstringtemplateId output from the tool
namestringname output from the tool
subjectstringEmail subject
activebooleanWhether this version is active
htmlContentstringHTML content
plainContentstringPlain text content
updatedAtstringLast update timestamp

On this page

Start building today
Trusted by over 100,000 builders.
The SaaS platform to build AI agents and run your agentic workforce.
Get started