Create Entity & Related Entities with button?

Hi,

Is it possible right now with buttons to create a new entity along with related entities at once? I’m looking for a way to create a repeatable process. One case I have is an onboarding routine. I’d like to create a “project” entity and, say, a few sub entity “tasks” in one step with a button. If this is not possible, please add a big “+1” from me for this feature, which I imagine may be a part of Templates functionality when they come out.

Thanks!

Yes, it is definitely possible :slight_smile:

AFAIK you actually do it in 3 stages:

  • create the parent entity
  • create the child entities
  • add the newly-created children to the newly-created parent collection

The API documentation is pretty useful here: https://api.fibery.io/#create-entity & https://api.fibery.io/#update-entity-collection-field

You’ll want to know in advance all your type names and the field names for the collections.

3 Likes

Just thought I’d follow up on this now that automations are up and running.
No need to use scripting/API any longer, you can trigger an automation rule to generate child entities when a parent entity is created. Also, fields can be set to default values, and with markdown etc., rich text fields can be populated with template text.

2 Likes

To add a little context for anyone else, I think it will depend a bit on the use case. More advanced use cases might still need scripting.

The one time I’ve tried something like this, I was trying to add a Vote entity for each member of a Team associated with a Meeting. So, first I have to get the team members associated with the meeting, then loop over the team members and add a Vote entity to the Meeting for each team member and associating each Vote entity with the team member.

Yeah, you’re right, there are circumstances where it is v. hard (if not impossible) to devise an automation that will create all the entities you need, especially if the logic for their existence is complicated.
At least some of the use cases have become a little easier :slight_smile: