有什么方法可以使用 python 从 pardot 导出数据吗?

Is there any way to export data from pardot using python?

目前它是一个手动过程,如下面 link 中所述: https://help.salesforce.com/articleView?id=pardot_export_prospects.htm&type=5

我们可以使用 python 来获取数据而不是手动工作吗?请分享代码示例

对 Pardot 使用 Official Pardot API Documentation and PyPardot - Python API 包装器。

有关支持的操作,请参阅 API 文档的 querying objects for code example and querying prospects 部分。

查看上面共享的开发人员文档和此文档:https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_oauth_and_connected_apps.htm,设置连接的应用程序。然后使用密钥和业务单元检索令牌 然后使用令牌使用 pardot api

获取您要查找的内容
response = requests.post(auth_url, data = {
                'client_id':client_id,
                'client_secret':client_secret,
                'grant_type':'password',
                'username':sfdc_user,
                'password':sfdc_pass
                })
print (response)
# Retrieve token
json_res = response.json()
access_token = json_res['access_token']
#print(access_token)
auth = {'Authorization':'Bearer ' + access_token,'Pardot-Business-Unit-Id':sfdc_buid}


response = requests.post(listmember_uri, headers=auth,data ={})