0

CHANIFY

https://www.chanify.net/

 

Hello,

I am trying to integrate Chanify into Ninox to send notifications with links and images. Does anyone have experience with this and can help me write the code for this integration?

Thank you in advance for your help. 

5 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 1 yr ago
    • Reported - view

    Suppose you have a table with 2 text fields: 'Token' and 'Message'

    If you put the right token in your Token field and a Message you want to send, putting this in a button will work:

    Simple Method:

    let txt := urlEncode(Message);
    let response := do as server
            http("GET", "https://api.chanify.net/v1/sender/" + Token + "/" + txt)
        end;
    alert(text(response))

    You can leave the alert(text(response)) section as this was for testing purposes.

    -------------------------------

    A more extended version can be made like this in a button (For this you need an extra text field : 'Message Title'):

    Extended Method:

    let WebhookUrl := "https://api.chanify.net/v1/sender/" + Token;
    let txt := Message;
    let vBody := {
            sound: 1,
            text: txt,
            title: 'Message Title'
        };
    let response := do as server
            http("POST", WebhookUrl, {
                'Content-Type': "application/json"
            }, vBody)
        end;
    alert(text(response))

    More vBody settings can be found on this webpage.

    admin  👍Thanks also for learning about this useful program. It may yet come in handy.🔝

    • admin.3
    • 1 yr ago
    • Reported - view

    Thank you very much for your response. I am not an expert in coding but if I understood correctly, it is impossible to send images via this application!

    If you can confirm it for me please ?

    • admin.3
    • 1 yr ago
    • Reported - view

    I tried with this code but still getting an error.

    • Ninox partner
    • RoSoft_Steven.1
    • 1 yr ago
    • Reported - view

    I can't get it to work with the application (I guess you need a node.js or something?) Alternatively,  if you send the shared url in the text, the users can follow the link to the file and the image or pdf is displayed:

    let WebhookUrl := "https://api.chanify.net/v1/sender/" + Token;
    let lnk := shareFile(Image);
    let vBody := {
            sound: 1,
            text: lnk,
            title: 'Message Title'
        };
    let response := do as server
            http("POST", WebhookUrl, {
                'Content-Type': "application/json"
            }, vBody)
        end;
    alert(text(response))
    
      • admin.3
      • 1 yr ago
      • Reported - view

      RoSoft_Steven 

       

      This code is sufficient for me. I use this application to receive notifications on my phone when someone from the team makes a modification. Thanks again for your help.

Content aside

  • 1 yr agoLast active
  • 5Replies
  • 110Views
  • 2 Following