Clarity

Expand all | Collapse all

Simple GEL script for email notifications

Anon Anon

Anon AnonOct 12, 2010 07:08 AM

  • 1.  Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    I have very little experience (ok, none!) with gel scripts and our business has a requirement to send notifcations from the Idea object.     What we need is quite simple I just don't know how to go about getting the structure, etc. together to build the correct script.  We want an email notification to be sent once an Idea is created and submitted for approval (the approval process is a seperate process).   This email would be simply a message to Person X, Y, and Z, that a new Idea has been created and is available for them to view.   That is all.     I don't need to carry any kind of user variables... perhaps ID and Name of the Idea, but that's it, and if someone could provide for me the basic structure of the script I could easily figure out how to configure the script more.    Thanks!


  • 2.  Re: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    A sample script to send mail notifications.


  • 3.  RE: Re: Simple GEL script for email notifications

    Posted Jul 14, 2011 02:46 PM
    Hi Sankhadeep,

    This is something I am trying to do and I am new to Clarity and Gel. Could you send me the simple email script as well. I can't seem to find it in this post :o(.

    Thanks,

    Lisa


  • 4.  Re: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    In case your mail content is very simple, then instead of a gel script to send notifications, you can use the action item facility from the process.More details in the attachment. Hope this helps.


  • 5.  Re: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    Sankhadeep,  Your suggestion for Action Items is exactly what I was thinking and what I was working on the past few days before I posted (and I mean exactly, your attachment is literally what I already am testing right now).   The reason I wanted to go forward with a gel script was so that the email could be better suited.   With the action item, the user receives the email, then has to go to the action item, and from the action item they have to know where to click the link to the idea.   I was trying to reduce the process to one click from email body right to the actual idea.   Thanks for your response though, it was very helpful.


  • 6.  Re: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    You are welcome :smileyhappy:


  • 7.  Re: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    The GEL email also worked like a charm!   Thank you.  One question - can you tell me how to add either the Idea Name, Idea ID, or Idea Creator into the body of the email?   When I tried ${thisIdea.created_by} it just showed up as blank.    Also, is there a way to add a link direclty to the idea?   For example...       http://{ server }/niku/app?action=pma.ideaProperties&id={ idea object id }&investment_code=IDEA     Thanks  


  • 8.  Re: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    ${thisIdea.created_by} would only work in the Action Items generated from the process.  You will have to put a select statement in the gel to get your data about the Idea (name, code, creator). Use the gel parameter ${gel_objectInstanceId} in your sql code as the Idea internal id. Use this parameter in the below link which you mentioned.  http://{server}/niku/app?action=pma.ideaProperties&id={idea object id}&investment_code=IDEA\  For server, use something like:
            Replace {server} with ${XOGURL_val}. Or you could also hardcode the value.


  • 9.  Re: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    Sankhadeep, I can hardcode the servername in there, I just was trying to keep things private in my post.  I can easily use a SELECT statement, I think I understand how to do that, but how do you properly insert a hyperlink into the body of the email?


  • 10.  Re: Simple GEL script for email notifications
    Best Answer

    Posted Oct 12, 2010 07:08 AM
    I've got it!   I had to use the tag:     And it works perfectly.   For solution sake, here is the code:      
     
     
     
     
     
     
     
     
     select NAME, CODE from inv_investments
     where id = ${gel_objectInstanceId}          ${messageText1} ${row[i]}, ${row[i+1]}${messageText2}${messageTextFooter}


  • 11.  Re: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    Thanks for sharing!! :)


  • 12.  Re: Simple GEL script for email notifications

    Posted Sep 01, 2016 04:32 AM

    ... except that you cannot see the tag here.



  • 13.  Re: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    Here's what I am trying to do.  
     
     
     
      ..XXXX.... with ID ...XXXX... has been created in Clarity." var="messageText1"/>
      ...XXXX.... to go to the Idea." var="messageText2"/>
     
     
     
      ${messageText1}
    ${messageText2}
           
    ${messageTextFooter}
     


  • 14.  RE: Simple GEL script for email notifications

    Posted Oct 12, 2010 07:08 AM
    Thanks to everyone's help, we've been running these process for a few months now and everything appeared to be working fine. Now, i have discovered an issue that I'm hoping someone has some experience dealing with.

    This process is designed to start when the Idea Status changes from X to Y. When I create an Idea, and change the status from X, to Y, the process works and I (along with others) receive the appropriate email notification.

    When another user ("User J") that I am working with does the same thing, the process runs, however no emails are received. So, I had a third person try ("User K"), and that person has no issues when creating an Idea, changing the status from X to Y, the process kicks off and the notification email i sent.

    When I try to update the Idea created by User J, the process still runs, but not email is ever recieved.

    I thought this maybe had some permisssioning issue, but as it turns out, User J and User K have the same security rights.

    Anyone have any knowledge about why a certain user or users would be excluded from the email being sent? Like I mentioned, the process instances shows it completed successfully in all cases. There's nothing in the GEL script that makes the process depend on a certain user or users or created_by, etc. Could this not be a Clarity issue?


  • 15.  RE: Simple GEL script for email notifications

    Posted Mar 05, 2013 03:55 PM
    This post is a bit confusiong, considering that it says you just posted this last month, but there are reponses from a while ago that I cannot view.

    Has anyone helped you resolve this? I have a similar requirement and would like to know how to go about doing it. We have a custom object and I import an update to the object via XOG monthly. I am curious about how to create a gel script that would email the users notifying them that the object has been updated.


  • 16.  RE: Simple GEL script for email notifications

    Posted Mar 05, 2013 03:57 PM
    I see now that this has been resolved. Anyone know where I might find a solution?


  • 17.  RE: Simple GEL script for email notifications

     
    Posted Mar 05, 2013 06:25 PM
    This is an older post that had not yet been restored fully after this board suffered deletion. You should now see all the posts. :grin: