The Uncanny Automator XML integration in Uncanny Automator Pro enables the upload XML data for use with Token Loops. This enables workflows like:
- Importing and creating users from a XML file
- Importing and creating posts, products, courses, or any other custom post type from a XML file
- Importing and generating emails, SMS messages (via Twilio), BuddyBoss private messages and more from a XML file
- Importing and bulk publishing LinkedIn, Instagram, Facebook posts, Google Sheets rows, Airtable records, ClickUp tasks and more from an XML file
To import records in XML format into your WordPress site, simply follow these steps:
- Choose the XML workflow that suits your scenario:
- If you would like your recipe to be triggered by the XML import, choose the XML > Import an XML file trigger.
- If you would like the XML import to be part of a recipe that’s triggered by a different activity, choose the XML > Import an XML file action.
- In the trigger/action, choose whether you want to paste in XML data, link to an external XML file, or upload a XML file from your computer.
- Once you’ve selected the applicable options, click Save. Saving the trigger or action automatically adds a Token loop to your recipe, which enables you to “loop” over the items in the XML file.
- Add an action to the Token loop. This action will run on each row in the XML data that matches the filter criteria. In this example, we’ve set the loop to create a new user for every item in the XML where the Email attribute contains a specific domain (In this case automatorplugin.com):
This powerful WordPress XML import capability is highly customizable to enable you to run almost any operation on records stored in XML format.
Notes
- File Type: Only files with a MIME type of XML are accepted. WordPress takes care of the initial validation during media upload and handles display.
- Link to file: Any URL can be entered. If the URL is unreachable or inaccessible, an error message will be displayed in the XPath to target elements field.
- Invalid XML: If the uploaded/linked XML has formatting issues, an error message will appear in the XPath to target elements field. If the syntax is correct but there are no extractable paths, loop tokens will not be generated. You’ll notice this when you go to add an action to the Token loop and you aren’t able to select any fields from the Import an XML file trigger/action.