Copilot Links Block

Generate a list of links with optional metadata

The Copilot Links block is designed to generate and display a list of links with optional metadata. This block is particularly useful for creating dynamic lists of links that can be customized using Jinja templating.

Configuration (Required)

Header
string

The header text for the list. This is optional and defaults to “Links” if not provided.

List of links
codeRequired

A Jinja-compatible string that represents the list of links to be processed. This input is required and should be formatted as a list of dictionaries.

Limit
integer

The maximum number of links to display. This is optional and defaults to 5 if not specified.

See Workflow Logic & State > State Management for details on using dynamic variables in this block.

Outputs

The block outputs a list of processed links with optional metadata, limited to the specified number of links. This structured output allows for further processing and integration within your workflow.

Usage Context

Use this block to dynamically generate and display a list of links with metadata in your workflow. It is particularly useful for creating lists of resources or references that can be customized and filtered according to user needs.

Best Practices

  • Ensure the ‘list_of_links’ input is correctly formatted and can be parsed into a list of dictionaries. Proper formatting is crucial for successful processing and to avoid errors.
  • Use Jinja templating to dynamically generate the list of links based on workflow state. This allows for the creation of dynamic and adaptable link lists that respond to changes in workflow state.
  • Set an appropriate ‘limit’ to avoid overwhelming the display with too many links. This helps maintain clarity and focus in the presentation of links.