This is a list of the pre-made actions:
Redirect to URL:
This action allows you to redirect users to a specified URL using a 302 redirect
Usage: Provide the URL to which you want to redirect users.
OpenAI ChatGPT Prompt:
Generates text using the OpenAI ChatGPT model based on provided prompts.
Usage: Provide the text prompt for GPT to generate a response and optionally parameters on separate lines.
Parameters:
%%gpt_model = <model_name>: Specify the GPT model to use (optional, default: gpt-3.5-turbo-0125).
%%max_tokens = <max_tokens>: Specify the maximum number of tokens for the response (optional, default: 3000).
%%name = <response_name>: Provide a name for the response (optional). If you want to re-use the response from chatGPT later on you will want to name it something recognizable.
Scrape RSS Feeds:
Scrapes content from one or more RSS feeds and adds them to the rss_results array.
Usage: Provide the URLs of the RSS feeds you want to scrape.
Parse URL(s):
Parses content from specified URLs and converts it into basic Markdown format.
Usage: Provide the URLs of the web pages you want to parse.
Scrape Bing Search Results:
Scrapes search results from Bing based on provided queries and adds results to the bing_results array.
Usage: Provide the search queries for which you want to scrape results. Optionally provide parameters on separate lines.
Parameters:
%%date = : Set to 24hr, week or month
Scrape DuckDuckGo Search Results:
Scrapes search results from DuckDuckGo based on provided queries and adds results to the ddg_results array.
Usage: Provide the search queries for which you want to scrape results. Optionally provide parameters on separate lines.
Parameters:
%%date = : Set to pastday, week or month
Save Text to File:
Saves provided text content to a specified file.
Usage: first line will be the filename, the rest of the lines will get saved to the file. It will get saved in the data folder (within the plugin folder structure)
Save Arrays to Files:
Saves provided arrays to text files in the format that the plugin expect them.
Useful for when you used an item that you loaded in from a file and don’t want to reuse in the future (make sure to delete the key first )
Usage: each line should be a name of the array to get saved as name.txt in the data folder
Save Globals to Files:
Saves global arrays/variables to separate files for later retrieval and usage.
This saves the bing_results, ddg_results, rss_responses, gpt_responses and parsed_urls global array.
Usually you don’t need this and are better of using the ‘Save Arrays To Files’ action
Usage: No Parameters: This action does not require parameters.
Load and Append Globals from Files:
Loads data from text files and appends it to global variables.
Usage: Provide the filenames of the text files containing data to append.
Example: data1.txt
Trim or Empty Global Array:
Trims or empties specified global arrays based on provided parameters.
Usage: Provide the name of the global array and the number of items to keep (optional) on the 2nd line.
Delete From Array:
Deletes specified entries from arrays based on provided key.
Usage: Provide the name of the global array and the keys of items you want deleted on the next line(s).
Randomize Global Array Order:
Randomizes the order of specified global arrays.
Usage: Provide the name of the global array to randomize.
Load Data from Text Files:
Loads data from text files into newly created global arrays.
Usage: Provide the filenames of the text files containing data to load. The newly created global arrays will have matching names and can thus be referenced in later actions by using shortcode
Example: if you have the text file lastRSSurl.txt (in the data folder in the plugin), you can simply load data from lastRSSurl.txt
Lets say the content of the text file is:
key|link
0|http://example.com/
Now we can use %%lastRSSurl.link.0%% to have it automatically be replaced by http://example.com/
We can use as many parameters as we want in the text file, such as:
key|brand|phone|resolution|os|ram|storage|price
0|apple|iphone|2556x1179|Apple iOS 17|6GB|128GB|€795.00
1|samsung|galaxy s24 ultra|3120x1440|Android|12GB|256GB|€1145.99
Output Content From URL:
This outputs the content from another (external) URL and gives the option of making all links go to a target you set. This is done by javascript so that the href locations don’t appear to get changed. It also gives the option for multiple find and replace actions.
This allows you to easily ‘copy’ salespages from other websites for testing, while making sure all clicks go to your (affiliate?) links.
Usage: First line should have the URL that you want to use as content source. On subsequent lines you can set the replaceLinks and find and replace parameters.
Parameters:
%%replaceLinks = https://www.thisiswhereclickwillgo.com/
%%find = text which will get replaced
%%replace = text that is replacing the other text
If you want to do multiple find and replaces, just add more %%find and %%replace parameters. Just keep them in the right order.
Create Post:
Creates a new post in WordPress with specified parameters.
Usage: First use the parameters and under that the content of the post
Parameters:
%%post_title = : Specify the title of the post.
%%post_status = : Specify the status of the post (draft, publish, etc.).
%%post_author = : Specify the author of the post.
%%post_tags = : Specify the tags for the post (comma-separated).
%%create_category = true/false: Specify if you want to automatically create new categories when a category doesn’t exist yet.
%%post_category = : Specify the categories for the post (comma-seperated)
%%post_content = : Specify the content of the post starting on the next line
post_content should use HTML.
Create Comment:
Creates a new comment in WordPress with specified parameters.
Usage: First use the parameters and under that the content of the post
Parameters:
%%post_id = <post_id >: Specify the ID of the post to comment on
%%author = : Specify the comment author name. Default is John Doe
%%author_email = <author_email >: Specify the comment author email.
%%parent = : Specify the parent comment ID. If replying to another comment, set that ID here. Default is 0, which means it’s not a reply to a different comment
%%user_id = <user_id >: Specify the author user_id. Default is 0
%%approved = : Specify the whether the comment is approved (1) or pending moderation (0). Default is 0
%%comment_content = : Specify the content of the post starting on the next line
comment_content can use HTML, but is not needed.
Create Images with Dall-E:
Prompts openai dall-e to generate an image.
It’s usually better to use the ‘Create Image using Dall-E, Compress and add to Media’ action instead, as this action doesn’t process the image
Usage: First use the parameters and then the prompt
Parameters:
%%name = : Specify the title of the post.
%%dall-e_model = : use dall-e-2 or dall-e-3. if not set, dall-e-2 will be used
%%size = : Specify the size of the image. take note of sizes available.
%%quality = : ONLY FOR DALL-E-3. standard or HD. if not set standard is used.
Download and Convert Images to WebP:
Downloads images and converts them to webp format. Requires php GD extension (which most servers should have) and php 7.4+
Images get saved in the plugins images folder using the set name or using the name of the original image (characters that are not letters, numbers, hyphen or underscore get removed from the name though).
Usage: First use the parameters and under the URLs. Can set the parameter per URL
Parameters:
%%name = : Specify the name of the image.
%%quality = : Specify the compression quality of the image. Default is 80.
Upload Media from URLs:
Downloads images and uploads them to wordpress media
Usage: First use the parameters and under the URLs. Can set the parameter per URL
Parameters:
%%alt = : Specify the alternate/alt tag of the image.
%%caption = : Specify the caption of the image.
%%title = : Specify the title of the image.
%%description = : Specify the description of the image.
Create Image using Dall-E, Compress and add to Media:
Prompts openai dall-e to generate an image
Downloads images and converts them to webp format. Requires php GD extension (which most servers should have) and php 7.4+
Images get saved in the plugins images folder using the set name or using the name of the original image (characters that are not letters, numbers, hyphen or underscore get removed from the name though).
Downloads images and uploads them to wordpress media.
Compressed image in the plugins images folder gets deleted afterwards.
Usage: First use the parameters and under the URLs. Can set the parameter per URL
Parameters:
%%name = : Specify the name of the image.
%%dall-e_model = : use dall-e-2 or dall-e-3. if not set, dall-e-2 will be used
%%size = : Specify the size of the image. take note of sizes available.
%%dalle_quality = : ONLY FOR DALL-E-3. standard or HD. if not set standard is used.
%%quality = : Specify the compression quality of the image. Default is 80.
%%alt = : Specify the alternate/alt tag of the image.
%%caption = : Specify the caption of the image.
%%title = : Specify the title of the image.
%%description = : Specify the description of the image.
Placeholders/Tokens:
Tokens will get automatically replaced by results from earlier actions.
Usage: simply use the tokens as input
Tokens:
%%rss.link.0%% - will get replaced by the first link from the scraped rss feed
%%rss.title.0%% - will get replaced by the first title from the scraped rss feed
%%rss.title.random%% - will get replaced by a random title from the scraped rss feed
%%rss.title.random-delete%% - will get replaced by a random title from the scraped rss feed and remove that item from the rss_results array%%bing.link.1%% - will get replaced by the second link from the scraped bing results
%%ddg.link.1%% - will get replaced by the second link from the scraped duckduckgo results
%%bing.title.1%% - will get replaced by the second title from the scraped bing results
%%bing.title.random%% - will get replaced by a random title from the scraped bing results%%bing.title.random-delete%% - will get replaced by a random title from the scraped bing results and remove that item from the bing_results array
%%gpt.0%% - will get replaced by the response from the first response from chatGPT (if not naming them)
%%gpt.article%% - will get replaced by the response from the response from chatGPT where you added %%name = article to the top of the textarea%%parsed.http://www.example.com%% - will get replaced by the parsed content from http://www.example.com IF YOU PARSED THAT URL BEFOREHAND
%%dalle.NAME.revised_prompt%% - if dall-e-3 is used and the prompt was too short, dall-e-3 will revise the prompt. this is the revised prompt
%%dalle.NAME.dalle_url%% - this is the (external) URL where dall-e stored the image
%%dalle.NAME.media_id%% - this is the media ID within wordpress
%%dalle.NAME.media_url%% - this is the URL from the uploaded image
replace NAME with the name you set in the Create Image using Dall-E, Compress and add to Media* action
Nested Tokens
Some tokens can be nested to dynamicly insert the appropiate things
%%parsed.%%bing.link.0%%%% - %%bing.link.0%% will first get replaced by the first link from the scraped bing results and then replace the complete token with the parsed content IF YOU PARSED THAT URL BEFOREHAND
%%%parsedown.%%gpt.article%%%%% - this will take the response from gpt (where it was named article) and parse it down from markdown to HTML (needed to post to wordpress) - NOTE that this token uses 3 %'s at start and end instead of 2
Other Actions:
We can also use PHP as actions which allows for extra functionality that might not (yet) be available in pre-made actions
Check if new URL
This checks the latest URL returned from the scraping of an RSS feed and compares it to an URL stored in a text file (that needs to be loaded in before) and skips the next 99 actions.
$skipNextAction can also be set to 1 or 2 if you just want it to skip the next 1 or 2 actions if a certain value is empty
if ('%%rss.link.0%%' == '%%lastRSSurl.link.0%%') {
itl_debug_log('There is no new post');
$skipNextAction = 99;
}
add HTML to footer
add_action('wp_footer', function() { echo '<p>content that gets added in the footer</p>'; });
add HTML to head
add_action('wp_head', function() { echo 'this goes into the header'; });
add HTML to the bottom of the post
add_filter('the_content', function($content) {
$additionalContent = "This is appended to the post.";
return $content . $additionalContent;
});
add HTML above the comment form
add_action('comment_form_top', function() {
echo "This appears above the comment form.";
});