đź“… How to schedule scenario for the last day next month (recurring)

Summary

Here’s how to use the Make API module to reschedule the scenario to run only on the last day next month. Using this method, you can potentially save three operations (since you do not need to run on all 28/29/30/31), and you don’t need an additional filter.

Just put this somewhere in your scenario (it can even be the trigger module), so it will reschedule itself to the last day next month at noon.

You will need to set up your Make API connection. Instructions can be found in the Help Center. When creating a Make API Token, you need to select the scope “scenarios:write”.

Demo

After running this scenario in February 2024, it has rescheduled to 31st March 2024. When this scenario runs in March, it will reschedule the next run to 30th Apr 2024, and so on.

Gimme the module

You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above, along with the mappings.

  1. Copy the code below by clicking the copy button when you mouseover the top-right of the code block
    Screenshot_2024-01-17_200117

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV to paste in the canvas.

  3. Click on each imported module and save it. You will need to set-up/select your Make connection.

Modules JSON Export

{
    "subflows": [
        {
            "flow": [
                {
                    "id": 3,
                    "module": "make:makeApiCall",
                    "version": 1,
                    "parameters": {
                        "__IMTCONN__": 113550
                    },
                    "mapper": {
                        "url": "/v2/scenarios/{{var.scenario.id}}",
                        "body": "{\"scheduling\": \"{ \\\"date\\\": \\\"{{setSecond(setMinute(setHour(setDate(addMonths(now; 2); 0); 12); 0); 0)}}\\\", \\\"type\\\": \\\"once\\\" }\"}",
                        "method": "PATCH",
                        "headers": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ]
                    },
                    "metadata": {
                        "designer": {
                            "x": -30,
                            "y": -342,
                            "name": "Last Day Next Month"
                        },
                        "restore": {
                            "expect": {
                                "qs": {
                                    "mode": "chose",
                                    "collapsed": true
                                },
                                "method": {
                                    "mode": "chose",
                                    "label": "PATCH"
                                },
                                "headers": {
                                    "mode": "chose",
                                    "items": [
                                        null
                                    ]
                                }
                            },
                            "parameters": {
                                "__IMTCONN__": {
                                    "data": {
                                        "scoped": "true",
                                        "connection": "make"
                                    },
                                    "label": "Make Connection",
                                    "collapsed": true
                                }
                            }
                        },
                        "parameters": [
                            {
                                "name": "__IMTCONN__",
                                "type": "account:make",
                                "label": "Connection",
                                "required": true
                            }
                        ],
                        "expect": [
                            {
                                "name": "url",
                                "type": "text",
                                "label": "URL",
                                "required": true
                            },
                            {
                                "name": "method",
                                "type": "select",
                                "label": "Method",
                                "required": true,
                                "validate": {
                                    "enum": [
                                        "GET",
                                        "POST",
                                        "PUT",
                                        "PATCH",
                                        "DELETE"
                                    ]
                                }
                            },
                            {
                                "name": "headers",
                                "spec": [
                                    {
                                        "name": "key",
                                        "type": "text",
                                        "label": "Key"
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    }
                                ],
                                "type": "array",
                                "label": "Headers"
                            },
                            {
                                "name": "qs",
                                "spec": [
                                    {
                                        "name": "key",
                                        "type": "text",
                                        "label": "Key"
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    }
                                ],
                                "type": "array",
                                "label": "Query String"
                            },
                            {
                                "name": "body",
                                "type": "any",
                                "label": "Body"
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}

See also

samliew – request private consultation

Join the unofficial Make Discord server to chat with other makers!

11 Likes
How to Schedule Make Scenario to Run on the Last Day of the Month
đź§  [Tip] Schedule scenarios to run on the last day of the month
Automatically post with a delay for each data
Filtering between first day and last day of month
Running a Scenario everyday twice at a different specified Time
How to merge results from multiple YouTube search iterations into one array?
Adding an item to a Pipedrive array without overwriting the original values
More operations then expected in HTML extraction
Recipe Card Automation
How to create a full Webflow CMS RSS feed using Make.com?
Use Custom GPTs (Team account) to create outlook drafts
SUM values of Make modules (Increment and variable)
Telegram bot watch update module missing?
New to Make and Social Media Automation
How to Connect Acuity "New Appointments" Contact details to Google Contacts?
How to fetch text from a bundle
Discord Error - This bot can't join more servers
How to loop over an array and generate HTML with native functions?
Google Calendar Set current week date
Help with a Json Scenario
Guided product creation assistant
Getting started into make
Google Workspace Admin module configuration
Integration of Planyo with Lexware
I want to append page content into a database page from another database page content
Meta integration with Clickup
How to use AI to analyze salesforce case, then fill the lookup relationship field on the Case?
YouTube search automation: how to avoid duplicates and get a limited number of videos
Seeking Assistance for Setting Up Organic Pinterest Post Automation
đź“… How to schedule scenario for first Monday next month (recurring)
:house_with_garden: Make Community Roundup: January 2024 [CR]
From iterare to pdfmonkey
Error Handling BAD combo: Sequential Processing + Incomplete Executions
Using Make
How to get a spreadsheet ID from a file I'm uploading in the same scenario?
Web Archive

Pretty cool, hope yo use it in the future :stuck_out_tongue:

2 Likes

Impressive brother defiantly use in future.

2 Likes

Looking to implement this into a scenario, when I run a test I wanted to confirm the end results. When this Make “Last Day Next Month” module runs… Is it supposed to used the schedule settings within the scenario? Right now the scenario is set to run on March 31st, and when I ran the scenario, the next module didnt update the schedule… I wanted to see what I was missing.

Thanks in advance, this is really cool!

1 Like

Using this scenario as the trigger module (the first module in the scenario), what schedule should I set?

It shouldn’t matter, but I recommend selecting Run Once.

The module will then set the next time it should run.

Hope this helps! Let me know if there are any further questions or issues.

— @samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

1 Like