Skip to content

Commit

Permalink
Log and link the first program people are part of
Browse files Browse the repository at this point in the history
  • Loading branch information
zachlatta committed May 21, 2024
1 parent 1c6f19a commit 6472ddc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const loopsSessionCookie = process.env.LOOPS_SESSION_COOKIE

const loopsCsvExportPath = 'tmp/loops_export.csv'

await downloadAudienceExport(loopsSessionCookie, loopsCsvExportPath)
// await downloadAudienceExport(loopsSessionCookie, loopsCsvExportPath)

// process only the people who have lastEngagementAt in the past 365 days
const onlyLastYear = true
Expand Down Expand Up @@ -151,6 +151,8 @@ for (let row of loopsData) {
let last = engagements[0]
let first = engagements[engagements.length - 1]

airtableUpdates['First Program'] = [programMappingRules[first.name]]

airtableUpdates['Last Engagement At'] = last.time
airtableUpdates['Last Engagement'] = last.name

Expand Down

0 comments on commit 6472ddc

Please sign in to comment.