Resources »

Guides »

AI Agents »

Find and update organization contact details from their website using Anthropic Claude

Introduction

An AI agent can browse an organization's website to automate the tedious process of keeping their contact details updated.

In this example we'll use Anthropic's Claude Haiku 3.5 model. You can use any model from any provider that supports tools.

The agent is given two llm.tool: tools:

fetch_url Return the content of a URL in Markdown format.
org_update Update an organization record with any combination of: mailing address, city, state/province, postal code, country, and phone number.

The fetch_url tool uses Cerb's built-in http.request: automation command and |html_to_text filter to crawl websites at no extra cost.

You can optionally use a service like Tavily or Crawl4AI for a more sophisticated solution. Crawl4AI uses an actual browser engine to process content generated by Javascript.

Some websites block automated crawlers with scripting or CAPTCHAs.

Installation

Connect to an Anthropic account

Create an Anthropic connected account in Cerb.

Import the example workflow

Create a new workflow from Search » Workflows » (+) » Empty.

Copy and paste the following workflow template:

workflow:
  name: wgm.ai_agent.org_update
  version: 2025-05-13T00:00:00Z
  description: Automatically update organization contact details from their website using Anthropic Claude.
  website: https://cerb.ai/resources/workflows/
  requirements:
    cerb_version: >=11.0 <11.2
    cerb_plugins: cerberusweb.core,
  config:
    chooser/anthropic_account_id:
      label: Anthropic Account:
      record_type: connected_account
      record_query: anthropic
records:
  automation/scriptUpdateOrg:
    fields:
      name: wgm.ai_agent.org_update.interaction
      extension_id: cerb.trigger.interaction.worker
      description@text:
      script@raw:
        inputs:
          record/org:
            required@bool: yes
            record_type: org
            expand: customfields

        start:
          set:
            config@json: {{cerb_workflow_config('wgm.ai_agent.org_update')|json_encode}}
            tool_labels:
              fetch_url@raw: Fetching URL: {{url}}
              org_update@raw: Updating org contact info

          # Prompt for company website if we don't have one on file
          outcome/noWebsite:
            if@bool: {{not inputs.org.website}}
            then:
              data.query/hosts:
                output: results
                inputs:
                  query@text:
                    type:worklist.subtotals
                    of:address
                    by:[host]
                    query:(
                      org.id:{{inputs.org.id}}
                    )
                    format:dictionaries
              await:
                form:
                  title: Update Organization
                  elements:
                    text/prompt_url:
                      label: What is the organization's website URL?
                      required@bool: yes
                      type: url
                      default: https://www.{{results.data|first.host}}
                      placeholder: https://www.example.com
              # Update the org record
              record.update:
                output: org_record
                inputs:
                  record_type: org
                  record_id: {{inputs.org.id}}
                  fields:
                    website: {{prompt_url}}
                on_success:
                  var.set:
                    inputs:
                      key: inputs:org:website
                      value: {{prompt_url}}

          await/prepare:
            form:
              title: Update Organization
              elements:
                submit:
                  is_automatic@bool: yes

          # Ask an AI agent to find the contact details on their website
          llm.agent:
            output: llm_results
            inputs:
              llm:
                anthropic:
                  model: claude-3-5-haiku-latest
                  authentication: cerb:connected_account:{{config.anthropic_account_id}}
              system_prompt@text:
                You are a helpful AI assistant.
                Your job is to fetch contact details from company websites and update the internal CRM system.
                Use your tools to browse the website and to update records.
                You may need to fetch multiple URLs to find the "Contact" or "About us" page.
                You're a "one shot" agent, so you don't need to ask a follow-up question.
              messages:
                message:
                  role: user
                  content@text:
                    Find the company address and telephone number for:
                    Org: {{inputs.org.name}}
                    ID: {{inputs.org.id}}
                    URL: {{inputs.org.website}}
              tools:
                automation/fetch_url:
                  uri: cerb:automation:wgm.ai_agent.org_update.tool.fetch_url
                automation/org_update:
                  uri: cerb:automation:wgm.ai_agent.org_update.tool.update_info
            on_tool:
              await:
                form:
                  elements:
                    llmTranscript/prompt_transcript:
                      session_id: {{llm_results.session_id}}
                      tool_labels@key: tool_labels
                    submit:
                      is_automatic@bool: yes

          await/results:
            form:
              title: Results
              elements:
                llmTranscript/prompt_transcript:
                  session_id: {{llm_results.session_id}}
                  tool_labels@key: tool_labels
      policy_kata@raw:
        commands:
          data.query:
            deny/type@bool: {{query.type != 'worklist.subtotals'}}
            allow@bool: yes
          llm.agent:
            allow@bool: yes
          record.update:
            deny/type@bool: {{inputs.record_type is not record type ('org')}}
            allow@bool: yes
  automation/toolFetchUrl:
    fields:
      name: wgm.ai_agent.org_update.tool.fetch_url
      extension_id: cerb.trigger.llm.tool
      description: Fetch a website URL as Markdown
      script@raw:
        inputs:
          text/url:
            required@bool: yes
            type: url
            description: A website URL in the format of: https://example.com/

        start:
          log: Fetching URL: {{inputs.url}}
          http.request/get:
            output: http_response
            inputs:
              method: GET
              url: {{inputs.url}}
              headers:
                User-Agent: Cerb
            on_error:
            on_success:
              return:
                content@text:
                  {{http_response.body|html_to_text(truncate=50000)}}
      policy_kata@raw:
        commands:
          http.request:
            deny/method@bool: {{inputs.method not in ['GET']}}
            allow@bool: yes
  automation/toolOrgUpdateInfo:
    fields:
      name: wgm.ai_agent.org_update.tool.update_info
      extension_id: cerb.trigger.llm.tool
      description: Update contact info on an organization
      script@raw:
        inputs:
          text/org_id:
            required@bool: yes
            description: The organization record ID (e.g. 1).
            type: number
          text/street:
            description: The optional street address on multiple lines without city, state, zip, country.
            type: freeform
          text/city:
            description: The optional city.
            type: freeform
          text/postal:
            description: The optional postal code.
            type: freeform
          text/country:
            description: The optional country.
            type: freeform
          text/province:
            description: The optional state or province.
            type: freeform
          text/phone:
            description: The optional main phone number.
            type: freeform
          # text/region:
          #   description: The optional region based on the city and country.
          #   type: freeform
          #   allowed_values@list:
          #     North America
          #     South America
          #     Europe
          #     Middle East
          #     Asia
          #     Africa
          #     Australia & New Zealand

        start:
          record.update/org:
            output: updated_org
            inputs:
              record_type: org
              record_id@key: inputs:org_id
              fields:
                street@key,optional: inputs:street
                city@key,optional: inputs:city
                country@key,optional: inputs:country
                phone@key,optional: inputs:phone
                postal@key,optional: inputs:postal
                province@key,optional: inputs:province
                #region@key,optional: inputs:region
                updated@date: now
            on_error:
              return:
                content: There was an error updating the organization record.
            on_success:
              return:
                content: Organization record updated successfully.
      policy_kata@raw:
        commands:
          record.update:
            deny/type@bool: {{inputs.record_type is not record type ('org')}}
            allow@bool: yes
  card_widget/cardOrgActions:
    fields:
      name: Actions
      record_type: cerberusweb.contexts.org
      extension_id: cerb.card.widget.form_interaction
      pos: 100
      width_units: 4
      zone: content
      extension_params:
        interactions_kata@text:
          interaction/updateContactInfo:
            label: Update Contact Info
            uri: cerb:automation:wgm.ai_agent.org_update.interaction
            icon: address-book
            inputs:
              org@key: record_id
            after:
              refresh_widgets@list: Properties
        is_popup: 1

Click the Continue button. Link your Anthropic account and click Continue again.

The following records will be created:

Usage

From Search » Organizations, open an organization card popup.

Click the new Update Contact Info button at the bottom of the card.

If you haven't added a website URL to the contact you'll be prompted to enter it. If email addresses are linked to the organization, the most common hostname will be used as the default website.

The AI agent will browse the website to find contact details. It can follow a sequence of likely links (e.g. contact, about) to discover contact information.

The record is now automatically updated with the current contact info:

This also works in non-English languages.