Getting item IDs of Webflow collection items into a new collection item

What are you trying to achieve?

Hi everyone,

I created an AI assistant to create blog posts - each blog post gets tags. So far I know, that in order to create a new collection item you have to give webflow the itemID if the field is a (multi)reference field, which is the case here. So I built a filter to get the IDs first and then I want to use the Webflow create item to create the new blog post in webflow and use the list of IDs in the tags-field.

Steps taken so far

I got the whole list of all tags that are currently in webflow, then compared them with the tags of the new post to get the itemID of each tag. I put them into a new variable by using

{{map(102.wf-tags-array; “id”; “fieldData.name”; 103.value)}}

If I use it like that, the Create item module will create the new post as often as there are tags ;D So if the post hast 3 tags, the module will create 3 posts with only the tag being different (post 1 gets tag 1, post 2 tag 2 and so on).

So I think the reason is, that the result are 3 bundles instead of a list of IDs that I can use in the create item module.

Can anyone tell me, how I create a list of those items, so that I can use that in the tag-field?

I already tried the array aggregator afterwards, but that leads to that problem:

[400] Validation Error
tags-2: Value is not a valid ItemRef: { ‘wf-tag-ids’: [ ‘68371434dfc…’ ] }

Thanks for your help!