---
title: "Design Integration Hub Recipes"
canonical: "https://help.agiloft.com/space/HELP/597655630/Design+Integration+Hub+Recipes"
format: markdown
---
If you’re new to Integration Hub and Workato, review this article to get familiar with Workato concepts and best practices and learn tips for working with the Agiloft connector. The article includes several references to the Workato documentation, where you can get more in-depth information about recipe design, processing, and best practices. 

# Recipe basics

Recipes are similar to [Rules](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43714473) in Agiloft CLM. They’re automated workflows that are conditionally triggered to perform actions in the connected applications. Every recipe includes a [trigger](https://docs.workato.com/en/recipes/triggers.html) and at least one step or action that runs when the trigger event occurs. For more information about the core concepts, see the Workato [documentation](https://docs.workato.com/en/workato-concepts.html).

> 📝 To see example recipes, you can browse pre-built community recipes in the Integration Hub by going to the Library tab and clicking Recipes. Search for an application to view the community recipes for that app.

# Processing and task usage

When designing recipes, it helps to know how they’re processed. When a recipe is triggered, it launches a **job** that runs all of the actions in the recipe. A [job](https://docs.workato.com/en/recipes/jobs.html) represents a single execution of a recipe, from start to finish. Each time a recipe is triggered, a new job is launched. The job performs each action in the recipe as a separate unit of work. If an action uses compute resources, it’s counted as a **task**. All actions provided by the connector are considered [tasks](https://docs.workato.com/en/recipes/tasks.html), such as: 

- Sending data to another system
- Creating, updating, searching, or retrieving lookups or records
- Transforming or validating data
- Sending notifications
- Uploading or downloading files
- Calling a REST API or other recipe

Any single action is counted as one task, no matter the complexity of the action or whether it processes multiple items, like a bulk API call. Unless filtered out by an IF condition, tasks in a loop or error retries are executed each time the loop or retry runs. Triggers, IF statements, error handling, and failed actions don't count against task usage.

Other types of actions that use tasks include:

- Logging job data
- Creating or updating variables
- Appending items to lists
- Posting data to event streams
- Generating, mapping, or querying SQL collections
- Executing Ruby, JavaScript, or Python code blocks
- Creating or transforming CSV, XML, JSON, or YAML files

> ℹ️ To see examples and get more information on what counts as a task, see Workato’s documentation on [task counting](https://docs.workato.com/en/recipes/tasks.html#task-counting).

Task usage can significantly increase when recipes:

- Run frequently or recursively due to [infinite loops](https://docs.workato.com/en/recipes/infinite-loops.html).
- Loop over large datasets one item at a time, especially if nested loops are used to access child data.
- Call external APIs asynchronously. These calls can require two tasks to get results if a response is required.
- Retry multiple actions on error.
- Chain many tasks together without filters or conditions.
- Contain unnecessary or redundant actions.

For tips on reducing task usage, see [Best Practices](#best_practices) below. 

# > Macro (anchor)

Best practices

This section includes recommendations for designing recipes that are concise, repeatable, and easily supported.

- Start by using standard [naming conventions](https://docs.workato.com/en/recipes/naming-conventions.html) with clear and intuitive project and folder structure.
- [Optimize task usage](https://docs.workato.com/en/recipes/optimizing-task-usage.html) and reduce complexity:
  - Minimize unnecessary actions.
  - Push business logic into the source or destination system.
  - Avoid deeply nested loops. See Workato’s documentation on [transformation techniques](https://docs.workato.com/en/data-orchestration/how-to/data-transformation/transformation-techniques.html) to help reduce nested data transformations.
  - Use [batch processing](https://docs.workato.com/en/features/batch-processing.html) instead of processing records one-by-one.
  - Isolate error retries to the single action expected to fail.
  - Instead of duplicating logic across multiple recipes, centralize complex logic into a callable recipe. Note that callable recipes use a task, so make sure you do have multiple recipes that can benefit from the same logic.
- Choose the right triggers:
  - Avoid [scheduling triggers](https://docs.workato.com/en/features/scheduler.html).
  - Design triggers for the expected volume of triggering events. If data in the source system is updated frequently, consider a batch polling trigger instead of single record real-time triggers.
  - Leverage [trigger conditions](https://docs.workato.com/en/recipes/triggers.html#trigger-conditions) to reduce unnecessary task execution.
  - Try using Agiloft [ad-hoc searches](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43717730/REST+-+Search#Ad-Hoc-Searches) to avoid filtering in the trigger and reduce load on your KB.
  - You can also use [Webhook Actions](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43714352) to run recipes instead of relying on triggers.
- Continuously monitor jobs and task usage:
  - Use the [Operations hub dashboard](https://docs.workato.com/en/features/admin-dashboard.html#dashboard-sections) to monitor your jobs and connections.
  - For monitoring task usage, see Workato’s [task counters](https://docs.workato.com/en/recipes/tasks-counters.html#tasks-per-job).

# Connector configuration tips

This section lists tips to keep in mind when configuring steps that query or map data in Agiloft CLM.

- When writing queries, use a single equals sign (=) to compare values, rather than two (==).
- When mapping linked fields, include a colon (:) before the linked field.
- When uploading attachments, include `.decode_base64` in the Content field, include `.decode_url` in the File name field, and make sure to select a Content Type or enter * as a custom value to allow any file format.

#### Related articles

> Macro (contentbylabel)