Ask AI: How to Prompt ChatGPT by OpenAI to Write and Comment JavaScript to use in a Zap Code Step

  • 31 May 2023
  • 0 replies
  • 59 views

Userlevel 7
Badge +14

Ask AI: How to Prompt ChatGPT by OpenAI to Write and Comment JavaScript to use in a Zap Code Step

 

Contribution by Troy Tessalone

Certified Zapier Expert at Automation Ace

 

PURPOSE

Ask AI to help you write properly formatted JavaScript Code to be used in a Zap step that uses Code by Zapier (JavaScript).

 

You can use ChatGPT by OpenAI.

 

NOTE: You make have to adjust the generated JavaScript code for it to work in the Zap Code step.

 

PROMPT

Use this ChatGPT prompt template.

Replace and expand ‘XXX’ in the GOAL section with what you want the JavaScript Code to do.

GOAL
Write and add comments to the JavaScript code to do XXX.

INSTRUCTIONS
Write all JavaScript code to explicitly work inside a Code by Zapier action step.
Use only libraries and features that are allowed in their action.
If you can't do it, say 'I can't.

EXAMPLE: ZAP CODE STRUCTURE
let X = inputData.X; // how to declare variables
output = [{X}]; // how to output data as an array object

 

PREVIEW

ChatGPT Thread: JavaScript for Root Domains


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.