Exchange Online (Graph API)

Version: 1.2.0

Microsoft Exchange Server is a mail server and calendaring server developed by Microsoft. This integration relies on EWS being enabled for the server.

🚧

Exchange Online (Graph API) Ver: 1.2.0

Existing Exchange Online (Graph API) Ver: 1.2.0 with ID: logichub.exchange_graph has been deprecated.

👍

Microsoft Graph Ver: 1.5.1

Latest Microsoft Graph Ver: 1.5.1 with ID: logichub.microsoft_graph has been introduced.

Connect Exchange Online (Graph API) with LogicHub

  1. Navigate to Automations > Integrations.
  2. Search for Exchange Online.
  3. Click Details, then the + icon. Enter the required information in the following fields.
    • Label: Enter a connection name.
    • Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
    • Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
    • Remote Agent: Run this integration using the LogicHub Remote Agent.
    • Tenant ID: Tenant ID of the app created in Azure Active Directory.
    • Client ID: Client ID of the app created in Azure Active Directory.
    • Client Secret: Client secret of the app created in Azure Active Directory.
  4. After you've entered all the details, click Connect.

Actions for Exchange Online (Graph API)

List messages

Get the messages of a user via User ID or Principal Name (including the Deleted Items and Clutter folders).

Input

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
User's Principal Name or User's Unique Identifier (ID) Column NameJinja-templated string containing user's principal name or user's unique identifier(id).Required
Mailbox FolderJinja-templated Path & name of the folder from which to pull email messages (typically Inbox).Required
Custom OData QueryJinja-templated custom OData query to retrieve a list of messages. Refer to Query Parameters to construct a valid OData query.
Example: $filter=subject eq '{{subject_column}}' and from/emailAddress/address eq '{{sender_email_column}}'&$top=5. (Default is no filter).
Required
Mark ReadAutomatically mark messages read when they are pulled by LogicHub. Possible values are True/False. (Default is False).Required
Unread OnlyPull only unread messages. Possible values are True/False. (Default is False).Required
Download AttachmentsAutomatically download all attachments with the mail. Possible values are True/False. (Default is False).Required
Number of Messages to be FetchedNumber of messages to be fetched. It'll override $top provided in "Custom OData query" (Default is 10 messages if it is not provided in "Custom OData query" also).Required

Output

Return an array of JSON objects, with each object representing a different user.

{
   "body_html":"<html><head></head><body>....rest of the body</body></html>",
   "body":"<html><head></head><body>....rest of the body</body></html>",
   "subject":"Undeliverable: Meet for lunch?",
   "msgid":"<[email protected]od.outlook.com>",
   "date_received":"2021-03-26T04:06:24Z",
   "body_type":"html",
   "urls_probable":[
      
   ],
   "urls":[
      "https://go.microsoft.com/fwlink/?LinkId=389361"
   ],
   "recipients":[
      "[email protected]"
   ],
   "is_read":true,
   "urls_all":[
      "https://go.microsoft.com/fwlink/?LinkId=389361"
   ],
   "date_sent":"2021-03-26T04:06:23Z",
   "has_error":false,
   "error":null,
   "lhub_ts":"1616735198000",
   "from":[
      {
         "email":"[email protected].onmicrosoft.com",
         "name":"Microsoft Outlook"
      }
   ],
   "categories":[
      
   ],
   "sender":"[email protected].onmicrosoft.com",
   "body_text":"Delivery has failed to these recipients or groups:\r\n\r\[email protected] (da[email protected])\r\nYour message couldn't be delivered. Despite repeated attempts to deliver your message, querying the Domain Name System (DNS) for the recip",
   "changekey":"FwAAABYAAABumxNVnY6FRKYhhP9H7JpwAAHaqjYw"
}

Send message

Send message to email addresses.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
User's Principal Name or User's Unique Identifier (ID) Column NameJinja-templated string containing user's principal name or user's unique identifier(id).Required
Mail RecipientsJinja-templated comma separated email ids.Required
Mail SubjectJinja-templated string containing the mail subject.Required
TypeSelect type of email body. Possible values are Plain Text / HTML. (Default is Plain Text).Required
Mail BodyJinja-templated string containing the mail body.Required
Cc On Outbound E-mailJinja-templated comma separated email ids, which would be added to cc of the email.Required
AttachmentColumn containing one or more file IDs to attachment. (Can be a comma separated string of lhub_file_id values or a json dict in the format of {"<lhub_id>":"<file_name>"}).Required
Attachment File ExtensionIf no file name is provided, add this extension to attached files.Required

Output

  • recipients: Array of emails to which mail is sent
  • date_sent: Date in UTC
  • msg: Success message
  • cc: Array of cc added. If no email is added in cc, then this remains empty array.
  • attachments: Array of attachments added. If no attachment added, then this remains empty array.
{
   "recipients":[
      "[email protected]"
   ],
   "date_sent":"2021-03-26 06:21:42 UTC",
   "msg":"E-mail sent successfully",
   "cc":[
      
   ],
   "attachments":[
      
   ]
}

Release Notes

  • v1.2.0 - Deprecated the Integration.

© 2017-2021 LogicHub®. All Rights Reserved.