Skip to main content

Using Conditions and Filters with Document Studio

Document Studio enables you to add one or more conditions to your workflow rules and thus the automation will only process rows of a sheet that match the specified criteria. Conditions are also applied to incoming Google Form submissions and a response is processed only when the user's answers match the specified conditions.

Here are some instances where conditions can be applied in workflows:

  • If you have a Google Sheet with names of all the students of a class, you can choose to send an interview email invite to only those students who have GPA above 9.
  • If your Google Form asks for the age of the submitter, you can choose to send a notification email to the parent if the age entered is less than 18.
  • Any order placed online using Google Forms can be directed to the right department. For instance, if the customer orders a mobile phone, the electronics department can be notified. If a book is ordered, the department for books and stationery can be notified.
  • If you are using Google Forms for tech support, you can send an escalation email to the manager if the customer has selected "high" for the severity level.
  • You can use a Google form as a quiz, and only create certificates for the applicants who have obtained a full score.
  • If you have a Google Sheet with names and email addresses of people who would like to attend a webinar on Zoom or Google Meet, you can send reminder emails based on the event date.

AND-OR Operator Blocksโ€‹

Conditions in Document Studio are grouped into Blocks. The workflow will be processed only if ALL conditions defined in at least one block are satisfied. If any one condition belonging to a particular block is not satisfied, the workflow doesn't run, and the conditions in the next block are checked against the sheet row.

For instance, in the screenshot below, there are two blocks. The first block has two conditions against the name and gender columns. If both these name and gender conditions are satisfied, the workflow will be processed else it will evaluate conditions in the second block and so on.

Conditions in Document Studio


All conditions belonging to at least one block should be true for the workflow to run.


Multiple tasks can be added to each workflow, and ALL tasks within that workflow will be executed if the conditions are satisfied. To specify a different set of conditions for some tasks, please create another workflow with those tasks.

For Text Fieldsโ€‹

Is Any ofAnswer should be one of the specified list of values. Please specify the list of values by separating them with a comma or by pressing the Tab key after each value.You can specify a condition for the workflow to run only if the answer field is any of United States, USA, US. The condition will be satisfied if the spreadsheet cell contains any one of these values. Similarly, the specified list for the month entered can be Jan, January. The workflow will run for rows that have either of these values.
Is none ofAnswers should not match any of the items specified in the list.If the specified list is United Kingdom, UK, Great Britain, the condition will be satisfied for all rows except those that contain any of these values.
ExistsThe user's answer in the Google Form, or the cell value in the sheet, contains at least one character.If the answer in the specified field contains any character, it will satisfy this condition. This will also match answers like 0 but blank value will not be matched.
Does not ExistThe cell value in sheet or answer field in Google Form should be blank or non-existent.If the answer in the specified field is left blank, it satisfies this condition.
Exactly MatchesThe answer is exactly the same as the specified text (case insensitive).Netherlands will match both Netherlands and netherlands but it will not match Nether Lands or Nethrelands. Similarly, Jan would not match January but would match january.
Does not exactly matchThe answer should not be the same as the specified text.If the condition specified is that the grade entered does not exactly match F, the workflow will run for all other grades except F.
ContainsText is anywhere inside the answer field (it can also be a substring of a word)Czech would match Czechoslovakia as well as The Czech Republic.
Does not ContainAnswer does not contain the specified textThis condition can be used if you want your workflow to run for only those rows that do not contain the specified text.
Starts withAnswer that starts with the specified text or character$ would match $50 and ยฃ would match ยฃ100.
Does not start withAnswer should not start with the specified text or characterThis condition can be used if you want your workflow to run for only those rows, the entries of which do not start with the specified text.
Ends withAnswer ends with the specified textInc. would match all answers ending with Inc. If you have a list of employees from different companies, you can send an email to employees who work for specific companies by looking at their domains in email addresses.
Does not end withAnswer does not end with the specified textThis condition can be used if you want your workflow to run for only those rows, the entries of which do not end with the specified text. For instance, if you set this as,, it will process all records except where the email address is neither of these two values.

For Numeric Fieldsโ€‹

Greater thanAnswer is greater than or equal to the specified numberIf the recipients' age, calculated using the DATEDIF function with entered date of birth, is less than 18, an email can be sent to the parent's address.
Less thanAnswer is less than or equal to the numberIn the list of students of different grades willing to go for a school trip, if the student's age is less than 18 (minor), consent forms can be sent to their parents to confirm that their children have permission to join in.
Equal toAnswer matches the specified numerical valueYou can use this condition for more specific cases, for instance, to make a certificate for students with a full score in a quiz made using Google Forms.
Not equal toAnswer does not match the specified numerical valueIf a student's score in a quiz is not equal to the maximum attainable score, they can be sent an email with their score and attached correct answers.

Regular Expressions (RegEx)โ€‹

These are for advanced users and some knowledge of regular expressions is essential.

Matches RegExThe cell value or user's answer in the form satisfies the regular expression^\d{5,6}(?:[-\s]\d{4})?$ will match the zip code.
Does not match RegExThe cell value or user's answer in the form does not satisfy the regular expression^\d+$ will ensure that the input text does not contain all digits.