There are three possible scenarios when using “Create Records” element in flow, ordered by the frequency of usage:
1. Create one, using separate resources
This is the most-used option by me. You type in the object to create, and then you can manually assign the values using either ad-hoc strings, or resources that you set up earlier in this flow.
By checking “Manually assign variables”, you can save the ID of the created record at a chosen variable.
|You want the variable to have a neat name to reference it later.||When the option is not chosen, the name of the auto-variable will be [ObjectId] From [API name of the Create Records element] (ex. AccountId From Create_New_Account). If you assign the variable yourself, then you can name it NewID for example, which is more readable.|
|You want to save this ID in an output-allowed variable.||The auto-created variable is not allowed for output. If you want to use this functionality, create a output-allowed variable and assign it manually.|
What is input/output-allowed variable? See here!
2. Create one, using all values from a record
If you have a variable storing all the values you need to create a record, you can also choose “Use all values from a record”.
|You have used Get Records, and you want to clone that record directly or after some modification.||When a Get Records element is used, a variable with the values from that record will be created. If you want to clone that record, simply use this instead of assigning the value field by field.|
3. Create multiple, using record collection
To create multiple records at once, you can only use a record collection variable, and save the required field values into each item in the collection.
What is a collection variable – see here!
|Very rare. You might have a custom loop* in your flow which will generate several records and save them in a collection, then you create all the records at once .||The outcome is actually the same if you put the Create Records into the loop:|
However this action will then be executed more times than just once. (If your loop runs 10 iterations, Create Records will run 10 times). This will slow down** the execution time of your flow. If you have a huge number of records to create, putting it outside of the loop will be a better option.
** Execution Time Comparison: I set the iteration as 5, the left flow used 480 ms, while the right used 610 ms.
Check Out How Create Records Can Be Used In Real Cases!