Tutorial 002: How to Run Custom Python or JavaScript Code

Learn how to run custom Python or JavaScript code on Make with 0CodeKit. Follow simple steps, use AI tools for code generation, and explore practical examples.

Published
October 26, 2024

Our code endpoints are amazing tools that let users write and run custom code in programming languages, like JavaScript and Python. This code is executed in a controlled environment and can be integrated into automation platforms like Make, Zapier, and n8n.

But do you know how to use our code executors? If you don't, do not worry! With 0CodeKit, you don't need to be an expert in coding to be able to use our code endpoints. In this blog, we'll explain how to set up these endpoints on Make.

Setting Up the Scenario

First, we need to sign up or log in Make and create a scenario. Then, we have to click on the module, choose 0CodeKit, and look either for Run JavaScript Code endpoint or Run Python Code endpoint. Later, the module will ask you to create a connection between Make and 0CodeKit, therefore, you'll need to provide your 0CodeKit API key to proceed. You can find your API key by logging into 0CodeKit and going to your user dashboard.

The next step is to enter your custom code into the module. You can pass your code through our code editor just to make sure that everything is correct. Once entered, you can click on "OK" and then, on "Run once". Finally, our API will process the request and it will return the result, which you can download.

Note: If you don't know how to write code, we have two AI endpoints that could do that for you. Both endpoints, Generate JavaScript Code and Generate Python Code, use AI to write code based on any prompt you give it. In other words, you just have to provide a description that details what you want the code to do.

To Wrap Things Up

Our code endpoints can be useful tools for your daily tasks. And now, you know how to use them! Here's some inspiration:

What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.