Deal OpsAutomation
.com
The End To End Automation Experts
Real Estate Ops Automation Tutorial Tutorials Book Free Consult

Use OpenAI ChatGPT in Airtable For Free

Easily use ChatGPT in your Airtable base for free, in 15 minutes or less with this simple method. See our YouTube video here and our code below
 
Video preview

The code

const CHATGPT_API_KEY = "PASTE YOUR API KEY HERE"; const {a} = input.config() let openaiUrl = "https://api.openai.com/v1/chat/completions"; console.log({a}); let body = { "model": "gpt-3.5-turbo", // Other Options: "text-davinci-002", "gpt-4" "messages": [ { "role": "user", "content": a } ], "temperature": 0.7 // Number between 0 and 1. Higher number = More randomness. } let headers = { 'Content-Type': 'application/json', 'Authorization': `Bearer ${CHATGPT_API_KEY}`, } let response = await fetch(openaiUrl, { method: 'POST', body: JSON.stringify(body), headers, }); try { let data = await response.json(); console.log({data}); const answer = data.choices[0].message.content output.set('response', `${answer}`); } catch(e) { console.error('error saving response from chatGPT', e); throw e; }
 
 
Blog post tutorial coming soon!
Deal OpsAutomation
.com

Get weekly automation tips via our email newsletter

Tutorials

Real Estate Ops Walkthrough: Automating Transaction Tasks with Airtable, Part 1Real Estate Ops Walkthrough: Automating Transaction Tasks with Airtable, Part 2Use OpenAI ChatGPT in Airtable For FreeHow I used Airtable Automations to automate a successful newsletterBuilding a SEO-optimized free landing page in less than 20 minutes using low-code

Contact us

Book a free consult

© 2024 CS Ventures. All rights reserved.