approve_action
ChatGPTUsed by the HoneyBook approval card when the member approves. Runs the change they reviewed, exactly as shown.
By Honeybook inc.
Ready to find the right photographer? HoneyBook's Photographers Directory makes it easy. Whether you're planning a wedding, engagement, birthday party, corporate event, or special celebration, simply describe what you're looking for, such as "wedding photographers in Brooklyn" or "engagement photographers near Denver," and discover trusted photography vendors in your area. Browse personalized matches, explore their work, and inquire directly through HoneyBook to connect with the perfect photographer in minutes.
httpClient is already in scope — do not create it. Work goes through a domain adapter: import the adapter find_action names, construct it with httpClient, and call its method with named args ({ id } for a path id, { params } for filters/query, { data } for a payload): import { ContactsAdapter } from '@honeybook/sdk/contacts'; const contacts = new ContactsAdapter(httpClient); const page = await contacts.listContacts({ params: { query: 'jane' } }); console.log(page.data); console.log is how you return data to the caller — your code runs as an ES module, not a function body, so a top-level return is a syntax error and the whole run fails before anything executes. Methods return the result directly and throw on failure — there is no { data, error } wrapper; a list comes back once-wrapped as { data, pagination }. Keep a whole job in one call — a value from one step (like a returned id) feeds the next. That includes looping: when a job spans many records, list them and iterate in the SAME call — for (const r of page.data) { … }, or await Promise.all(page.data.map(r => …)) for independent reads. One call is one sandbox, so splitting a 20-record job across 20 calls is 20 sandboxes and will be refused partway through, leaving you a partial answer that looks complete. Before looping to add something up, check find_action for an operation that returns the total directly — several exist, and one call beats reading every record. Changes use the same adapter pattern, e.g. await contacts.createContact({ data: { email: 'jane@example.com' } }). The result reports what was committed (with returned IDs) and anything that failed, and says what to do next — read it before replying. When a request only looks something up and changes nothing, take_action_read_only does the same reads but cannot make a change — prefer it there.httpClient is already in scope — do not create it. Work goes through a domain adapter: import the adapter find_action names, construct it with httpClient, and call its method with named args ({ id } for a path id, { params } for filters/query, { data } for a payload): import { ContactsAdapter } from '@honeybook/sdk/contacts'; const contacts = new ContactsAdapter(httpClient); const page = await contacts.listContacts({ params: { query: 'jane' } }); console.log(page.data); console.log is how you return data to the caller — your code runs as an ES module, not a function body, so a top-level return is a syntax error and the whole run fails before anything executes. Methods return the result directly and throw on failure — there is no { data, error } wrapper; a list comes back once-wrapped as { data, pagination }. Keep a whole job in one call — a value from one step (like a returned id) feeds the next. That includes looping: when a job spans many records, list them and iterate in the SAME call — for (const r of page.data) { … }, or await Promise.all(page.data.map(r => …)) for independent reads. One call is one sandbox, so splitting a 20-record job across 20 calls is 20 sandboxes and will be refused partway through, leaving you a partial answer that looks complete. Before looping to add something up, check find_action for an operation that returns the total directly — several exist, and one call beats reading every record. Passing readOnly to find_action narrows its results to the operations that only read.Click any prompt to copy it.