Webhook Idea Creation - Multiple Values to One Field (multi-select to multi-select)
Asked by Aaron Lane:

Hey all!

So, i am trying to create a workflow that allows users to submit product ideas via an external form that then creates a new Idea in Jira Product Discovery (JPD) on submission of the form via a webhook.

So far, I have an automation that maps and brings in the values on submission to create a new idea.

The PROBLEM comes in with multi-select fields... If a users selects only one value in the multi-select and submits their form, it populates in the newly created JPD idea properly. If they select more than one value and submit, it does not. It's driving me nuts, as it should be pretty straight forward.

Thanks so much for the help in advance!

Details below:

**My automation stack is as follows:**

1. When: Incoming Webhook
2. Then, Log: {{webhookData.Brand.value}}
3. And, Create a new Idea
   * Summary = {{webhookData.Summary.Value}}
   * Brand = {{webhookData.Brands.value}}

**Results:**

* If one brand selected on external form:
  * Idea created \& brand successfully inserted into the idea
* If multiple brands selected on external form
  * Idea created \& no brands are inserted into the idea
* ![Screenshot 2024-09-08 at 12.18.24?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/346146i17B41F9E09BF123E/image-dimensions/411x101?v=v2 "Screenshot 2024-09-08 at 12.18.24?PM.png")

**Notes:**

* The only thing *I* can think is that maybe I have the incoming data in the wrong format? Do I need to use something like isJsonArray or isJsonStringArray? I tried these with no luck, but maybe I'm missing something.

**Formstack Payload Detail:**

```
{  "FormID": "123456",  "UniqueID": "123456789",  "Summary": {    "value": "This is a summary",    "type": "text"  },  "Description": {    "value": "This is a description",    "type": "text"  },  "Brand": {    "value": [      "Brand 1",
      "Brand 2",
      "Brand 3"    ],    "type": "checkbox"  }}
```

**Jira Automation Detail:**

![Screenshot 2024-09-05 at 3.03.06?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/345854iF128C9D0E96246D0/image-dimensions/275x402?v=v2 "Screenshot 2024-09-05 at 3.03.06?PM.png")

**Jira Audit Log Detail:**

**![Screenshot 2024-09-05 at 2.17.35?PM.png](/t5/image/serverpage/image-id/345850iE839C5CD5420DA41/image-size/large?v=v2&px=999 "Screenshot 2024-09-05 at 2.17.35?PM.png")**


Answers:
author: Aaron Lane
body: Ok, I found ***A*** solve, but I'm not convinced at all that it is the best solve.   

Basically, I put in a Smart Value list.get(index) for each possible selection in the Multi-Select field.

The automation will then try to grab the first, second,...eighth...X values, if a value is null, it just returns a null/blank. For Example:

* If all options are selected, it will return: Option 1, Option 2, Option 3, Option 4, Option 5  

* If only a few options are selected, it will return: Option 1, Option 4, Option,,
  * *Note the empty space between the last commas, those are the blanks/null*

++**PROS:**++

* It works!
* "Infinitely" scalable
* No need to worry about decreasing multi-select options

++**CONS:**++

* Will need to be manually updated if you ever add *more options to your Multi-Select*

++**SETUP/STEPS:**++

1. Create external form with multi-select field (Formstack in my case)
2. Populate external multi-select with selections/options
3. Create multi-select field within Jira
4. Populate Jira multi-select field with *identical*selections/options as the external multi-select field
5. Create Jira automation
   1. Trigger - When: Webhook
      * Webhook URL - \*You will point your external form webhook to this URL in a future step
      * Execute this automation rule with: "No issues from the webhook"
   2. Component - Then: Create Issue
      1. Populate summary field (can do this with webhook as well if needed)
      2. Choose fields to set: Choose the Jira field you created. This will populate a new field within the setup window with your Jira created field name.
      3. In that new field, populate with a webhook call for each of multi-select options, with "get(#)" starting at 0.
         1. webhookData.FieldName.ValueTitle.get(0)...webhookData.FieldName.ValueTitle.get(20)
         2. *I had 3 options. so mine was: webhookData.Brand.value.get(0), hit enter. Click again, webhookData.Brand.value.get(1), hit enter. Click again, webhookData.Brand.value.get(2), hit enter.*

<!-- -->

1. Create webhook in external form tool (mine was Formstack):
   1. Name your webhook
   2. Make sure it is sending JSON
   3. Your choice on whether you want it to send field names or field IDs
   4. Save
2. *\*At this point you should have an external form with a multi-select with various options, a Jira Product Discovery multi-select field with IDENTICAL options to the external, an automation that fires on webhook receipt and creates an issue based on that, and a created webhook on the external form side of things.*
3. Do a test external form submission \& see if it comes through properly into Jira Product Discovery, and hopefully, you're in business!

++**CREATE ISSUE AUTOMATION:**++

![Screenshot 2024-09-08 at 12.59.51?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/346148i3D7A72B3A84861DA/image-dimensions/277x340?v=v2 "Screenshot 2024-09-08 at 12.59.51?PM.png")

++**RESULTS:**++

* **Test 5:** External form, selected Brand 1, Brand 2, Brand 3 from multi-select
* **Test 6:** External form, selected Brand 1, Brand 3 from multi-select

![Screenshot 2024-09-08 at 1.20.13?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/346147i74EEB70409A25BD2/image-size/large?v=v2&px=999 "Screenshot 2024-09-08 at 1.20.13?PM.png")

++**RESOURCES:**++

* Index Get syntax:
  * <https://confluence.atlassian.com/automation/jira-smart-values-lists-993924868.html>
* Test your Webhook and look at incoming JSON:
  * <https://webhook-test.com/>

First time answering something, even if it's my own, but I hope it helps someone out there! haha


Tags: automation

cloud

jira-cloud

jira-cloud-administration

jira-product-discovery

multi-select

webhook