The leaves are only dropping in the northern hemisphere, but new Workato features are dropping worldwide. Leading the pack this month are two new recipe types, dedicated to creating API endpoints and reusable components. Also, improvements to API performance with caching, custom Python code for your recipes, and more.
- New recipe types
- Platform Upgrades
- Connect everything
Deploy APIs in minutes with API recipes
Workato’s API Platform makes it simple to create and provision APIs without any of the usual overhead. Endpoints and gateways are created for you, authentication and access management are built in, and resources are automatically allocated and scaled to meet demand. All you have to do is create the recipes.
Now, to further our goal of making APIs a first-class citizen in Workato, we’ve created a new recipe type designed specifically for API development. API recipes include new features to enable you to build to the full functionality of the OpenAPI Specification:
- Custom request and response headers
- Multiple responses
- All HTTP response codes supported
Design for all outcomes
An API request can have multiple possible outcomes. Different types of errors require different remedies, so just “success” or “failure” might not give enough information for the consumer to fix a problem. For example, an API to get status information for a delivery based on a tracking ID might need to return:
200 OK– containing status information if the delivery is found
404 NOT FOUND– if there is no delivery information matching the tracking number
400 BAD REQUEST– if the tracking number itself is malformed
With new API recipes, a builder can design for each possible outcome and return a separate response with the appropriate headers and body.
Build to a partner’s requirements
If you’re integrating with a partner’s existing systems, there may be specific requirements around response codes and headers that can’t easily be changed. For example, a partner might require a response of
201 CREATED, when registering a support case. API recipes allow you to use any HTTP response code.
A dedicated API recipe type, designed for full compatibility with the OpenAPI specification, lays the groundwork for some exciting new features in the near future that will allow you to use your favorite tools to design your APIs, then build them fast.
For example, you might use Postman to design and mock up your API endpoints. When you’re ready, just export an OpenAPI spec and import it into Workato. We’ll create an API collection for you, including recipes for every endpoint, with request and response schema already completed. All you’ll need to do is create the recipe logic.
Create reusable components with recipe functions
Creating reusable components is one of the most important best practices when designing automations. Think of any multi-step task that you need to do often, like creating an invoice in NetSuite, or validating an email address. By creating a reusable component, you can build the task once, then use it wherever it’s needed.
Recipe functions are the new way to create reusable recipe components in Workato with no technical overhead. All you need to do is define an input and output, and create your recipe
You can then use the function in any other Workato recipe as needed.
Make recipes more readable
As your team grows, making your recipes simple and readable is critical to maintaining your automations over time. For example, the recipe above creates an API for validating a new lead and creating the record in Salesforce. If you tried to create this whole process in one recipe, it would run to dozens of steps — difficult to understand, especially if you didn’t build it yourself. By using recipe functions, you can create the same process in just a few steps, each mapping to a clear outcome. Anyone can see at a glance what the recipe is for, and understand at a high level how it works.
Maintain automations over time
Performing the same task across multiple automations can be challenging to maintain. For example, the recipe above includes a process to enrich a lead from third-party sources. What happens if you want to add a new field, or even change the third-party platforms you use? Individually updating each automation that requires enrichment is both time consuming and easy to get wrong. By abstracting the task into a recipe function, there is one place to maintain lead enrichment for all your automations. Update it once, and let the change take effect everywhere.
Simple testing and debugging
The longer your recipes get, the harder it can be to track down the step that’s causing an error. By creating individual recipe functions for each task, you can test and debug each component independently. You’ll track down errors more easily and fix them faster.
Look out for more releases around recipe functions in the near future, like the ability to refactor steps from a recipe into a function with a single click.
Boost API performance with caching
When designing an API for performance, you need to think about what kind of performance is most important for your particular use case:
- Speed – how fast does the API need to respond? If your API is powering a web front end, a quick response time is more critical than if the API is supplying data for a scheduled backend update.
- Cost – many SaaS platforms charge by number of API requests. If your API repeatedly requests the same record multiple times within a short period of time, you might be paying more than you need to.
- Timeliness – how often does the information returned by your API change, and how important is it to return updated information immediately? For example, the contact on a Salesforce account will rarely change, the status of a critical support ticket might be updated multiple times in just a few minutes.
Caching is a tool to help you strike the right balance between speed, cost and timeliness for each API endpoint you create. By enabling caching, you can save the response to a particular request. If you receive the same request again within a given time period, Workato will simply return the cached response, instead of running the recipe again.
Caching is a great fit for use cases where
- Fast response time is critical
- You need to request the same record often
- The information you need to return changes slowly, or returning up-to-the-second information is not critical.
You can fine-tune your approach further by setting the time-to-live window. This determines how long you store a cached response. The window can be as short as a few seconds, or as long as an hour.
Test from read-only mode
Testing recipes is vital to maintaining quality. As your team grows, you might want to assign dedicated quality assurance testers to maintain your recipes. To support this function, we’ve updated our permissions structure to allow users with read-only permissions to test recipes. This allows you to give users enough access to be able to test recipes, without needing to grant edit access.
Crush data transformations with Python
A visual building experience like Workato’s recipe builder makes automations easier to build and maintain. However, sometimes you need to wrangle large amounts of data, or a particularly tricky data structure. At times like this, leaning a little into the “low-code” part of the low-code/no-code approach can help to keep things simple.
Python has become the most popular language for machine learning and data processing operations, and it’s long been the default choice for math processing and transformations. With the new Python connector, you can run custom Python code in your Workato recipes without any operations overhead.
Use your custom code for:
- Data formatting – manipulate dates, numbers and strings
- Splicing – separate large files into individual records for further processing
- File format transformations – convert CSV to JSON, JSON to CSV, etc
- Complex mapping – translate between schemas to move data between systems
Make more helpful Slack bots
A well-designed messenger bot can supercharge your workflows, helping you not just to get more done, but to be more collaborative and more responsive to critical events. But getting value out of your bot depends on your employees being able to use it. You can increase uptake on your bots by creating a great help message.
We’ve released a new trigger for Slack Workbots that runs whenever a user requests help, allowing you to return a help page personalized to that user. Use it to give your employees the help they need, instead of a generic one-size-fits-all message.
- Complete design control – build out your help message with the block kit builder, as you would with your app’s home page or a message.
- Personalize – customize the help message to each individual user. This could be as basic as greeting them by name, or as sophisticated as showing their own list of outstanding tasks.
- Provide context – by customizing your help message, you can bring in context from your other apps or systems. For example, the help message for a RevOps focused bot might display a summary of leads for the user.
- Extra help for admins – provide additional detail for admin users on bot functionality only available to them.
Store and move data at scale with Google Cloud Storage
Google Cloud Storage provides fast, low-cost, high-durability storage for large volumes of data. GCS is useful for data backup and also as a staging area when moving large volumes of data into a database. However, without an automation layer, manually managing the movement of files into storage can be slow and time-consuming.
The new Google Cloud Storage connector allows you to automate:
- Bucket operations – create, list, get, delete or update your buckets
- Object operations – upload, download, list, and delete objects, update object metadata.
Forget manually moving files to GCS, or running huge daily backup tasks. Instead, back up your key files in real-time whenever they are updated. Get files from your on-prem systems or cloud apps, and set trigger conditions to back up only what you need.
Increase ELT throughput
When moving large volumes of data to your data warehouse, you can improve efficiency by using Workato to automate staging data as flat files in GCS. From there, you can load data into your database.