Deactivate scenario POST

Hi Make

I would like to add to the scenario its deactivation. To do this, I use the “Make an API call” module.

photo_2022-12-21_20-55-01

I have read the API documentation for deactivating a scenario using the POST method in this link. But I didn’t fully figure out what settings to set in the module itself.

Could you tell me how to set the settings in this module correctly?

Hello @Rory nice to meet you.

This is how your set up needs to looks like:



You can find YOUR SCENARIO ID in the scenario URL.

“Don’t hesitate to contact us if you require further assistance.”

//VLAD

2 Likes

Hello @Wemakefuture me too

Yes, it works according to the logs. Thank you!

But for some reason it didn’t actually work :thinking: Although the logs are ok.

  1. First I got the scenario data
  2. Then I stopped it with the POST method
  3. Then I started it with the POST method

2022-12-22_14-58-50

The scenario didn’t run. This is strange.

Hello again @Rory ,

The scenario didn’t run or didn’t execute the requirements? Because from what i see the scenario run and operation was completed.

Can you please show me the setup from the Make an API Call.

The scenario didn’t run. This is my setup from the Make an API Call

Hi @Rory ,

What error do you get when you try to run the scenario?

  • Try running the modules individually and see if it works.

Hi @Wemakefuture

If I try to run the modules individually, then one of them throws an error, while the other one works.

This is what happens if I run the scenario stop module.

This is what happens if I run the scenario start module.

2022-12-22_19-45-54

Hi @Rory .

The problem is that your scenario is already OFF. Go to scenario which you want to stop and set ON and after that make a test.

For the future try to use Integromat DevTool extension and get more info from there.

“Don’t hesitate to contact us if you require further assistance.”

//VLAD

2 Likes

Hi @Wemakefuture

But I already did it. Wrote about it here. It works according to the logs.

Thank you, I’ll look into it further :slight_smile:

Hi @Rory ,

What do you mean with The scenario didn't run ?
You want to activate the scenario and execute it? If that’s the case, the scenario won’t automatically run when you activate it.
You can leave the scenario activated and execute it on demand with the following API call
https://www.make.com/en/api-documentation/scenarios-scenarioId-run-post

I hope it answers your question.
Glenn - Callinetic

1 Like

Hi @Callinetic

That’s exactly what I did. I wrote about it here )

Hi @Rory ,

In the link you shared I only see two endpoints. The stop and start endpoints. These won’t execute your scenario. You only change the state from deactivated to activated.
To execute the scenario you should trigger the endpoint I shared in my previous post. That’s /scenarios/{scenarioId}/run.

This means that the logical sequence to execute a stopped scenario is the following:

  1. Start scenario (/scenarios/{scenarioId}/start)
  2. Execute scenario (/scenarios/{scenarioId}/run)

Or for a scenario that is already activated, just run /scenarios/{scenarioId}/run

Kr.,
Glenn - Callinetic

2 Likes

Hi @Callinetic

Thank you. Now I understand the difference.