@pipedream/linkedin_ads 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # Overview
2
+
3
+ The LinkedIn Ads API on Pipedream enables you to automate and integrate your LinkedIn advertising efforts with other services. Fetch campaign data, manage ad accounts, or automate ad creation and adjustments. With Pipedream, you can trigger workflows with HTTP requests, emails, and on a schedule, and connect to thousands of other apps with minimal effort.
4
+
5
+ # Example Use Cases
6
+
7
+ - **Sync LinkedIn Ad Campaigns to Google Sheets**: Automate the syncing of LinkedIn Ad campaign data into a Google Sheets spreadsheet. This workflow makes it easy to analyze ad performance, share reports with your team, and maintain records without manual data entry.
8
+
9
+ - **LinkedIn Ad Performance Alerts via Slack or Email**: Set up a workflow that monitors your LinkedIn Ad campaigns for key performance metrics, and sends an alert via Slack or Email when your ads meet certain criteria, such as cost per click (CPC) thresholds or impressions goals, ensuring prompt reaction to ad performance.
10
+
11
+ - **Automatic Ad Pausing Based on Budget Constraints**: Create a workflow that checks your LinkedIn Ad spend against your set budget and automatically pauses campaigns if spend exceeds your budget. This helps maintain control over your advertising costs without needing to check in manually.
@@ -123,6 +123,32 @@ export default {
123
123
  }));
124
124
  },
125
125
  },
126
+ leadFormId: {
127
+ type: "string",
128
+ label: "Lead Form ID",
129
+ description: "Select the lead form to retrieve responses for.",
130
+ async options({
131
+ page, adAccountId,
132
+ }) {
133
+ const count = 20;
134
+ const { elements } = await this.searchLeadForms({
135
+ debug: true,
136
+ params: {
137
+ q: "owner",
138
+ owner: `(sponsoredAccount:${this.getSponsoredAccountUrn(adAccountId)})`,
139
+ count,
140
+ start: page * count,
141
+ },
142
+ });
143
+ return elements.map(({
144
+ id,
145
+ name: label,
146
+ }) => ({
147
+ label,
148
+ value: String(id),
149
+ }));
150
+ },
151
+ },
126
152
  },
127
153
  methods: {
128
154
  ...app.methods,
@@ -141,6 +167,9 @@ export default {
141
167
  getEventUrn(id) {
142
168
  return `urn:li:event:${id}`;
143
169
  },
170
+ getVersionedLeadGenFormUrn(id, version = 1) {
171
+ return `urn:li:versionedLeadGenForm:(urn:li:leadGenForm:${id},${version})`;
172
+ },
144
173
  searchCampaigns({
145
174
  adAccountId, ...args
146
175
  } = {}) {
@@ -154,12 +183,20 @@ export default {
154
183
  "owner",
155
184
  ];
156
185
  return this._makeRequest({
157
- debug: true,
158
186
  path: "/leadForms",
159
187
  paramsSerializer: utils.getParamsSerializer(utils.encodeParamKeys(keys)),
160
188
  ...args,
161
189
  });
162
190
  },
191
+ getLeadForm({
192
+ leadFormId, ...args
193
+ } = {}) {
194
+ return this._makeRequest({
195
+ debug: true,
196
+ path: `/leadForms/${leadFormId}`,
197
+ ...args,
198
+ });
199
+ },
163
200
  searchEvents(args = {}) {
164
201
  const keys = [
165
202
  "organizer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/linkedin_ads",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Pipedream LinkedIn Ads Components",
5
5
  "main": "linkedin_ads.app.mjs",
6
6
  "keywords": [