Created
April 2, 2020 17:07
-
-
Save joefusaro/393e16933f72f7e3308fc085daac018f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from marketorestpython.client import MarketoClient | |
BATCH_ID = 3274 | |
MUNCHKIN_ID = 'xxx-xxx-xxx' | |
CLIENT_ID = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' | |
CLIENT_SECRET = 'xxxxxxxxxxxxxx' | |
mc = MarketoClient(MUNCHKIN_ID, CLIENT_ID, CLIENT_SECRET) | |
failed_leads = mc.execute(method='get_import_failure_file', id=BATCH_ID) | |
file_name = "import-failure-for-batch-" + str(BATCH_ID) + ".csv" | |
if failed_leads is not '': | |
f = open(file_name, mode='w') | |
f.write(failed_leads) | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment