Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Add org enrichment by domain script

Summary

Adds a new script by_domain.py that allows enriching organization data using domain names instead of LinkedIn URLs. The script uses the /v1/organisations/by-domain/{domain} API endpoint and follows the same three-phase pattern (migrate, import, run) as the existing org.py script.

Also includes a sample input/domains.csv file with example domains.

Review & Testing Checklist for Human

  • Potential bug: In get_org_by_domain(), when a 404 or 400 not_found response is received, the function breaks out of the loop but may return an undefined j variable. Verify this edge case is handled correctly.
  • Test the script end-to-end with a real API key to confirm the /v1/organisations/by-domain/{domain} endpoint works as expected
  • Verify the API response format matches what the script expects (JSON that can be stored in the data column)

Recommended test plan:

cd examples/use_cases/enrichment/org/python
python by_domain.py migrate
python by_domain.py import --import-path ../../../../input/domains.csv
python by_domain.py run --api-key YOUR_API_KEY

Notes

- Add by_domain.py script that enriches organizations using domain lookup
- Uses the /v1/organisations/by-domain/{domain} API endpoint
- Follows the same three-phase pattern (migrate, import, run) as org.py
- Add sample domains.csv input file

Co-Authored-By: Adil <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant