function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ross JamesRoss James 

Chatter News Alerts - Setup Issue

I am trying to setup Chatter News Alerts and coming at a stop very early in the process

 

Copy the generated email address (it will end in a long string of letters.and.numbers.in.salesforce.com);

 

googlealerttochatter@p-1sxmfayyumw7wktnoaywh9ry.p4ypjmaa.p.apex.sandbox.salesforce.com  

   
  • Email address must be a valid Email Services address

As you can see, it isn't accepting the email address generated from the Email Service. I have tried this with other Servces, Email Addresses and Users.

 

I am testing this in Sandbox, could this be a problem?

Best Answer chosen by Admin (Salesforce Developers) 
ReidCReidC

OK.  One thing that would be a dead easy change is to update the code so that it no longer validates the email you enter.  This is a short term work around while we get the app corrected.

 

Naviagate to setup > develop > Apex Classes

 

Click "Edit" next to 

GoogleAlertToChatterSettingsController

 

Comment out lines 33, 56,57,58.  To comment out a line, simply prefix it with a "//" (two forward slashes).  It will look like this -- note that I've commented out the "if () {" and the "} else {}" block but left the other portions in tact.

 

 

  public Void updateAddress() { //method to update emailServiceAddress
  // if (emailServiceAddress.contains('.in.salesforce.com') || emailServiceAddress.contains('.in.sandbox.salesforce.com')) {
    List<Google_Alert_to_Chatter_Settings__c> settings = [select Email_Services_Address__c
                                                          from Google_Alert_to_Chatter_Settings__c limit 1];
    //if a record exists, update the address in the record
    if (settings.size() > 0) {
      settings[0].Email_Services_Address__c = emailServiceAddress;
      try {
        update settings[0];
      } catch (DmlException e) {
        ApexPages.addMessages(e);
      }
    }
    //otherwise, insert a record with that address
    else {
      Google_Alert_to_Chatter_Settings__c setting = new Google_Alert_to_Chatter_Settings__c();
      setting.Email_Services_Address__c = emailServiceAddress;
      try {
        insert setting;
      } catch (DmlException e) {
        ApexPages.addMessages(e);
      }
    } // end if/else
    showCheckMark = true;
  // } else { //if the email address does not have the right '.in.salesforce.com' or '.in.sandbox.salesforce.com' domain
  //  ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Email address must be a valid Email Services address'));
  // } // end address check
  }// end updateAddress method

The attachment is a screenshot in case this is easier to understand (but it's of the same code, not an additional change):

 

 

 

All Answers

ReidCReidC

I'm able to install into a sandbox and configure the email address and settings.  However, my generated email address ends in in.sandbox.salesforce.com which is what the controller expects.  What sandbox instance are you on?  Is it Spring 11 already?

 

 

 

 

ReidCReidC

PS If you are on a pre-rel sandbox, you can always set your email services address manually.

 

setup > create > cutom objects > Google Alert to Chatter Settings

 

 

Ross JamesRoss James

googlealerttochatter@p-1sxmfayyumw7wktnoaywh9ry.p4ypjmaa.p.apex.sandbox.salesforce.com

 

We are on Spring 11, and any address I create ends in apex.sandbox.salesforce.com

Ross JamesRoss James

Also, can you expand on how to set the email 'manually'.

 

 

ReidCReidC

OK.  One thing that would be a dead easy change is to update the code so that it no longer validates the email you enter.  This is a short term work around while we get the app corrected.

 

Naviagate to setup > develop > Apex Classes

 

Click "Edit" next to 

GoogleAlertToChatterSettingsController

 

Comment out lines 33, 56,57,58.  To comment out a line, simply prefix it with a "//" (two forward slashes).  It will look like this -- note that I've commented out the "if () {" and the "} else {}" block but left the other portions in tact.

 

 

  public Void updateAddress() { //method to update emailServiceAddress
  // if (emailServiceAddress.contains('.in.salesforce.com') || emailServiceAddress.contains('.in.sandbox.salesforce.com')) {
    List<Google_Alert_to_Chatter_Settings__c> settings = [select Email_Services_Address__c
                                                          from Google_Alert_to_Chatter_Settings__c limit 1];
    //if a record exists, update the address in the record
    if (settings.size() > 0) {
      settings[0].Email_Services_Address__c = emailServiceAddress;
      try {
        update settings[0];
      } catch (DmlException e) {
        ApexPages.addMessages(e);
      }
    }
    //otherwise, insert a record with that address
    else {
      Google_Alert_to_Chatter_Settings__c setting = new Google_Alert_to_Chatter_Settings__c();
      setting.Email_Services_Address__c = emailServiceAddress;
      try {
        insert setting;
      } catch (DmlException e) {
        ApexPages.addMessages(e);
      }
    } // end if/else
    showCheckMark = true;
  // } else { //if the email address does not have the right '.in.salesforce.com' or '.in.sandbox.salesforce.com' domain
  //  ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Email address must be a valid Email Services address'));
  // } // end address check
  }// end updateAddress method

The attachment is a screenshot in case this is easier to understand (but it's of the same code, not an additional change):

 

 

 

This was selected as the best answer
Ross JamesRoss James

Perfect. Worked a charm.

 

Thanks for the attention.

ReidCReidC

Great!

 

If you a chance, we always appreciate reviews on the apps.  https://sites.secure.force.com/appexchange/listingDetail?listingId=a0N30000003GJFrEAO

SamFeldmanSamFeldman

I'm having a similar issue -- when I attempt to enter the email address on the settings page, it says"

 

Email Services Address: Email Services Address: data value too large: ga@2xtzqizdl2vcaynrawfh6r20l9lalgyinh7ygpwvuunwyvlbts.31gurleao.3.apex.salesforce.com (max length=80)

  (I put it in code just to make it easier to view.)

 

Is there some code in the Apex class I can change?

 

Thanks!

ReidCReidC

Hm.  Have you tried updating the setting field size?

SamFeldmanSamFeldman

I can't find where to change the setting field size -- can you help with that?

Brad_HermanBrad_Herman

Thansks for the feedback and suggestions about this.  Newer versions of the application now effectively recognize sandbox email addresses and allow for installation, setup, and testing in your sandbox.  You can click Get It Now to install the new version from it's AppExchange listing page: https://sites.secure.force.com/appexchange/listingDetail?listingId=a0N30000003GJFrEAO

StaceyUSStaceyUS

Hello ReidC,

 

I was able to install the Chatter News Alerts without any issues, however, I am now looking for the best practices when you using this app.

 

  • How long does the normal processing take when using the Chatter Google News Alert field “Chatter News Alert Status” from Sign Up to Active?  I updated an account to Sign Up which is now showing “Confirming”, but there are Chatter Postings coming in for that account.
  • Are there any specifics and/or parameters that we should know regarding the Google Alert Search Terms field?  i.e. Number of Characters, the use of commas, etc…

Please let me know if you are able to assist me.

 

Regards,

Stacey

ReidCReidC

It's normally pretty quick.  Unfortunately I can't support the app, you'd need to have a developer jump in and help out if it looks like things are goofy at all.

 

Best

Reid

 

Brad HermanBrad Herman

@StaceyUS - it can take up to a day for Google to generate the first email with alert items.  However, the status field change from "confirming" to "active" shouldn't take more than a minute.  Make sure you've refreshed the account page to see if it changed.  If the status stays as "confirming" and you're not receiving any Alert chatter posts on that account, walk through the setup instructions again and ensure the email address steps were all followed successfully.

 

As near as I can tell, the Search Terms field works the same as you'd treat the search box on www.google.com.

 

If you start using the app regularly, please post a review on the appexchange listing about your experience.

 

-Brad