Skip to content

🕒 How to Use Script Scheduling in Make#

Make is a great tool for creating automations that can be useful in a variety of situations. We've already covered how to use Make and GREEN-API integration to create interesting and useful automations that simplify routine tasks.

In this article, we'll discuss how to set up script execution on a schedule and provide some examples of useful automations that run at a specific time.

Content of the article:

  1. Automation schedule variants
  2. Setup an automation schedule
  3. Examples of scheduled automations
  4. Morning weather forecast
  5. Daily exchange rate
  6. Scheduled mailing

1. Automation schedule variants#

Schedules allow you to set up scripts to run at a specific time or at specified intervals.

Make provides a wide range of options for schedules. Let's take a closer look at them:

  • Immediately - this option is only available in automations where the first action is a trigger that activates the script.
  • At regular intervals - runs the automation at set intervals specified in the schedule settings. You can set up several different time intervals for this schedule. The time interval determines the period during which the automation is active, as well as the days of the week and months of the year.
  • Once - runs the automation once on the specified date.
  • Every day - runs the automation every day at a specific time.
  • Days of the week - runs the automation on the selected days of the week and the specified time.
  • Days of the month - runs the automation every month on the specified days (from 1 to 31) and the selected time of day.
  • Specified dates - similar to the previous method, but allows you to select the months of the year in which the schedule is active.
  • On demand - the automation will only run when it is started manually or when this automation is started from another automation.

Start

If you want the activated scenario to run in a specified time range, check the Show advanced settings checkbox and enter the start and end dates in the Start and Stop fields, respectively.

Image with additional schedule settings enabled Image with additional fields in schedule settings


2. Setting up the automation schedule#

Let's create a small automation that will greet the user every morning.

For this, we will need a module for sending messages "Send a Message" and an authorized instance from GREEN-API.

We described in detail how to start working with the integration in the article on setting up the integration.

  1. Click on the + sign, find GREEN-API for WhatsApp in the list of applications

    app

  2. Add the Send a Message module from the GREEN-API application

    Select the "Send Message" module

  3. Click Create a connection to add a connection to the instance

    create-webhook

    • Specify the values of your instance idInstance and apiTokenInstance (The script will receive messages from the number associated with this instance)

    make-green-api-form

    The Connection name field can be used to name the instance being added (e.g. "work number" or "sales"). This will allow you to easily find the required account in the list of available integrations when creating.

  4. In the Chat ID source field, select the option for entering the chat number that is convenient for you:

    chat-id

    • Option Manual - enter the number manually

    When entering the number manually, you must enter it in the international format + the postfix c@us - phoneNumber@c.us.

    For example: 79876543210@c.us

    • Option From Contact List - select a number from the contact list

    When selecting a number from the contact list, click on the drop-down list icon on the right and select the desired phone number.

    The number is formatted automatically.

    contacts

  5. In the message field, enter the text of the welcome message

    Message input image


Let's set up a schedule for launching automation.

In our case, the Every day options will work if we want to send a message every day or Days of the week - to send a message only on specified days of the week.

Let's set up sending messages every working day at 9 am.

Image of clicking on the clock icon to set up the scheduleImage of setting up the schedule every day at 9 o'clock

After setting up, you need to enable the schedule. This is done by the switch in the lower left corner of the screen. You need to enable it.

Image of enabling the schedule

The automation is now running and will send a message every business day.


3. Scheduled automation examples#

In addition to automating simple actions like sending messages, you can implement more complex functions into scripts. Below, we'll look at how to create useful automations based on schedules.

☀️ Morning weather forecast#

Getting a weather forecast before going outside is not only convenient, but also allows you to save time searching for information. Let's set up an automation that will send a morning weather forecast.

Make has a built-in Weather integration, which allows you to get a current weather forecast for a selected city or a detailed forecast for the next 16 days in one action.

We'll set up this module to get the weather in Moscow at the time of the request.

  1. Click on the + sign, find Weather in the list of applications

    Image with filled Weather module

  2. Add the Get current weather module from the Weather application

    Image with filled Weather module

  3. Specify the desired city in English and its country code in the ISO 3166 format in the City field.

    Image with filled Weather module

  4. Run the test by clicking the Run once button. If the test is successful, click the magnifying glass to see the details of the action result

    Image with filled Weather module

The next step is to send a message with the forecast. Sending simple text messages is handled by the "Send a Message" module that we used earlier.

  1. Click on the + sign, find GREEN-API for WhatsApp in the list of applications

    app

  2. Add the Send a Message module from the GREEN-API application

    Select the "Send Message" module

  3. From the Connection list, select a ready-made connection or add a new one by clicking the add button.

    When adding a new connection, fill in your instance details idInstance and apiTokenInstance Then click Save to save.

    connection-action

  4. In the Chat ID source field, select the option for entering the chat number that is convenient for you:

    chat-id

    • Option Manual - enter the number manually

    When entering the number manually, you must enter it in the international format + the postfix c@us - phoneNumber@c.us.

    For example: 79876543210@c.us

    • Option From Contact List - select a number from the contact list

    When selecting a number from the contact list, click on the drop-down list icon on the right and select the desired phone number.

    The number is formatted automatically.

    contacts

  5. In the message field, enter the text of the message, embedding the weather data from the previous module.

    Image with generated text with weather forecast

Automation is complete, all that remains is to set up the schedule.

Any schedule that will launch the process at a certain time of day will do for this task.

As an example, we will set the launch every day at 9 o'clock.

Image with schedule setting every weekday at 9 am

To get the current weather at the scheduled time, enable the scenario by activating the Custom schedule switch

Image with schedule enabled


💱 Daily Exchange Rates#

Exchange rates are constantly changing, and for some people this is an issue that requires attention.

Just like we set up automation to get the weather forecast, you can set up a system to get the exchange rate every day at a certain time.

Make has a built-in currency exchange tool, Convert an amount between currencies. With its help, you can find out the value of one currency relative to another. To do this, you need to specify the value of which currency you want to find out, and also select the currency relative to which you want to find out the value of the first.

As an example, let's consider the process of obtaining the exchange rate of the US dollar to the euro. First, select the currency conversion module Convert an amount between currencies from the Currency application.

  1. Click on the + sign, find Currency in the list of applications

    Image of the Convert an amount between currencies module creation

  2. Add the Convert an amount between currencies currency conversion module

    Image of the Convert an amount between currencies module creation

  3. Specify the currency pair

    Image of filled currency conversion data

  4. Run the scenario once to get data by pressing the Run once button.

The next step of the script will be the module for sending a message. Sending simple text messages is handled by the "Send a Message" module, which we used earlier.

  1. Click on the + sign, find GREEN-API for WhatsApp in the list of applications

    app

  2. Add the Send a Message module from the GREEN-API application

    Select the "Send Message" module

  3. From the Connection list, select a ready-made connection or add a new one by pressing the add button.

    When adding a new connection, fill in your instance details idInstance and apiTokenInstance Then click Save to save.

    connection-action

  4. In the Chat ID source field, select the option for entering the chat number that is convenient for you:

    chat-id

    • Option Manual - enter the number manually

    When entering the number manually, you must enter it in the international format + the postfix c@us - phoneNumber@c.us.

    For example: 79876543210@c.us

    • Option From Contact List - select a number from the contact list

    When selecting a number from the contact list, click on the drop-down list icon on the right and select the desired phone number.

    The number is formatted automatically.

    contacts

  5. In the message field, enter the text of the message, embedding the exchange rate data from the previous module.

    Image indicating the recipient of the rate and a message with the exchange rate

    Automation is complete, all that remains is to set up the schedule.

    We will send it every working day at 13:00.

    Image with schedule setting every working day at 13:00

    Enable the scenario by activating the Custom schedule switch

    Image with schedule enabled


📨 Scheduled mailing#

Previously, we described the process of creating a mailing in Make using Google Sheets and GREEN-API.
If you don't have an automation with a newsletter yet, we recommend creating one by following our guide.

In our example, we will use the Days of Month schedule to send a newsletter every month on the first day.

  1. Click on the circle with an arrow sign next to the first automation module.

    Image with the clock icon clicked next to the Google Sheets module.

  2. Select the Days of Month schedule from the drop-down list.

    Image with the "Days of Month" schedule selected

  3. Select the first day and set the time to 12 o'clock.

    Image with schedule setup for the mailing

  4. Enable the scenario by activating the Custom schedule switch

    Image with schedule enabled


In this article, we discussed in detail how to set up a schedule in Make and gave several examples of effective use of the schedule. However, this is only a small part of the possibilities that open up when using schedules. With their help, you can implement many automations with integration from GREEN-API, which will benefit you.

GREEN-API Application Usage Examples#

How to Make WhatsApp and Slack Messaging

How to Make WhatsApp and Discord Messaging

How to Use Google Sheets to Organize Mailings in Make

How to Make WhatsApp and Google Sheets Messaging

How to Make an OpenAI AI Chatbot in WhatsApp