How to Import Google Ads Conversion API's JavaScript SDK in Node.js Similar to Using NPM?

This topic was automatically generated from Slack. You can find the original thread here.

Hi,

I would like to work with the Google Ads conversion API

They have a javascript SDK, that I would like to use in node.js
https://github.com/googleads/google-ads-java/blob/ac7bf583b89f23a7a28ae8f33dcdd9f9[…]ads/googleads/examples/remarketing/UploadOfflineConversion.java

Can I import that in node.js in a simular way as using NPM?

Hi , there’s a ticket created for Pipedream component dev to implement the native action for you: Google Ads conversion API - Click conversions · Issue #9444 · PipedreamHQ/pipedream · GitHub

Kindly subscribe to the ticket to be noticed when it’s done :pray:

Thanks .

I was the one who created the ticket, but did not know i needed to subscribe :+1:

How long does it normally take to make componemts like this?

I couldn’t share the estimation as it is subject to Pipedream prioritization.

In the mean time when it’s not implemented yet, please feel free to ask our bot go generate code for your code step

@U05A7KLNALC I would like to work with the Google Ads conversion API

They have a javascript SDK, that I would like to use in node.js
https://github.com/googleads/google-ads-java/blob/ac7bf583b89f23a7a28ae8f33dcdd9f9[…]ads/googleads/examples/remarketing/UploadOfflineConversion.java

Can I import that in node.js in a simular way as using NPM?

Based on your question, it seems you want to use the Google Ads Conversion API within a Pipedream workflow using Node.js, similar to how you might use an npm package. The JavaScript SDK you’re referring to is actually a Java library, which cannot be directly imported into a Node.js environment as you would with an npm package. However, you can interact with the Google Ads API using HTTP requests from Node.js. You would need to use the RESTful endpoints provided by the Google Ads API and make HTTP requests accordingly. Here’s an example of how you might set up a Pipedream component to make a request to the Google Ads API using Node.js: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { google: { type: "app", app: "google", }, }, async run({ steps, $ }) { // You would replace the URL and body with the appropriate endpoint and payload // for the Google Ads Conversion API const url = `https://googleads.googleapis.com/v9/customers/{customerId}/conversions:uploadClickConversions`; const body = { // Your request body here }; return await axios($, { method: "POST", url: url, headers: { Authorization: `Bearer ${this.google.$auth.oauth_access_token}`, "Content-Type": "application/json", }, data: body, }); }, }); Please replace {customerId} with your actual Google Ads customer ID and construct the body variable with the appropriate payload as per the Google Ads API documentation. Remember, you’ll need to connect your Google account with the appropriate OAuth scopes to make requests to the Google Ads API. If you have any further questions or need assistance with the specific API endpoints or payload, please let me know!

Thanks, i will give the REST api a try