Create custom scenario using make API

Is there any API to create a custom scenario using Make API?

For example in templates, there is scenario “Add new incoming emails to a Google Sheets spreadsheet as a new row” for Gmail and Google Sheets, which can create using a no-code UI. Can I create it using make API?

I read the documentation of make API and found there is a POST request endpoint /scenarios, but not sure how to implement it including authentication for Gmail and google sheets.

Hi @atologistkishan

To create the scenarios via the Make API you will need to pass the blueprint of the scenario to the scenarios endpoint

You can see how the blueprint looks for any of your existing scenarios by clicking the “Export Blueprint” button on the scenario

Hope this helps!

2 Likes

Hi @Harsh ,

Thanks for your response. I’ll try it.
Also, do I need to manually create a connection for each step in the scenario?

For example, if my scenario contains two apps slack and Gmail, can I create a connection via API including authentication? Or do I need to manually create the required connection first then call scenario POST API?

Hi @atologistkishan :wave:

just wanted to jump in and ask whether you had a minute to check out @Harsh’s solution. If you did could you share with us the results?

Thanks a lot! :pray:

Hi @vendy ,
I haven’t tried this solution because I couldn’t find any docs regarding structure of blueprint.

Hey there @atologistkishan :wave:

Thank you very much for your reply.

You can use the ‘create scenario’ POST API request. It’s important to know that the blueprint should be sent as a string not as an object. Here’s a documentation article for ‘create a scenario’ where you can get more information.

It is true that the blueprint itself is not documented, so feel free to visit our Idea exchange page where you can submit your request. :seedling: By doing so, others can upvote your suggestion and you can follow its progress.