-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GasFreshdesk OO API Class example #22
base: master
Are you sure you want to change the base?
Conversation
get rid of clear secret key from source code. get key from ScriptProperties. |
Can you please add ticket reply with attachment for fresh desk PHP API sample code. |
@prasadmunna I upgraded my GasFreshdesk library to use the lastest Freshdesk v2 API now, which could use ticket.reply({
body: 'Hi tom, Still Angry'
, cc_emails: '[email protected]'
}) if you could switch from php to javascript, you can try this lib. sorry for I'm not planing write php code, because I only use javascript under google apps script env now. You could have a look here: GasFreshdesk |
Hi Zixia, |
I'm loving with this in google apps script: var MyFreshdesk = new Freshdesk('https://DOMAIN.freshdesk.com', 'KEY')
var ticket = new MyFreshdesk.Ticket({
description:'A description'
, subject: 'A subject'
, email: '[email protected]'
})
ticket.assign(9000658396)
ticket.note({
body: 'Hi tom, Still Angry'
, private: true
})
ticket.reply({
body: 'Hi tom, Still Angry'
, cc_emails: ['[email protected]']
})
ticket.setPriority(2)
ticket.setStatus(2)
ticket.del()
ticket.restore()
Logger.log('ticket #' + ticket.getId() + ' was set!') |
Hi I'm trying to extend it slightly to set custom ticket fields but its failing with an error and I wonder if you could help? Here's what I've done: I've added your code to a second file in my project and have added the following:
I then call this by creating the ticket then calling
I then get this error Any thoughts? |
@big-chris glad to hear that gas-freshdesk could help you. can you fork and commit your changes in github? then there's more easy for me to check the code in details for you. BTW: you should use custom fields like this, I believe it can help you to fix this bug: var thisCustomFields = { planned_task_43200: "No" }
ticket.setCustomField(thisCustomFields) |
@zixia thanks a lot for replying. Sorry I'm pretty new to coding and github so I dont know how to fork and commit changes. I've attached the two files in my project so you can see what I've done. I tried the suggestion you made about how to use custom fields, but I got a new error message -
|
@big-chris so there's lots of details of your freshdesk settings. I recommand you to contact the support of freshdesk: https://support.freshdesk.com/ I created some tickets over there, and they replied quite fast. |
@big-chris - probably a bit late for you now as you will have found a way forward, but if you change: @zixia - thanks for this code - saved me so much time! |
for issue #21
OO Freshdesk API Class Example.