Skip to content

Gmail Conditionals

Conditional Processing or Execution Conditions gives you the power to decide if a particular action on Gmail will be executed or not when the workflow is triggered by the incoming event. This is similar to the if-then-else logic applied to the execution of an action based on the attribute from the trigger event of the workflow.

Think of Conditional Processing as an equivalent of if-then-else, as decision diamond in the flow chart, or the Conditional Branching in BPEL (Business Process Execution Language).

You can add conditional processing to any action in your workflow and evaluate which actions should be performed in response to a particular trigger event identified by its characteristics or the data attributes. You can apply complex logic using AND, OR and grouping of such conditions. Each of the conditions supports different operators based on the event data type being a string (abc and 123), number (123), boolean (true/false) etc. Read here to find more about Conditional Processing.

Example Scenario

To better illustrate event filters, consider the scenario where you are using a Gmail enterprise email account to product support for your customers. When a customer sends an email to this address with the word Help in the subject line or the email body, their request will be logged into Salesforce as an open case for your customer care team to follow-up based on conditional Processing.

There could be multiple application actions attached to your flow to be invoked upon receiving the email help request, but each of the actions in the flow would apply its own execution condition based on the data attributes of the email sent. This will allow each of the actions to independently choose to execute based on the defined execution conditions.

Conditional Processing for Salesforce in Connect iPaaS

Figure 1. Conditional Processing for Salesforce in Connect iPaaS

Conditional Processing for Gmail in Connect iPaaS

Figure 2. Conditional Processing for Gmail in Connect iPaaS

In the example shown in Figure 1 and 2, the configured action will only be executed if conditions for when if the email Subject and HTML Body (plain text) contain the phrase "Help". When using Gmail as the trigger application, the following attributes will be available to you in all your application actions

  • From - Email Address : Email address the email was sent from
  • From - Name : Name of the person that the email was sent from
  • To - Email Address : Email address that the email was sent to
  • To - Name : Name of the person that the email was sent to
  • Cc - Email Address : Email address carbon copied (CC) in the email
  • Cc - Name : Name of the person who was carbon copied (CC) on the email
  • Date - Email Received : The date on which the email was received
  • Subject : Subject line of the email sent
  • HTML Body (plain text) : To extract the content of an email in plain text
  • HTML Body (HTML) : To extract the content of an email in HyperText Markup Language (HTML).