Synchronize macOS and iOS from within a Smart Rule AppleScript?

Hi, I’m trying to build a Smart Rule that converts bookmarks (I’ve captured on iPhone) to HTML records after syncing. Converting works fine, but I also would like to immediately send the resulting HTML records back to iPhone (without manually starting a sync again). Already tried the “synchronize” command but it doesn’t do what I’m looking for. Is this possible?

on performSmartRule(theRecords)
	tell application id "DNtp"
			repeat with theRecord in theRecords
				set theGroup to parent 1 of theRecord
				set theHTMLrecord to convert record theRecord to html in theGroup
				set creation date of theHTMLrecord to (creation date of theRecord)
				set unread of theHTMLrecord to true
				move record theRecord to trash group of (database of theRecord)
			end repeat
		on error error_message number error_number
			if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
		end try
	end tell
end performSmartRule

if it’s converting fine why wouldn’t it sync back to the iPhone?
Doesn’t the sync work “automatically”?

Don’t know why, but it doesn’t automatically sync back. Would expect that a Smart Rule that’s set to “After Sync” would do this.

The synchronize command doesn’t initiate a sync.

Since sync runs on an interval, why not just let sync do its thing on schedule? Or initiate a manual sync if you need it faster?

Unless @cgrunenberg wants to add a Synchronize action to smart rules. :stuck_out_tongue:

I misunderstood what the command does.

Wouldn’t it make sense that after records were changed (e.g. converted) with a Smart Rule (that’s set to "After Sync) that the “sync-back” afterwards would start automatically? Feels unnatural that the user initiates a sync and then has to manually snyc again after the Smart Rule did it’s thing.