News Read And Persist
Overview
Reads news from worldnewsapi page by page and persists to Firestore
Suggested workflow name: news-read-and-persist-workflow
Total nodes: 14
Integrations used: google-firestore.queryDocuments, google-firestore.upsertDocument
Tags: news, firestore, pagination, worldnewsapi
Build this in the UI
- Create a new workflow in your
stagingworkspace. - Add the nodes below in order and connect them.
- Configure credentials, dynamic fields, and required node settings.
- Run once with test data and inspect Executions.
- Publish after validation, then promote to
prodwhen ready.
Node checklist
- Add
Initialize State(StateUpdate) - Add
Get Last News Document from Firestore(UniversalProvider) —google-firestore.queryDocuments - Add
Check if Last Document Exists(Condition) - Add
Set Last Read Date from Document(StateUpdate) - Add
Calculate Yesterday at 00:00:00(Code) - Add
Fetch and Persist News Pages(Loop) - Add
Fetch News Page from WorldNewsAPI(Http) - Add
Update Offset for Next Page(StateUpdate) - Add
Initialize Item Loop Index(StateUpdate) - Add
Process Each News Item(Loop) - Add
Map News Item(Code) - Add
Create News Document in Firestore(UniversalProvider) —google-firestore.upsertDocument - Add
Increment News Item Index(StateUpdate) - Add
Workflow Complete(Log)
What to configure in the UI
- Credentials / secret references:
WORLDNEWS_API_KEY - Data referenced (
state.*):currentMappedItem,currentMappedItem.id,currentOffset,firestoreMode,firestoreProjectId,last_read_news_at,newsItemIndex,newsItems, +3 more - Variables (
vars.*): none detected
Related docs:
Troubleshooting
- If a run fails, inspect node inputs/outputs in Executions.
- Verify credentials are present and selected for this workspace.
- Check expression fields for missing inputs, null paths, or invalid formats.