Todo list command

Hello :slight_smile: 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)
Screenshot 2023-01-17 032453

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 :slight_smile:

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 :slight_smile: 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… :frowning:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.