Hello I have a question and since I cant find any answers, I wanted to give this a try.
I am wondering how I can make a ToDo
Command that uses an api linked to Google Sheets AppScripts that when either me or a moderator uses for example:
!todo get emotes made
It will then add that to the google sheet in the first available row. The issue i am currently having is this works in say a text
format:
$urlcall(https://script.google.com/macros/s/AKfycbyV-r0RWQggofZCPCbiXPthNSjbULUNgMWfeauibv9gwegOtG3QW0fTxIr1hDqNUE4/exec?todo=$(message$arg(::1) ))
But it also adds the “!todo” as well
This screenshot shows whats added to the google sheet (it should be testing)
Hi crimonfireg,
Try to testing this
$urlcall(https://script.google.com/macros/s/AKfycbyV-r0RWQggofZCPCbiXPthNSjbULUNgMWfeauibv9gwegOtG3QW0fTxIr1hDqNUE4/exec?todo=$args(1:))
That didnt work sadly. if it helps at all this is how it would look in streamelements (where it has worked)
${customapi.https://script.google.com/macros/s/abc123/exec?todo=$ (queryencode $(1:))}
1 Like
Hello,
After looking for a solution for your problem, there is the possibility of recovering your message, and deleting the beginning of the “!todo” command via the Google script
Use this and then when processing in Google script remove the !todo (space)
$urlcall(https://script.google.com/macros/s/AKfycbyV-r0RWQggofZCPCbiXPthNSjbULUNgMWfeauibv9gwegOtG3QW0fTxIr1hDqNUE4/exec?todo=$(message))
It’s the easiest thing to do
Dere011
January 19, 2023, 3:17pm
#5
Hello,
The problem is probably that the argument is not encoded for the URL.
You can use the $urlencode() TAG to fix this.
$urlcall(https://script.google.com/macros/s/AKfycbyV-r0RWQggofZCPCbiXPthNSjbULUNgMWfeauibv9gwegOtG3QW0fTxIr1hDqNUE4/exec?todo=$urlencode($args(1:)))
This worked!! Thank you for the help I have now marked this as the solution. You guys have been very helpful, thank you!!
1 Like
ça fais des mois que je cherche ce truc…
WizeBot
closed
January 24, 2023, 5:25pm
#8
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.