Solving Make.com User's Challenge: Adding Quotation Marks to Array for API Call in Jira

Have you ever found yourself needing to send an array with an API call to Jira to update a custom field, but you're not sure how to add quotation marks to your array output? This is a common challenge that many Make.com users face, especially when dealing with multiple choice selection pick custom fields. In this article, we'll walk you through a step-by-step solution to this problem.

The Problem

Let's say you have an array like this: WAPI, FAPI, BI. But you need to send it like this: “WAPI”, “FAPI”, “BI”. How do you add the quotation marks?

The Solution

The simplest solution to this problem, without adding iterators and aggregator modules, is to update your Make an API call module with the following:

{ "fields": { "customfield_11232": [ "{{join(1.hodnoty; \"\",\"\")}}\"" ] } }

This transformation is basically adding in the beginning and ending quotation mark and then performing a join to flatten the array to a string separated by ",". The reason you have to do this is because the Make an API call body is expecting the body as one big text string that it then changes to JSON. In your case, you have a proper array that is getting implicitly converted to a string without the quotation marks. So, we have to do some manipulation to get it into a string the way we want it.

Troubleshooting Tips

If you're still having trouble, make sure that you're correctly adding the quotation marks and joining the array. If you're still having issues, it might be worth reaching out to the Make.com community for further assistance.

Conclusion

In conclusion, adding quotation marks to an array for an API call in Jira is a common challenge that many Make.com users face. However, with the right approach, it's a problem that can be easily solved. We hope this article has been helpful in guiding you through the process.

You do have further questions?

Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.