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
shailesh.gusain.sfd1.3960741070027976E12shailesh.gusain.sfd1.3960741070027976E12 

Intergration with google adwords

hello

I have a requirement to integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce. i just need a bit of help to start with code. we can integrate it with SOAP API. has anyone done it before?

Thanks in advance
Shailesh 
shailesh.gusain.sfd1.3960741070027976E12shailesh.gusain.sfd1.3960741070027976E12
Hello shivanath.

thanks for reply. i have seen salesforce retired support for google adwords, is analytics is good approach to manage adwords campaign?
shailesh.gusain.sfd1.3960741070027976E12shailesh.gusain.sfd1.3960741070027976E12
i need a way to use google adwords api through salesforce
Shivanath DevnarayananShivanath Devnarayanan
Salesforce has retired the GoogleAd words integration, but yes you can build your API around it, it would be just like any other integration you can build out.

choose which API you'd like to go with according to your business use case : https://help.salesforce.com/HTViewHelpDoc?id=integrate_what_is_api.htm&language=en_US

 
 Then i'd say build away :)
AshwaniAshwani
Google adword integrastion is easily possible by Rest API call instead of SOAP. Google adwords support Auth2.0 authentication which can be ustilized by Salesforce REST API.

A simple authentication starts with:

HttpRequest req = new HttpRequest(); 
    req.setMethod('POST'); 
    req.setEndpoint('https://accounts.google.com/o/oauth2/token'); 
    String messageBody = 'code='+code+'&client_id='+key+'&client_secret='+secret+'&redirect_uri='+redirect_uri+'&grant_type=authorization_code'; 
    req.setHeader('content-length', messageBody.length()); 
    req.setBody(messageBody); 

    Http h = new Http(); 
    HttpResponse res = h.send(req); 
    String resp = res.getBody(); 

    System.debug('--------------------- Response is: ' + resp);


Richard NorwoodRichard Norwood
You should just sign up with Bizible – a tool that integrates with AdWords via API correctly. I've litterally used all of the tools on the market for integrating AdWords with Salesforce. I'm the CEO for the only Salesforce Focused PPC agency. We use Bizible for all of our clients because it works the best. If you need more help, contact me directly at www.closedopp.com. I'd be more than willing to help your team wthrough this problem.
Hammad SaleemHammad Saleem
kindly explain the above parameters e.g (code and authorization_code) how we can get these parameters from Google AdWords.
Ragula SivakumarRagula Sivakumar
Hi All,

I have simila requiement .Do you have any solution / blogs on this requirement.
Steve Myers 6Steve Myers 6
I know its been a while since this request. We have a similar requirement & keen to understand the solution for this requirement -  integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce.
Ragula SivakumarRagula Sivakumar

Hi Steve,

I did research and finally success with Rest API.

 

https://github.com/amitastreait/Salesforce---Google-Product-Generic/tree/master/Salesforce%20-%20Google%20Product 
https://salesforce.stackexchange.com/questions/297892/calling-google-adwords-api-from-apex/297930?noredirect=1#comment445955_297930

You can refer above links to get the more information 
 

Steve Myers 6Steve Myers 6
Thanks Ragula. I just came across a google info, that Google Ads APIs have been moved to Beta & Adwords API (SOAP API) is the recommended one now. So, trying to understand if we can achieve this using Adwords (SOAP) API.
Ragula SivakumarRagula Sivakumar
I guess we can achieve using Soap as well  but Rest would be simple and little bit easy comapre to SOAP.

 
Steve Myers 6Steve Myers 6
Thanks Ragula. The links that you shared were really helpful. Would you know if there any links, that explains how to implement the MutateAdGroupCriteriaRequest(Create Keyword) or MutateCampaignsRequest (Create Campaign) using APEX class.

Thanks for your help!
Ragula SivakumarRagula Sivakumar
hi Steve,

May be you can refer this 

https://developers.google.com/google-ads/api/docs/campaigns/create-campaigns 

If you are not clear then i would say contact google adwords forum team where they could help you on this.