{"flow":{"id":71,"summary":"Retrieve articles from Google Drive , use a for loop to translate each one with OpenAI and store the embeddings in a Airtable database","versions":[277],"created_by":"henri186","created_at":"2025-08-01T12:34:34.119Z","votes":0,"approved":false,"apps":["gdrive,","openai,","airtable"],"value":{"modules":[{"id":"a","value":{"path":"hub/16071/gdrive/download_files_(google_docs,_sheets,_slides)","type":"script","is_trigger":false,"input_transforms":{"fileId":{"expr":"flow_input.folder_id","type":"javascript"},"mimeType":{"expr":"\"application/vnd.google-apps.document\"","type":"javascript"},"gdrive_auth":{"expr":"flow_input.gdrive_resource","type":"javascript"}}},"summary":""},{"id":"b","value":{"type":"forloopflow","modules":[{"id":"c","value":{"path":"hub/17561/openai/create_translation","type":"script","is_trigger":false,"input_transforms":{"auth":{"expr":"flow_input.openai_resource","type":"javascript"},"body":{"expr":"{\n  \"file\": flow_input.iter.value,\n  \"model\": \"whisper-1\"\n}","type":"javascript"}}},"summary":""},{"id":"d","value":{"path":"hub/17559/openai/create_embedding","type":"script","is_trigger":false,"input_transforms":{"auth":{"expr":"flow_input.openai_resource","type":"javascript"},"body":{"expr":"{\n  \"input\": results.c.text,\n  \"model\": \"text-embedding-ada-002\"\n}","type":"javascript"}}},"summary":""},{"id":"e","value":{"path":"hub/14269/airtable/create_single_record","type":"script","is_trigger":false,"input_transforms":{"atCon":{"expr":"flow_input.airtable_resource","type":"javascript"},"atTable":{"expr":"flow_input.airtable_table","type":"javascript"},"newRecord":{"expr":"{\n  \"original_text\": results.c.text,\n  \"embedding\": results.d.data[0].embedding,\n  \"file_name\": flow_input.iter.value.name\n}","type":"javascript"}}},"summary":""}],"iterator":{"expr":"results.a","type":"javascript"},"parallel":false,"skip_failures":true}}]},"schema":{"type":"object","order":["folder_id","gdrive_resource","openai_resource","airtable_resource","airtable_table"],"$schema":"https://json-schema.org/draft/2020-12/schema","required":["folder_id","gdrive_resource","openai_resource","airtable_resource","airtable_table"],"properties":{"folder_id":{"type":"string","description":"Google Drive folder ID containing the articles"},"airtable_table":{"type":"string","description":"Airtable table name to store the embeddings"},"gdrive_resource":{"type":"object","format":"resource-gdrive","description":"Google Drive authentication resource"},"openai_resource":{"type":"object","format":"resource-openai","description":"OpenAI API authentication resource"},"airtable_resource":{"type":"object","format":"resource-airtable","description":"Airtable authentication resource"}}},"description":"","recording":null,"vcreated_at":"2025-08-01T12:34:34.119Z","vcreated_by":"henri186","comments":[]}}