@Jeandcc - You could copy the value shown in the designer when editing a cms item (BOTTOM) and place it into a new field in that collection, then it would be accessible. Happy New Year.
Hey Jeff! Thanks for that! I actually considered doing that and I might do it as my last option. I just felt that it was a bit too “manual”. I didn’t really want the client doing that kind of manual work.
I don’t recall what I did for that specific project, but one way I would take care of that need nowadays would be adding a webhook listener to the “collection_item_created” event, and update a custom field of that item with its id for every new item that would trigger that webhook call.
I would do it through cloud functions, but zapier and parabola seem like a good fit for something like this in case you are not comfortable with code.
Your workflow filter will stop working after someone restores a backup, given that the collection id would change. I would change your filter to be based on the collection slug.
I would also recommend using the patch API operation instead of the update item. That way I believe you only need to map the newly created collection id field, instead of having to map mall the other fields.
Also talking about backups: collection IDs change after a backup restore. You could create a flow that goes through all collections and collection items after a backup is restored and updates their IDs accordingly, and have that workflow available to be manually triggered every time a backup is restored.
All those issues with collection IDs are the reason why I’m currently preferring to do things based on slugs rather than on collection IDs