Skip to main content
The SDK is suitable when you need to integrate task creation into your development environment or automated scripts. It’s also useful for complex setups that require conditional logic before task submission. Use the automate-sdk to easily create a new task:
Typescript Functions are still in private beta, make sure to use the beta version of the automate-sdk to have access to it

Typescript Function

Import the sdk and create task, passing your typescript function CID & arguments:
You can specify cron trigger this way:
event trigger like this:
And block trigger this way:
If your task utilizes secrets, you can set them after the task has been created.

Solidity Function

Repeat the installation step as shown above, then import and instantiate the SDK:
Use createTask to automate your function calls:

Examples

Deploy a contract & automate your function call:

Use a Checker to automate your function call:

If you need more configurable execution condition and/or dynamic input data, you can create a task using Checker

Automated Transaction

The CreateTaskOptions interface is used for configuring Automated Transactions with the same structure and options as defined above. The only difference is you need to configure your automated transaction without the need for a checker function. Example:

Single Execution Task

If you want to have Gelato call your function only once. If so, set singleExec flag to true when calling createTask.