Search Query On SharePoint Online And Office 365 Using Nintex Workflows

Welcome to an article on "How to use action Office 365 Search Query on SharePoint Online and Office 365 using Nintex Workflows". This article will display the action “Office 365 search query.” Here, we will see how to configure this action and use it for our work.

Using this action, you can configure the search query on any SharePoint URL. Office 365 provides a very good search model which we never had in previous versions of SharePoint.

Let’s see the implementation of this functionality.

  • I have created a document library, “Dev Document”. In Dev Document, click on the Library tab at the Top ribbon and click on Nintex Workflows.

    Dev Document

  • You will see the following screen, to create a new workflow.
  • Click below “Create new workflow”.

    Create new workflow

  • You will now see the design phase of the Nintex workflows.

    design

  • Add the action, “Office 365 search query” by right clicking on the workflow or by dragging and dropping from the left toolbox.
    Office 365 search query
  • Now, let’s configure it.
  • When you double click on the action, the following screen opens:

    screen
    screen
    screen
    screen
    screen

Configuration:

  1. Destination site URL: Provide the URL where the search query should search.
  2. Search scope: You can provide a scope for the site search. For example, ‘All sites’.
  3. Result source: You can configure the results you want to see, from all or from the options below.

    Result

  4. Custom result source: Here you can provide a custom GUID of the result source.
  5. All of these words: You can provide words which you need as the results.
  6. The exact phrase: You can provide words which you need as the results.
  7. Any of these words: You can provide words which you need as the results, if it matches any.
  8. None of these words: You can provide words which you don’t need as the results.
  9. Result type: Here, you can choose the result type to be among the following options.

    Result

  10. Custom result type: You can have custom result type.
  11. Property restrictions: You can filter the result with property restrictions or you can return all items.

    Result

  12. Properties to return: Here, you can choose a variable to store the properties returned.
  13. Maximum number of results: Here, you can provide the value of what should be the max number of results.
  14. SharePoint Online URL: Provide the SharePoint's Online URL.
  15. Username: Provide the password.
  16. Password: Specify the password.
  17. Search query completed: Here, you can choose a variable to store ‘Yes’ if the query is completed.
  18. Query string: Here, you can choose a variable to store the query used for search.
  19. Number of results: Here, you can choose a variable to store the number of results returned as count.
  20. Result as XML: Here, you can choose a variable to store the result in XML format.
  • Now, we have configured our workflow. Let’s go and publish it.
  • Click on Publish, on the left corner of the ribbon of Nintex Designer.
    Publish
  • You will see the following screen: 

    screen

  • Give your workflow a name.
  • Description
  • Choose your task list where it should store the tasks; it will be Workflow Tasks by default.
  • Choose your history list where it should store the history logs; it will be Workflow History by default.

  • Start Options

    • You can either start your workflow manually, or you can start your workflow automatically when an item is created. 
    • I will select this option to create automatically when an item is created, or you can start your workflow automatically when an item is modified.
  • Click on Publish.
  • Your workflow will get published.

Once you have configured, the workflow will provide you the search result as per your requirement when the search query workflow executes.

So, in this article, we saw how to execute our own search query using the action "Office 365 Search Query" in SharePoint Online and Office 365 using Nintex Workflows. We will see more new articles on the actions of Nintex Workflows in the other parts of the article. Until then, keep learning!