~4 min8 / 12

HTTP & Email Activities

Make REST API calls, download files from URLs, send emails via SMTP, and retrieve emails via IMAP. 4 activities covering the most common integration patterns.

HTTP Request

Sends an HTTP/HTTPS request and returns the response body and status code.

ParameterTypeDefaultDescription
UrlStringFull request URL including scheme (e.g., https://api.example.com/orders)
MethodGET | POST | PUT | PATCH | DELETEGETHTTP method
HeadersString (JSON object)Request headers as JSON, e.g. {"Authorization":"Bearer token"}
BodyStringRequest body (JSON, form-encoded, etc.) — used for POST/PUT/PATCH
ContentTypeStringapplication/jsonContent-Type header value
TimeoutMsInt3230000Request timeout in milliseconds
OutputVariableStringVariable to store the response body (String)
StatusVariableStringVariable to store the HTTP status code (Int32)
workflow
1HTTP Request:
2 Url: "https://api.example.com/orders/{orderId{'}'}"
3 Method: GET
4 Headers: '{"Authorization": "Bearer {apiToken{'}'}"}'
5 OutputVariable: "responseBody"
6 StatusVariable: "statusCode"
7 
8// Use the response
9Assign Variable="orders" Value="${responseBody}"
JSON parsingAfter an HTTP Request, use Parse JSON (in the JSON/XML category) and Get JSON Value to extract specific fields from the response body.

Download File

Downloads a file from a URL and saves it to disk.

ParameterTypeRequiredDescription
UrlStringYesFile URL
DestinationPathStringYesLocal file path to save to (including filename)
OverwriteBooleanNo (default: false)Replace the file if it already exists
HeadersString (JSON)NoRequest headers (e.g., for authenticated downloads)

Send SMTP Email

Sends an email via SMTP. Supports plain text and HTML bodies, and file attachments.

ParameterTypeRequiredDescription
SmtpHostStringYesMail server hostname (e.g., smtp.gmail.com)
PortInt32YesSMTP port (587 for TLS/STARTTLS, 465 for SSL)
UsernameStringYesSender email / SMTP login
PasswordStringYesSMTP password — always use a variable, never plain text
FromStringYesSender display address
ToStringYesRecipient email address(es), comma-separated
SubjectStringYesEmail subject line
BodyStringYesEmail body — plain text or HTML
IsHtmlBooleanNo (default: false)Treat body as HTML markup
AttachmentsString (comma-separated paths)NoFile paths to attach
CcStringNoCC recipients, comma-separated
BccStringNoBCC recipients, comma-separated
workflow
1Send SMTP Email:
2 SmtpHost: "smtp.gmail.com"
3 Port: 587
4 Username: "{smtpUser{'}'}"
5 Password: "{smtpPassword{'}'}"
6 From: "reports@company.com"
7 To: "{recipientEmail{'}'}"
8 Subject: "Daily Report - {today{'}'}"
9 Body: "<h1>Report attached</h1><p>Please find the report for {today{'}'}</p>"
10 IsHtml: true
11 Attachments: "{reportFilePath{'}'}"
Credentials SecurityNever hard-code SMTP passwords. Store them in a workflow variable loaded from a secure configuration file, or use the Orchestrator Secrets Vault if running via Orchestrator.

Get IMAP Emails

Retrieves emails from an IMAP mailbox (Gmail, Outlook.com, Exchange, or any IMAP server). Returns a list of mail message objects.

ParameterTypeRequiredDescription
ImapHostStringYesIMAP server hostname (e.g., imap.gmail.com)
PortInt32No (default: 993)IMAP port — 993 for SSL
UsernameStringYesEmail address / IMAP login
PasswordStringYesIMAP password
FolderStringNo (default: INBOX)Mailbox folder to read from
UnreadOnlyBooleanNo (default: true)Only retrieve unread messages
MarkAsReadBooleanNo (default: false)Mark retrieved messages as read
MaxMessagesInt32No (default: 10)Maximum number of messages to retrieve
OutputVariableStringYesList variable to store retrieved mail message objects
workflow
1Get IMAP Emails:
2 ImapHost: "imap.gmail.com"
3 Username: "{emailUser{'}'}"
4 Password: "{emailPassword{'}'}"
5 UnreadOnly: true
6 MaxMessages: 50
7 OutputVariable: "emails"
8 
9For Each: itemVar="email" Collection="${emails}"
10 Body:
11 Assign Variable="subject" Value="${email.Subject}"
12 Assign Variable="body" Value="${email.Body}"
13 ...
Was this helpful?