Skip to content

Commit

Permalink
Fix in Mailchimp sequence and config file
Browse files Browse the repository at this point in the history
  • Loading branch information
gzukowski committed May 9, 2023
1 parent c709f7e commit 80f5dd6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
7 changes: 5 additions & 2 deletions python/Integration/ChimpInsert/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ def get_info(info, given):
return member['id']

async def insert_info(info):
email, fname, lname = info.split(" ")
try:
email, fname, lname = info.split(" ")
except:
print("No data received.")
response = mailchimp.ping.get()
try:
member_info = {
Expand All @@ -45,7 +48,7 @@ async def insert_info(info):
print(err)

except:
print("No data received.");
print("No data received.")

async def run(context, input):
run.audience_id = context.config['audience_id']
Expand Down
15 changes: 7 additions & 8 deletions python/Integration/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"mailchimp_api" : "<your_api_key>",
"stripe_api" : "<your_api_key>",
"audience_id" : "<your_audience>",
"mailchimp_server" : "<your_server>",
"auth" : "Bearer <your_api_key>",
"auth0_query_url" : "https://dev-scp.eu.auth0.com/api/v2/users?per_page=5&sort=created_at%3A1&fields=created_at%2Cupdated_at%2Cemail%2Cnickname&q=user_metadata.newsletter%3D%22true%22"
}

"mailchimp_api" : "<your_api_key>",
"stripe_api" : "<your_api_key>",
"audience_id" : "<your_audience>",
"mailchimp_server" : "<your_server>",
"auth" : "Bearer <your_api_key>",
"auth0_query_url" : "https://your_tenant.auth0.com/api/v2/users?per_page=5&sort=created_at%3A1&fields=created_at%2Cupdated_at%2Cemail%2Cnickname&q=user_metadata.newsletter%3D%22true%22"
}

0 comments on commit 80f5dd6

Please sign in to comment.