You can now use our functions in Google Sheets
Yesterday, a client showed me a cool product: sheetgpt.ai. It allows you to use ChatGPT inside Google Sheets.
That got me thinking: Why don't we allow using all of our functions in Google Sheets?
This is what I came up with:
1. Open Apps Script
2. Paste the below snippet
function func(name,input) {
const token = 'FUNC_TOKEN'
if(!name) return 'please supply the name of the func you want to call. For more info: https://func.live/gsheet'
if(!token) return 'please provide a JWT. For more info: https://func.live/gsheet'
const url = `https://api.func.live/functions/${name}`
const options = {
muteHttpExceptions: true,
method:'POST',
headers:{
"Content-Type":"application/json",
Authorization:`Bearer ${token}`
}
}
if(input) options.payload = JSON.stringify({input})
let {output} = JSON.parse(UrlFetchApp.fetch(url, options))
if(typeof output === 'object') output = JSON.stringify(output)
Logger.log({output})
return output
}
❗Make sure to replace FUNC_TOKEN with an actual func token from tokens.wakeflow.io.
❗Make sure not to share your Google Sheet with people that shouldn't get access to your FUNC_TOKEN
❗Make sure to save
3. Use our functions, like so:
If you think GPT3 is so 2023, you can try our GPT4, Gemini and Mistral functions as well. Just search for them on https://func.live
Let's chat 💬
I hope you found that useful, and would love to hear your thoughts. Are there any functions you'd like us to build for you? Email me on andi@wakeflow.io or whatsapp me on +447500172268.
All the best, Andi
P.S.
I made that image at the top with Dalle3, using the func(live) command line tool like so:
> npm i func-live-cli -g
> func dalle3 "a heart scratched into the trunk of a tree showing that func loves google sheets"
> _
Looks like it's slowly getting better at spelling :)
Now you try!