Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation to set multiple selection fields from a comma separated text field

Eric Younkin August 22, 2025

Hi, I've got a tough one for you automation gurus!:

I am pulling over selections from Gravity Forms on a website and using Zapier to create a Jira ticket and dump those selections in. That is working perfectly, but GF / Zap dumps all of them in as comma separated values. As an example, here is the raw field I get from the Zap:

 

Screenshot 2025-08-22 111015.png

 

I need to use automation to take these, look for matches, and select the corresponding values in a multiselection custom field. For instance:

  • If "years-startup" is present, add "option 1" in the multiselect field in Jira
  • If "years-0-to-3-years" is present, also add "option 2" in the multiselect field
  • Obviously, if the fields are not present, nothing would be added. The example above is with all fields selected so I know what the values look like when they come over.

Looking at Atlassian's documentation, I came up with an automation I thought would work using JSON to edit the field (custom field 10104 is the "RAW - How Long Have You Been In Business" field above, populated by Zapier):

 

Screenshot 2025-08-22 112054.png 

 

This automation passes validation, and says successful on the audit, but nothing is changed in the multiselect field ("TEST HOW LONG HAVE YOU BEEN IN BUSINESS"). That multiselect field has Option 1, Option 2, etc to match the formula above. So basically, it says it runs, but nothing happens. I'm assuming this is because it needs to parse out the comma separated values first, but I don't know how to do that with JSON.

Please help!

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2025

Hi @Eric Younkin 

There are many problems the built-in rule validation cannot detect, and in this case it is not detecting the incorrect JSON, which seems to imply a mapping function for the values...which does not exist.

In some cases, one would use a conditional expression to build the dynamic JSON: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

However, that will not work directly for your case because there could be zero-to-many values, and you do not know which one is last.  That bit is important to avoid a trailing comma, which would break the precise JSON format (which automation rules use :^)

 

Back to the problem, you have several alternatives:

  • Convert the values before they reach Jira
  • Use the text replace() function
    • Using a Created Variable, use a ginormous chain of replace() functions to substitute the values: input for output
    • Using another variable, split that into a list to create the dynamic JSON expression; this one is needed to avoid timing problems in the edit action
    • Use that second variable as the JSON for the update
  • Same as the above option, except use a ginormous chain of conditional expressions to perform the replacements / mapping of values
  • A more complex, but perhaps more maintainable method is using dynamic searching and a lookup table.  This approach is defined in this article I wrote.
    • Create a dynamic regular expression, based upon the values you received as inputs, storing that in a Created Variable
    • Create a Lookup Table for the mapping of values
    • Flatten those into a delimited list of key / value pairs using the entries function, storing that in a Created variable.
    • Split the flattened data into a list, filter it with the match() function and the regular expression
    • Parse out the new values
    • Build the dynamic JSON from the result, storing that in a variable
    • Use that final variable in the edit

 

Kind regards,
Bill

Eric Younkin August 22, 2025

Thanks for the thorough and detailed response as always, Bill! I will definitely investigate the more complex method. In a perfect world, I can convert the values in Zapier before the reach Jira (my original plan), but I've found that even if I create exact matches in the Jira multiple selection fields for the responses received, Jira does not properly recognize them, so the fields remain blank. Both Zapier and Atlassian say as long as the values match, they should be able to accommodate even multiple selection fields, but I have not been able to get that to work. 

I'll let you know what I come up with. If anybody else has suggestions, I'd love to hear them!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events