Actions9
Overview
This node operation "Batch Publish Drafts" allows users to publish multiple WeChat draft articles in a batch with controlled delay intervals between each publish. It supports extracting draft media IDs either from the input data of a previous node or manual input. Users can configure the delay between publishes, maximum retry attempts per draft in case of failure, and whether to stop publishing upon encountering an error. This operation is useful for automating the publishing process of multiple drafts while managing rate limits and error handling.
Use Case Examples
- Publishing a list of draft articles automatically with a 60-second delay between each to avoid API rate limits.
- Manually specifying draft media IDs to publish a selected set of drafts in one batch.
- Configuring the node to continue publishing remaining drafts even if some fail, with retries for robustness.
Properties
| Name | Meaning |
|---|---|
| Draft IDs Data Source | Select the source of draft IDs to publish: either from the previous node's output data (recommended) or manual input. |
| Draft Media IDs | Comma-separated list of draft media IDs to publish, used only if manual input is selected as the data source. |
| Publish Delay (seconds) | Time delay in seconds between publishing each draft. Setting to 0 means no delay. Recommended to set between 60-300 seconds to avoid rate limits. |
| Stop on Error | Whether to stop publishing subsequent drafts if an error occurs during publishing. |
| Max Retries per Draft | Maximum number of retry attempts for each draft if publishing fails. |
Output
JSON
operation- The operation performed, here it is 'batchPublishDrafts'.data_source- The source of draft IDs used for publishing (inputData or manual).total_drafts- Total number of drafts processed for publishing.successful_publishes- Number of drafts successfully published.failed_publishes- Number of drafts that failed to publish.publish_delay_seconds- Configured delay in seconds between each publish attempt.max_retries_per_draft- Maximum retry attempts allowed per draft.stop_on_error- Indicates if the process stopped on encountering an error.total_duration_seconds- Total time taken for the batch publishing process in seconds.publish_results- Array of results for each draft publish attempt, including status, attempts, publish ID, and error messages if any.draft_media_ids_processed- List of draft media IDs that were processed in this batch.summarysuccess_rate- Percentage of successful publishes out of total drafts.total_time- Total time taken formatted as minutes and seconds.average_time_per_publish- Average time taken per successful publish in seconds.next_steps- Suggested next steps based on the publishing results.
usage_tip- A usage tip message summarizing the batch publishing outcome.
Dependencies
- An API key credential for WeChat Official Account API authentication.
Troubleshooting
- If no draft media IDs are found in the input data, ensure the previous node outputs draft creation results or switch to manual input mode with valid IDs.
- Invalid format errors may occur if the manual input string is not properly comma-separated or contains invalid characters; ensure correct formatting.
- Publishing may fail due to API rate limits; use the publish delay setting to space out requests and avoid hitting limits.
- If the node stops unexpectedly on an error, check the 'Stop on Error' setting and consider enabling retries or disabling stop on error to continue processing remaining drafts.
- Errors related to authentication or API access indicate issues with the provided API credentials; verify and update credentials as needed.