【问题标题】:Hubspot bulk add propertyHubspot 批量添加属性
【发布时间】:2016-10-25 11:59:19
【问题描述】:

我想通过 Hubspot API 一次添加多封电子邮件。我使用了一个 foreach 循环来添加电子邮件,但是 30 秒后,它显示超出了执行时间。有没有通过 Hubspot API 批量添加属性的方法?

foreach ($leads as $lead) {
  $data['email'] = $lead['email'];
  $data['firstname'] = $lead['name'];
  $hubspot = new HubSpot($autoDetails[3]->api_creds_required);
  $hubspot->contacts()->create_contact($data);
  $email = $hubspot->contacts()->get_contact_by_email($lead['email']);
  $result = $hubspot->lists()->add_contacts_to_list($email->vid, $autoDetails[0]);
}

【问题讨论】:

标签: php hubspot


【解决方案1】:

按照Hubspot's docs 中的建议,您需要使用他们的Batch API,它允许您在一个请求中创建或更新多达 100 个联系人。

您可能还想查看这个支持相同端点的开源PHP Hubspot wrapper

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-29
    • 1970-01-01
    • 1970-01-01
    • 2012-12-10
    • 2021-10-22
    • 2018-10-20
    • 1970-01-01
    相关资源
    最近更新 更多