Flow integration example - DD Forms

Andy Chen Updated by Andy Chen

In this example, we will setup a flow that sends out notifications on a DD Form entry.

Use cases:

  1. Get notification on a form entry.
  2. Start a workflow based on the form entry's data.
This article shows you the one of the applications of the DeskDirector Flow Connector. Follow this article to learn how to setup the connector if you haven't already.

If you are new to Microsoft flow, you can learn more about it from here.

Flow Design

Trigger
  • When a ticket is created or updated - The flow is triggered by a new ticket created by a DD Form entry.
Actions
  • Get form result - the form entry's data
  • Condition - filter events by the user input data (optional)
  • Send an email - send a notification email

Instructions

  1. Create a new flow then select the "When a ticket is created or updated" trigger from the DD connector.
  2. Select New Ticket from the Event list and expand the advanced options.
  3. Select one of your forms under the Form list, for example New user is selected here.
  1. Create new action "Get form result" from the DD connector.
  2. Select the same form as in step 1, and specify the form entry ID.
  3. [Optional] Create new action "Condition" (this is Flow's built-in action)
  4. [Optional] Add your condition the action, for example if a new computer is required here

The new computer required field is from the new user form:

  1. [Optional] Finish the condition action, for example the value Yes is specified here
  2. [Optional] Add a terminate action if the condition is not met.
  1. Add an action to send notification. For example, an email is being sent in this example.

Test

  1. Create a new ticket with the selected form in DD portal. For example, the New user form here
  2. This should trigger the flow
Advanced

How to insert a form entry result as a complete message into an Email?

The "Get form result" helps you get a particular question the user entered in a form filed. It is useful in some cases, but if you just want to get the form result in the text format that can be inserted into another action, e.g. email action, the first note of the ticket is the dynamic content you will need.

How to get the first note?

Here are steps to get the first which involves some flow Expressions.

  1. Add the "Get ticket details" action from the DD connector to your flow. This returns the timeline of a given ticket.
  1. Filter out internal notes. This is to make sure no internal note will be sent out accidentally.

Add the "Filter array" from the built-in "Data Operation" and rename the action as "Public Notes".

Enter the expression @equals(item()?['isInternal'], false) in the advanced mode.

  1. Insert the first note.

Create an action like "Send an email" and put the email body and switch the email body to "Code View")

How to switch to code view:

Then put the expression first(body('Public_Notes')).note between the <pre> tags.

Finish look

Email sample

Notice that the note is in markdown format. If you would like convert it into other formats like HTML, there are third-party actions available on the flow platform.

How did we do?

Flow integration example - Microsoft Teams notifications

Flow integration example - workflow with user interactions

Contact