How do I use components? How do I reuse the same block? How do components work? How do I easily reuse the same flows?
Complex assistants will typically have repeated blocks and workflows. By using components and block templates to save one or multiple blocks, you can streamline your workflow to scale your assistants.
Let's break down what components and block templates are:
- Components are unchangeable copies of the same block(s) and represent full-fledged flows that are reused across the assistant. An example of commonly created components is an authentication workflow.
- Block templates are changeable copies of one or more block(s) saved to a library and can be used to save and use a repeated general sequence of blocks.
Components
Components are useful when you want to repeat the exact same workflow multiple times across an assistant. If you change the original component, all instances of the component in the assistant will also simultaneously update.
To create a component:
- Press 'Shift' and drag your cursor over the blocks that you want to combine into a component
- On the upper header of the canvas, click on the diamond-shaped icon to create the component
- The component is now accessible from the components library
To use a component, you can either drag it out from the component library or look for the component step in the 'Logic' set of steps on the canvas sidebar.
To edit the component, you will need to click on the component in the component library or click on the edit icon in any of the component instances.
Block Templates
Block templates are similar to components in that you can easily reuse blocks, but each instance of a block template is independent from each other. If you use a copy of a block template and change it, it will not affect the original template or any other instance of the template.
To create a block template:
- If you want to turn a single block into a block template, right click on the block. Select "Save to library" and choose a color and name for the template
- If you want to turn multiple blocks into a block template, press 'Shift' and drag your cursor over the blocks that you want to combine. On the upper header of the canvas, click on the book icon to save the template to library.
- Block templates are accessible from the block sidebar under 'Library'
To use a block template, hover over the 'Library' button and a list of your block templates will appear. You will only be able to edit the name and color of the template once it's been created.
Comments
0 comments
Please sign in to leave a comment.