Batch Enrich
Category: Data & Analytics
This page is generated from the Air Pipe marketplace. Browse it live to install into your organization.
Overview
Enrich each contact in a list via an upstream API. Demonstrates lookup fan-out (one call per item).
Endpoints
- POST
contacts/enrich— enrich each posted contact
Required variables
ap_var::ENRICH_API_KEY— enrichment API key
Configuration
batch_enrich.yml
name: BatchEnrich
description: >
Enrich each contact in a posted list by calling an upstream API once per
item. Demonstrates lookup fan-out — an action that iterates over an input
array and collects one result per element.
docs: true
# Required managed variables:
# ENRICH_API_KEY — Bearer token for the upstream enrichment API
global:
variables:
enrich_url: "https://api.example.com/enrich"
interfaces:
contacts/enrich:
output: http
method: POST
summary: Enrich each contact in a list via an upstream API (lookup fan-out)
actions:
- name: ReadBody
input: a|body|
assert:
error_message: "contacts array is required"
http_code_on_error: 400
tests:
- value: contacts
is_not_empty: true
- name: Enrich
run_when_succeeded: [ReadBody]
lookup: a|ReadBody::contacts|
lookup_concurrency: 10
item_timeout: 10s
actions:
- name: EnrichOne
http:
method: GET
url: "a|var::enrich_url|?email=a|body::email|"
headers:
Authorization: "Bearer a|ap_var::ENRICH_API_KEY|"
post_transforms:
- extract_value: "body"
- name: Respond
run_when_succeeded: [Enrich]
input: a|body|
json_output: |-
{ "status": "enriched", "contacts": a|ReadBody::contacts| }